RetryConnectionTimeout (RetryConnTO) connection parameter

Instructs the client library (DBLIB, ODBC, ADO, and so on) to keep retrying the connection attempt, as long as the server is not found, for the specified period of time.

Syntax

{ RetryConnectionTimeout | RetryConnTO }=timeout-value

Usage

Anywhere

Allowed values

Default

0

Remarks

There is a half-second delay between iterations, and the retries only occur if the connection attempt failed because the database server was not found. Any other error is returned immediately. If the database server is not found, the connection attempt will take at least as long as the time specified by the RetryConnectionTimeout connection parameter.

The default TCP timeout is 5 seconds, so if your connection string contains a value for RetryConnTO that is less than 5, for example Host=host-name;RetryConnTO=3, then the connection attempt still takes 5 seconds.

Example

The following connection string fragment tells the client library to continue to retry the connection attempt for at least 5 seconds:

...RetryConnTO=5;...