The Connection String Generator tool helps you build a SQL connection string, eliminating the need to research and memorize all the available options. Connection String Generator creates a ready-to-use connection string that allows a third-party application to connect to a SQL Server instance. Each generated connection string contains only those options you selected, arranged in the correct order with the correct syntax.
The Connection String Generator puts all the connection string options at your fingertips. Simply specify the desired options and the tool automatically builds the corresponding connection string. Once you build the connection string, you can test it within the tool and then copy it to your code.
How the Connection String Generator tool works
The Connection String Generator offers over 40 editable connection string options to build your custom string. The following table includes the basic connection string options available when using the Connection String Generator tool.
Required. Specifies the name or network address of the SQL Server instance to which you want to connect. To specify a local unnamed instance, type "(local)".
Required when the target SQL Server does not use the default port of 1433. Specifies the port on which the SQL Server listens.
Database or Initial Catalog
Specifies the database or catalog to which you want to connect.
Specifies the name of the application that you want to connect to the SQL Server instance. Use this option to identify your application in audit trails.
Specifies the amount of time in seconds you want to wait before the connection times out due to a failure or error. This option is set to 15 seconds by default.
Enables SLL encryption for all data sent between client and server. This option requires a certificate installed at the server.
Specifies the credentials to use when connecting to the SQL Server instance. Choosing Windows authentication use the current Windows login credentials whereas choosing SQL authentication lets you specify a SQL login and password.
The following table includes the connection pooling options available when using the Connection String Generator tool.
Use Connection Pooling
Enables connection pooling. When enabled, the connection is drawn from the pool or created and added to the pool. This option is enabled by default.
Max Pool Size
Specifies the maximum number of connections available in the connection pool. This option is set to 100 by default.
Min Pool Size
Specifies the minimum number of connections available in the connection pool. This option is set to 0 by default.
Specifies the lifetime of a connection in seconds. This option indicates whether the connection is destroyed or kept alive when returned to the connection pool. Specifying 0 gives the connection the maximum allowed timeout.
Reset Database Connection
Specifies whether the connection is reset when drawn from the connection pool.
The following table includes the client network library options available when using the Connection String Generator.
Client Network Library
Specifies alternate network protocols to use during the connection. Named pipes is used by default.
The following table includes the advanced connection string options available when using the Connection String Generator.
Attach DB File Name
Specifies the full path for the primary database file of the database. This option ensures that the database is attached before making the connection.
Specifies the SQL Server Language record name.
Specifies the driver to be used for the connection.
Specifies the size in bytes of network packets sent between the client and server. This option is set to 8k by default.
Specifies the network library used to establish the connection.
Specifies the name of the workstation connecting to the SQL Server instance.
Database Mirroring Fail Over Partner
Specifies the name of the fail over partner server used for database mirroring.
Enables asynchronous support. This option is disabled by default.
Enables the ability to an application to maintain multiple active result sets. This option is available for .NET version 2.0 and above only.
Persist Security Info
Enables returning security-sensitive information, such as a password, returned as part of the connection if the connection is open or is ever open.
Enables the SQL Server connection pooler to automatically enlist the connection in the current transaction of the creation thread.
Use the Connection String Generator tool
To generate a connection string:
- Open the Idera SQL Admin Toolset Launchpad, and then click Connection String.
- Specify the SQL Server instance to which you want to connect. This field is the only required field to generate a connection string.
- Specify any other options you want to include in your string, such as the default database, alternate credentials, or your application name.
- Click Test Connection to ensure you specified the correct options for the connection string.
- If the test connection is successful, copy the connection string to paste into your own code by clicking Copy to Clipboard.
SQL Admin Toolset delivers 24 essential administration tools. Learn more > >