I want to connect Oracle DB.
My .ora :
AUTACSRV120000, AUTACSRV120000.world =
(DESCRIPTION =
(ADDRESS_LIST =
(FAILOVER = ON)
(LOAD_BALANCE = OFF)
(ADDRESS = (PROTOCOL = TCP)(HOST = infra-dbaas01.noe.rct.fr)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = infra-dbaas02.pcy.rct.fr)(PORT = 1521))
)
(LOAD_BALANCE = YES)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = AUTAC_fes.dbaas.rct.fr)
)
When i want to connect i use
jdbc:oracle:thin:@AUTACSRV120000, AUTACSRV120000.world
result :
Exception in thread "main" java.sql.SQLRecoverableException: Erreur d'E/S: Inval
id connection string format, a valid format is: "host:port:sid"
But if i edit .ora to
AUTACSRV120000 =
(DESCRIPTION =
(ADDRESS_LIST =
(FAILOVER = ON)
(LOAD_BALANCE = OFF)
(ADDRESS = (PROTOCOL = TCP)(HOST = infra-dbaas01.noe.rct.fr)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = infra-dbaas02.pcy.rct.fr)(PORT = 1521))
)
(LOAD_BALANCE = YES)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = AUTAC_fes.dbaas.rct.fr)
)
and use
jdbc:oracle:thin:@AUTACSRV120000
The connection is OK
I do not have the right to leave the file edit.