Document toolboxDocument toolbox

Configuring for Oracle Fail Over

If the Oracle DBMS has been configured to use fail over technology then ServiceManager must be configured appropriately in order to leverage this capability. The default connection string for the Oracle JDBC driver is jdbc:oracle:thin::host:port:service_name but this format does not work for fail over scenarios. The following changes are required:

The Oracle JDBC driver supplied within ServiceManager allows the specification of the connection URL to contain all of the information associated with the desired Net Service Name (TWO_TASK) within the TNSNAMES.ORA file.

For example, if the tnsnames entry were:

spower_01 = 
  (DESCRIPTION = 
    (ADDRESS_LIST = 
      	(load_balance=on) 
      	(failover=on) 
      	(ADDRESS = (PROTOCOL= TCP)(HOST = spdb_01)(PORT = 1555)) 
		(ADDRESS = (PROTOCOL= TCP)(HOST = spdb_02)(PORT = 1555)) 
    ) 
    (CONNECT_DATA = 
      (SERVICE_NAME = spower) 
      (FAILOVER_MODE= 
        (TYPE=select) 
        (METHOD=BASIC) 
        (RETRIES=60) 
        (DELAY=5)) 
    ) 
  )

Then the JDBC connection URL would be:

jdbc:oracle:thin@(DESCRIPTION=(ADDRESS_LIST=(load_balance=on)
(failover=on)(ADDRESS=(PROTOCOL=TCP)(HOST=spdb_01)(PORT=1555))
(ADDRESS=(PROTOCOL=TCP)(HOST=spdb_02)(PORT=1555)))
(CONNECT_DATA=(SERVICE_NAME=spower)(FAILOVER_MODE=(TYPE=select)
(METHOD=BASIC)(RETRIES=60)(DELAY=5))))

(Note that the above connection string must be contained on a single line within the hibernate.cfg.xml file).

 

 

 

 

Â