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.

PropertyDescription
SQL ServerRequired. 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)".
TCP/IP PortRequired 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 CatalogSpecifies the database or catalog to which you want to connect.
Application NameSpecifies 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.
If you are using ADO and do not specify an application name , Connection String Generator uses the default string '.NET SQLCLient Data Provider'.
Connection TimeoutSpecifies 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.
Encrypt DataEnables SLL encryption for all data sent between client and server. This option requires a certificate installed at the server.
Connect UsingSpecifies 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.

PropertyDescription
Use Connection PoolingEnables 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 SizeSpecifies the maximum number of connections available in the connection pool. This option is set to 100 by default.
Min Pool SizeSpecifies the minimum number of connections available in the connection pool. This option is set to 0 by default.
Connection LifetimeSpecifies 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 ConnectionSpecifies 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.

Property

Description

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.

Property

Description

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.

Current Language

Specifies the SQL Server Language record name.

Driver

Specifies the driver to be used for the connection.

Packet Size

Specifies the size in bytes of network packets sent between the client and server. This option is set to 8k by default.

Network Library

Specifies the network library used to establish the connection.

Workstation ID

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.

Asynchronous Processing

Enables asynchronous support. This option is disabled by default.

MARS Connection

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.

Enlist

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:

  1. Open the IDERA SQL Admin Toolset Launchpad, and then click Connection String.
  2. Specify the SQL Server instance to which you want to connect. This field is the only required field to generate a connection string.
  3. Specify any other options you want to include in your string, such as the default database, alternate credentials, or your application name.
  4. Click Test Connection to ensure you specified the correct options for the connection string.
  5. If the test connection is successful , copy the connection string to paste into your own code by clicking Copy to Clipboard.


IDERA |  Products | Purchase | Support |  Community |  Resources |  About Us  | Legal
  • No labels