Enabling Cluster Edition connection failover

Using the OLEDB user interface

One way to enable the extended connection failover in Adaptive Server OLE DB Provider is through its user interface.

StepsUsing the user interface to enable extended failover

  1. Open the Configure Data Source dialog box of the Sybase Datasource Administrator.

  2. Go to the Connection tab.

  3. Select Enable High Availability.

  4. Optionally, enter the alternate servers and ports in the Alternate Servers field using the format:

    server1:port1,server2:port2,...,serverN:portN;
    

OLE DBIn establishing a connection, the Adaptive Server Provider first attempts to connect to the primary host and port defined in the General tab of the Configure Data Source dialog box. If the Adaptive Server OLE DB Provider fails to establish a connection, OLE DB goes through the list of hosts and ports specified in the Alternate Servers field.

Using the OLEDB connection string

You can also use the OLE DB connection string to enable extended failover by setting the HASession connection string property to 1. For example:

Provider=ASEOLEDB;User ID=sa;Password=;
InitialCatalog=sdc;Data Source=server1:port1;
ProviderString='HASession=1;AlternateServers=
server2:port2,...,serverN:portN';

In the preceding example, Data Source defines the primary server and port. The Adaptive Server OLE DB Provider attempts to establish connection to the primary server first. If unsuccessful, and alternate servers are defined, OLE DB goes through the servers listed in the Alternate Servers field until a connection is established or until the end of the list is reached.

NoteThe list of alternate servers specified in the GUI or the connection string is used only during initial connection. After the connection is established with any available instance and the client supports high availability, the client receives an updated list of the best possible failover targets from the server. This new list overrides the specified list.