Microsoft SQL Server
Below is a sample connection string for SQL Server
Data Source=WIN-UFD8979431O\SQLAPPRULES; Initial Catalog=ReplicateCRM; Integrated Security=True; MultipleActiveResultSets=True
The following are the properties for connecting to Microsoft SQL Server. The required properties are identified using the *** characters.
If a connection property value has special characters such as semicolons, single quotes, spaces, etc., then you must quote the value using either single or double quotes.
ApplicationIntent
Declares the application workload type when connecting to a database in an SQL Server Availability Group.
ApplicationName
name of the application associated with the connection string.
AsynchronousProcessing
Boolean value that indicates whether asynchronous processing is allowed by the connection created by using this connection string.
AttachDBFilename
string that contains the name of the primary data file. This includes the full path name of an attachable database.
ConnectionString
connection string resulting of the properties defined, you can directly update it or copy it from another datasource
ConnectRetryCount
[Supported in the .NET Framework 4.5.1 and later versions] The number of reconnections attempted after identifying that there was an idle connection failure. This must be an integer between 0 and 255. Default is 1. Set to 0 to disable reconnecting on idle connection failures.
ConnectRetryInterval
[Supported in the .NET Framework 4.5.1 and later versions] Amount of time (in seconds) between each reconnection attempt after identifying that there was an idle connection failure. This must be an integer between 1 and 60. The default is 10 seconds.
ConnectTimeout
Gets or sets the length of time (in seconds) to wait for a connection to the server before terminating the attempt and generating an error.
ContextConnection
value that indicates whether a client/server or in-process connection to SQL Server should be made.
CurrentLanguage
SQL Server Language record name.
DataSource***
name or network address of the instance of SQL Server to connect to.
Encrypt
Boolean value that indicates whether SQL Server uses SSL encryption for all data sent between the client and server if the server has a certificate installed.
Enlist
Boolean value that indicates whether the SQL Server connection pooler automatically enlists the connection in the creation thread's current transaction context.
FailoverPartner
name or address of the partner server to connect to if the primary server is down.
InitialCatalog***
name of the database associated with the connection.
IntegratedSecurity***
Boolean value that indicates whether User ID and Password are specified in the connection (when false) or whether the current Windows account credentials are used for authentication (when true).
LoadBalanceTimeout
minimum time, in seconds, for the connection to live in the connection pool before being destroyed.
MaxPoolSize
maximum number of connections allowed in the connection pool for this specific connection string.
MinPoolSize
minimum number of connections allowed in the connection pool for this specific connection string.
MultipleActiveResultSets***
Must be set to true, so the application can maintain multiple active result sets (MARS). When false, an application must process or cancel all result sets from one batch before it can execute any other batch on that connection.
MultiSubnetFailover
when application is connecting to an AlwaysOn availability group (AG) on different subnets, setting MultiSubnetFailover=true provides faster detection of and connection to the (currently) active server.
NetworkLibrary
String that contains the name of the network library used to establish a connection to the SQL Server.
PacketSize
size in bytes of the network packets used to communicate with an instance of SQL Server.
Password***
password for the SQL Server account. Specified when IntegratedSecurity set to false
PersistSecurityInfo
Boolean value that indicates if security-sensitive information, such as the password, is not returned as part of the connection if the connection is open or has ever been in an open state.
Pooling
Boolean value that indicates whether the connection will be pooled or explicitly opened every time that the connection is requested.
Replication
Boolean value that indicates whether replication is supported using the connection.
TransactionBinding
string value that indicates how the connection maintains its association with an enlisted System.Transactions transaction.
TrustServerCertificate
indicates whether the channel will be encrypted while bypassing walking the certificate chain to validate trust.
TypeSystemVersion
string value that indicates the type system the application expects.
UserID***
user ID to be used when connecting to SQL Server. Specified when IntegratedSecurity set to false
UserInstance
value that indicates whether to redirect the connection from the default SQL Server Express instance to a runtime-initiated instance running under the account of the caller.
WorkstationID
name of the workstation connecting to SQL Server.
Last updated