Oracle can use two environment variables to specify default connections: ORACLE_SID and TWO_TASK.
To use them, specify either a local SID or service name, or a service name that is specified in the TNSNAMES. Note that if you have *both* local and remote databases, and you have ORACLE_SID *and* TWO_TASK set, and you don't specify a fully qualified connect string on the command line, TWO_TASK takes precedence over ORACLE_SID (i.e. It is highly recommended not to rely on environment variables and to always explicitly specify the SID in the connection string.
OCI_FO_BEGIN indicates that failover has detected a lost connection and failover is starting.
The ORA_OCI constant holds the result of that process. This method creates a database handle by connecting to a database, and is the DBI equivalent of the "new" method.In general, the value used should match the version of Oracle that was used to build DBD:: Oracle.If using dynamic linking then ORACLE_HOME should match the version of Oracle that will be used to load in the Oracle client libraries (via LD_LIBRARY_PATH, ldconfig, or similar on Unix).You can name it anything you want and it will always be passed two parameters, the failover event value and the failover type.You can also set a sleep value in case of failover error and the OCI client will sleep for the specified seconds before it attempts another event.