Class GetDatabaseListTask
Returns a list of all user databases on the server. Make sure to connect with the correct permissions! In MySql, this will return a list of all schemas.
Implements
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: ETLBox.ControlFlow.Tasks
Assembly: ETLBox.dll
Syntax
public sealed class GetDatabaseListTask : ControlFlowTask, ILoggableTask
Examples
GetDatabaseListTask.List();
Constructors
GetDatabaseListTask()
Declaration
public GetDatabaseListTask()
Properties
DatabaseNames
A list containing all databases after executing.
Declaration
public List<string> DatabaseNames { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.List<System.String> |
Sql
The sql code generated to query all database names
Declaration
public string Sql { get; }
Property Value
Type | Description |
---|---|
System.String |
TaskName
A name to identify the task or component. Every component or task comes with a default name that can be overwritten.
Declaration
public override string TaskName { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Overrides
Methods
Execute()
Queries the server for all user database names. The result is stored in DatabaseNames
Declaration
public void Execute()
GetList()
Declaration
public GetDatabaseListTask GetList()
Returns
Type | Description |
---|---|
GetDatabaseListTask |
List()
Runs sql code to determine all user database names.
Declaration
public static List<string> List()
Returns
Type | Description |
---|---|
System.Collections.Generic.List<System.String> | A list of all user database names |
List(IConnectionManager)
Runs sql code to determine all user database names.
Declaration
public static List<string> List(IConnectionManager connectionManager)
Parameters
Type | Name | Description |
---|---|---|
IConnectionManager | connectionManager | The connection manager of the server you want to connect |
Returns
Type | Description |
---|---|
System.Collections.Generic.List<System.String> | A list of all user database names |