PowerBuilder 8.0 and 9.0  -  FailOver support for Oracle 8i/9i Database Server

This document contains guidelines for setting the database parameter in the transaction object of a PowerBuilder application for Oracle 8i/9i database failover and also for configuring the Oracle client TNSNAMES.ORA file for failover.

In PowerBuilder, the enhanced Oracle database interface driver "O84 Oracle8/8i (8.x.4+)" and "O90 Oracle9i" now supports PowerBuilder application failover when connecting to an Oracle 8i/9i database server (version 8.1.5 and higher). There are four DBParms in PowerBuilder for Oracle that allow you to customize failover behavior for Oracle 8i/9i databases. These DBParms are set via the Network tab in the Oracle8i/9i database profile.

Oracle Database profile:
        SQLCA.DBMS = "O84 Oracle8/8i (8.x.4+)" // or "O90 Oracle 9i"
        SQLCA.LogId = "scott"
        SQLCA.LogPass = "tiger"
        SQLCA.ServerName = "sales"
        SQLCA.DBParm = "SvrFailover='Yes',FoDialog='Yes',FoRetryCount=10,FoDelay=10"

SvrFailover: Specifies whether you want PowerBuilder to recognize and participate in failover to a designated backup database server if the current database server goes down.

FoDialog:     Select to display runtime dialog when failing over. Specifies whether PowerBuilder displays a runtime dialog box indicating when a failover occurs.

FoRetryCount: Specifies the number of times you want PowerBuilder to try to fail over to an another database server if the current database server goes down.

FoDelay:     Specifies the amount of time (in milliseconds) you want PowerBuilder to wait between attempts to failover to another database server if the current database server goes down.

None of the above four database parameters can be set dynamically. These values used when establishing the database connection remain until disconnected from the database.

Oracle Connect-Time Failover:

The application database connect request is forwarded to a another listener if the first database listener is not responding. Connect-time failover is enabled by database instance registration, because the listener knows if an instance is up prior to attempting a connection.

When connect-time failover is enabled, Oracle Net Service is instructed at connect time to fail over to a different listener if the first listener fails when set to ON. The number of addresses in the list determines how many addresses are tried. When set to OFF, failover is Oracle Net Service tries one address. Connect-time failover is turned ON by default for multiple address lists (ADDRESS_LIST), connect descriptors (DESCRIPTION), and multiple connect descriptors (DESCRIPTION_LIST).

The TNSNAMES.ORA file need to be configured for connect-time failover listing each database address, in order, that should be tried until one succeeds:
sales=
    (description=
        (address_list=
            (failover=on)
                (address=(protocol=tcp)(host=sales-pc)(port=1521))
                (address=(protocol=tcp)(host=finance-pc)(port=1521))
        )
        (connect_data=(service_name=sales.com))
    )

If the client application database connection through one instance to the database is broken, you can write applications to automatically reconnect through a different instance. See Oracle Documentation:  Net8 Administrator's Guide or Oracle 9i Net Services Administrator's Guide - Configuring Multiple Address Options for more information.