ServiceRelocationConnectionTimeout

This property specifies the time, in seconds, for the particular OracleConnection to wait before retrying connecting to a service that becomes unavailable.

Declaration

// C#
public string ServiceRelocationConnectionTimeout { get; set;}

Property Type

System.String

Exceptions

System.ObjectDisposedException - This property cannot be accessed after the OracleConnection object is already disposed.

FormatException - The provided string cannot be converted to a System.Int32.

OverflowException - The provided string represents a number that is less than System.Int32.MinValue or greater than System.Int32.MaxValue.

Remarks

Default value is 90 (seconds).

Whenever a database service becomes unavailable, such as due to a service being relocated, an application can encounter numerous connectivity errors during this time. To avoid unnecessary connection attempts to an unavailable service which will result in an error, the driver will block any connection attempts until the service is up or until this property's specified time limit expires from the time when the service DOWN event was received, whichever comes first.

ServiceRelocationConnectionTimeout itself can be set based upon the value of drain_timeout. For example, if ODP.NET administrators desire the service relocation connection timeout to be drain_timeout plus 50 seconds, then they would set ServiceRelocationConnectionTimeout in the following manner:

//C#
OracleConnection conn = new OracleConnection();
conn.ServiceRelocationConnectionTimeout = "drain_timeout + 50";

The ServiceRelocationConnectionTimeout property can be configured on OracleConnection and OracleConfiguration objects. By default, OracleConnection ServiceRelocationConnectionTimeout property value inherits OracleConfiguration ServiceRelocationConnectionTimeout property value at construction time. The value of OracleConnection ServiceRelocationConnectionTimeout will be used during the connection.