Empezaremos con algo sencillo de Oracle, cómo configurar el cliente Oracle instalado en tu equipo para conectar con varios servidores de Oracle, aunque sean de versiones de Oracle diferentes.
Si ya lo has instalado, y estas trabajando contra un servidor de Oracle solo tienes que añadir líneas de configuración en los ficheros listener.ora y tsnames.ora como en los siguientes ejemplos:
listener.ora
# listener.ora Network
Configuration File:
/u01/app/oracle/product/10.2.0/db_1/network/admin/listener.ora
# Generated by Oracle configuration tools.
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME =
/u01/app/oracle/product/10.2.0/db_1)
(PROGRAM = extproc)
)
(SID_DESC =
(GLOBAL_DBNAME = db1)
(ORACLE_HOME =
/u01/app/oracle/product/10.2.0/db_1)
(SID_NAME = db1)
)
(SID_DESC =
(GLOBAL_DBNAME = db2)
(ORACLE_HOME =
/u01/app/oracle/product/11.2.0/db_home1)
(SID_NAME = db2)
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY =
EXTPROC1))
(ADDRESS = (PROTOCOL = TCP)(HOST =
10.192.228.87)(PORT = 1521))
)
)
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY =
EXTPROC1))
(ADDRESS = (PROTOCOL = TCP)(HOST =
10.192.228.114)(PORT = 1521))
)
)
tnsnames.ora
# tnsnames.ora Network Configuration File:
/u01/app/oracle/product/10.2.0/db_1/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.
ORACLE =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.192.228.114)(PORT
= 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = db2)
)
)
ORCL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.192.228.87)(PORT
= 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = db1)
)
)
EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY =
EXTPROC1))
)
(CONNECT_DATA =
(SID = PLSExtProc)
(PRESENTATION = RO)
)
)