IfDatabaseExistsTask

Class IfDatabaseExistsTask

Checks if a database exists.

Inheritance
IfDatabaseExistsTask
Implements
Namespace: ETLBox.ControlFlow
Assembly: ETLBox.dll
Syntax
    public sealed class IfDatabaseExistsTask : IfExistsTask, ILoggableTask

Constructors

IfDatabaseExistsTask()

Declaration
    public IfDatabaseExistsTask()

IfDatabaseExistsTask(string)

Declaration
    public IfDatabaseExistsTask(string databaseName)
Parameters
TypeNameDescription
stringdatabaseName

Methods

IsExisting(IConnectionManager, string)

Ćhecks if the database exists

Declaration
    public static bool IsExisting(IConnectionManager connectionManager, string databaseName)
Parameters
TypeNameDescription
IConnectionManagerconnectionManager

The connection manager of the server you want to connect. Make sure this points to a database that does exist (e.g. a system database)

stringdatabaseName

The database name that you want to check for existence

Returns
TypeDescription
bool

True if the procedure exists

IsExisting(string)

Ćhecks if the database exists. Make sure that your default connection string points to the server itself and to an existing database. (E.g. a system database)

Declaration
    public static bool IsExisting(string databaseName)
Parameters
TypeNameDescription
stringdatabaseName

The database name that you want to check for existence

Returns
TypeDescription
bool

True if the database exists

Implements