Connection String Generator for SQL Server
The most complete connection string builder for SQL Server
Basic Settings
Keywords Explained with Synonyms
Keyword
|
Default
|
Description
|
---|---|---|
Application Name
App
|
N/A |
The application name identifies the specific application accessing the database. If no application name is provided, it defaults to .NET SQLClient Data Provider. |
ApplicationIntent | ReadWrite |
Determines the intended workload type for the application when connecting to the server. For more information on SqlClient support for Always On Availability Groups, see SqlClient Support for High Availability, Disaster Recovery. |
Asynchronous Processing
Async
|
false |
Setting this to
Starting from .NET Framework 4.5, this property is no longer considered. For more on SqlClient's asynchronous programming support, visit Asynchronous Programming.
|
AttachDBFilename
Extended Properties
Initial File Name |
N/A |
Specifies the primary database's file name, including the full path of an attachable database. Only applicable for primary data files with a .mdf extension.
When the If this key isn't specified and the database was previously attached, the previously attached database remains as the default.
If both the The path can be absolute or relative using the DataDirectory substitution string. Note that remote server, HTTP, and UNC path names aren't supported.
The database name must be specified with the keyword An error occurs if a log file exists in the same directory as the data file when attaching the primary data file. In such cases, remove the log file. Once the database is attached, a new log file is automatically generated based on the physical path. |
Authentication
Extended Properties
Initial File Name |
N/A |
The authentication method determines how to connect to SQL Database using Azure Active Directory Authentication. |
Column Encryption Setting
|
N/A |
Enables or disables Always Encrypted functionality for the connection. |
Connect Timeout
Connection Timeout
Timeout |
15 |
The length of time (in seconds) to wait for a connection to the server before terminating the attempt and generating an error.
When connecting to an Azure SQL Database, set the connection timeout to 30 seconds.
|
Connection Lifetime
Load Balance Timeout
|
0 |
When a connection is returned to the pool, its creation time is compared with the current time. If the time span (in seconds) exceeds the value specified by Connection Lifetime, the connection is destroyed. This is useful in clustered configurations to force load balancing between a running server and a server just brought online. A value of zero (0) sets pooled connections to have the maximum connection timeout. |
ConnectRetryCount
|
1 |
Controls the number of reconnection attempts after the client identifies an idle connection failure. Setting it to 0 disables connection resiliency. For additional information about connection resiliency, see SqlConnection parameters for connection retry and Technical Article - Idle Connection Resiliency. |
ConnectRetryInterval
|
10 |
Specifies the time between each connection retry attempt ( If the first reconnection attempt fails and For additional information about connection resiliency, see SqlConnection parameters for connection retry and Technical Article - Idle Connection Resiliency. |
Context Connection
|
false |
Indicates whether to establish an in-process connection to SQL Server. When set to true, a connection is made directly within the executing process, enabling the application or service to interact with the SQL Server database without involving external processes or intermediaries. |
Current Language
Language
|
N/A |
Sets the language used for database server warning or error messages. |
Data Source
Server
Address Addr Network Address |
N/A |
Specifies the name or network address of the SQL Server instance to connect to. The port number can be specified after the server name. The |
Encrypt
|
false |
Enables SSL encryption for data transmitted between the client and server if the server has a certificate installed. Recognized values are true, false, yes, and no. For more details, refer to the Connection String Syntax. Starting from .NET Framework 4.5, when |
Enlist
|
true |
When set to |
Failover Partner
|
N/A |
Specifies the name of the failover partner server where database mirroring is configured. If this key is set to an empty string, then the If you specify a failover partner but the server is not configured for database mirroring and the primary server is unavailable, the connection will fail. If you specify a failover partner and the primary server is not configured for database mirroring, the connection to the primary server will succeed if it's available. |
Database
Initial Catalog
|
N/A |
Specifies the name of the database. |
Integrated Security
Trusted_Connection
|
false |
When set to Recognized values are If SqlCredential provides a more secure way to specify credentials for a connection using SQL Server Authentication ( |
Max Pool Size
|
100 |
Specifies the maximum number of connections allowed in the pool. Values less than Min Pool Size will result in an error. |
Min Pool Size
|
0 |
Specifies the minimum number of connections allowed in the pool. Zero (0) means no minimum connections are initially opened. Values greater than Max Pool Size will result in an error. |
MultipleActiveResultSets
|
false |
When set to |
MultiSubnetFailover
|
false |
Always specify
|
Network Library
Network
Net
|
N/A |
Specifies the network library used to establish a connection to an instance of SQL Server. |
Packet Size
|
8000 |
Size in bytes of the network packets used to communicate with an instance of SQL Server. The packet size can be between 512 and 32768 bytes. |
Password
PWD
|
N/A |
The password for the SQL Server account logging on. Not recommended for maintaining high security. Instead, we strongly recommend using the Integrated Security or Trusted_Connection keyword. SqlCredential provides a more secure way to specify credentials for a connection using SQL Server Authentication. |
Persist Security Info
PersistSecurityInfo
|
false |
When set to |
Pool Blocking Period
|
Auto |
Sets the blocking period behavior for a connection pool. When connection pooling is enabled and a timeout error or other login error occurs, an exception will be thrown and subsequent connection attempts will fail for the next five seconds, the "blocking period". If the application attempts to connect within the blocking period, the first exception will be thrown again. Subsequent failures after a blocking period ends will result in a new blocking period that is twice as long as the previous blocking period, up to a maximum of one minute.
|
Pooling
|
true |
When set to Connections are considered the same if they have the same connection string. Different connections have different connection strings. |
Replication
|
false |
When set to |
Transaction Binding
|
Implicit Unbind |
Controls connection association with an enlisted Implicit Unbind causes the connection to detach from the transaction when it ends. After detaching, additional requests on the connection are performed in autocommit mode. The Explicit Unbind causes the connection to remain attached to the transaction until the connection is closed or an explicit |
Transparent Network IP Resolution
|
See description |
When set to true, the application retrieves all IP addresses for a particular DNS entry and attempts to connect with the first one in the list. If the connection is not established within 0.5 seconds, the application tries to connect to all others in parallel. When the first answers, the application establishes the connection with the respondent IP address. If Default values are:
|
Trust Server Certificate
|
false |
When set to |
Type System Version
|
N/A |
A string value indicating the type system the application expects. Functionality available to a client application depends on the SQL Server version and database compatibility level. Explicitly setting the type system version avoids potential problems that could cause an application to break with a different SQL Server version.
Note: Type system version cannot be set for common language runtime (CLR) code executing in-process in SQL Server. For more information, refer to SQL Server Common Language Runtime Integration.
|
User ID
|
N/A |
The SQL Server login account. Not recommended for maintaining security. It's strongly recommended to use Integrated Security or Trusted_Connection keywords instead. SqlCredential provides a more secure way to specify credentials for a connection using SQL Server Authentication. |
User Instance
|
false |
A value indicating whether to redirect the connection from the default SQL Server Express instance to a runtime-initiated instance running under the account of the caller. |
Workstation ID
|
The local computer name |
The name of the workstation connecting to SQL Server. |
Basic Settings
- Latest Version
- Microsoft JDBC Driver 12.6 for SQL Server
- Microsoft JDBC Driver 12.4 for SQL Server
- Microsoft JDBC Driver 12.2 for SQL Server
- Microsoft JDBC Driver 11.2 for SQL Server
- Microsoft JDBC Driver 10.2 for SQL Server
- Microsoft JDBC Driver 9.4 for SQL Server
- Microsoft JDBC Driver 9.2 for SQL Server
- Microsoft JDBC Driver 8.4 for SQL Server
- Microsoft JDBC Driver 8.2 for SQL Server
- Microsoft JDBC Driver 7.4 for SQL Server
- Microsoft JDBC Driver 7.2 for SQL Server
- Microsoft JDBC Driver 7.0 for SQL Server
- Microsoft JDBC Driver 6.4 for SQL Server
- Microsoft JDBC Driver 6.2 for SQL Server
- Microsoft JDBC Driver 6.1 for SQL Server
- Microsoft JDBC Driver 6.0 for SQL Server
- Microsoft JDBC Driver 4.2 for SQL Server