In this package, there are 3 activities:
- Open sql server activity: Open a connection impersonated or not, with sql server
- Execute query sql server activity: A basic operation with that connection
- Close sql server activity: Closes the connection
If the value of Impersonate is set to true, it will use the values of User and Password to perform the impersonation. If the value of Impersonate is set to false, it will default to the credentials of the user logged into the system.
The ultimate goal is to use the impersonation functionality to enable access in cases where a specific user has access to a connection string but lacks local permissions.
[string] User [string] Password [string] ConnectionString [bool] Impersonate
[SqlConnection] Connection
A basic execution of the sql server's query. May be text, stored procedure... you choose.
[Dictionary<string,object>] CommandParameters [string] CommandText [Enum : CommandType] CommandType [SqlConnection] Connection
[DataSet] Result
Closes the connection's instance
[SqlConnection] Connection
N/A
Server=myServerAddress;Database=myDataBase;User Id=myUsername;Password=myPassword;
Server=myServerAddress;Database=myDataBase;Trusted_Connection=True;
The server/instance name syntax used in the server option is the same for all SQL Server connection strings.
Server=myServerName\myInstanceName;Database=myDataBase;User Id=myUsername;Password=myPassword;
If your SQL Server listens on a non-default port you can specify that using the servername,xxxx syntax (note the comma, it's not a colon).
Server=myServerName,myPortNumber;Database=myDataBase;User Id=myUsername;Password=myPassword;