JDBC Database URL when using failover servers with Oracle / Oracle RAC

JDBC Database URL when using failover servers with Oracle / Oracle RAC

book

Article ID: KB0081080

calendar_today

Updated On:

Products Versions
Spotfire Server All Versions

Description

Information about how to write the connection URL when using fallback (failover, clustering, clustered) servers for the Spotfire database. This only applies to Oracle databases (Oracle RAC (Real Application Clusters)). 

Issue/Introduction

How to enter a JDBC connection string for Oracle when using failover servers

Environment

Spotfire Server with Oracle database

Resolution

When creating the bootstrap use the following formats for the JDBC connection string.

Case 1: When using tibcosoftwareinc.jdbc.oracle.OracleDriver driver (Oracle (DataDirect)), JDBC URL field should contain:
jdbc:tibcosoftwareinc:oracle://<myhost1>:<myport1>SID=<myservice1>AlternateServers=(<myhost2>:<myport2>SID=<myservice2>)

Example URL:
jdbc:tibcosoftwareinc:oracle://host1:1521;ServiceName=orcl;AlternateServers=(host2:1521)

Case 2: When using oracle.jdbc.driver.OracleDriver (the native driver form Oracle), the JDBC URL field should contain:
jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=<myhost1>)(PORT=<myport1>))(SERVICE_NAME=<myservice1>))(ADDRESS=(PROTOCOL=TCP)(HOST=<myhost2>)(PORT=<myport2>))(LOAD_BALANCE=yes)(CONNECT_DATA=(SERVICE_NAME=<myservice2>)(FAILOVER_MODE=(TYPE=SELECT)(METHOD=BASIC)(RETRIES=180))))

Example URL:
jdbc:oracle:thin:@(DESCRIPTION=(LOAD_BALANCE=on)(ADDRESS=(PROTOCOL=TCP)(HOST=host1) (PORT=1521))(ADDRESS=(PROTOCOL=TCP)(HOST=host2) (PORT=1521))(CONNECT_DATA=(SERVICE_NAME=orcl)))

See more information in Oracle's documentation.

Additional Information

Oracle documentation: Configuring Fast Connection Failover for JDBC Clients