Panadroid
asked on
Configuring one listener for two databases?
I have two databases in my server and I want to use one listener for both of them. I have done some configurations and so far it's more or less working but something must be wrong because if I do a tnsping for one of the databases in the admin folder it works:
-------------------------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- --
C:\app\Cris\product\11.2.0 \dbhome_1\ NETWORK\AD MIN>tnspin g testorcl
TNS Ping Utility for 64-bit Windows: Version 11.2.0.1.0 - Production on 22-JUN-2
015 14:17:50
Copyright (c) 1997, 2010, Oracle. All rights reserved.
Parameterdateien benutzt:
C:\app\Cris\product\11.2.0 \dbhome_2\ network\ad min\sqlnet .ora
Adapter TNSNAMES zur Auflösung des Alias benutzt
Verbindungsversuch mit (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP
)(HOST = CRIS-WS)(PORT = 1521))) (CONNECT_DATA = (SID_NAME = OUC) (SERVICE_NAME =
ORCL.168.1.205)))
OK (0 ms)
-------------------------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- --
Buuuuuuuuut if I do a tnsping for the same database outside this folder [C:\app\Cris\product\11.2. 0\dbhome_1 \NETWORK\A DMIN] it does not work. Example:
-------------------------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- --
C:\>tnsping testorcl
TNS Ping Utility for 64-bit Windows: Version 11.2.0.1.0 - Production on 22-JUN-2
015 14:15:25
Copyright (c) 1997, 2010, Oracle. All rights reserved.
Parameterdateien benutzt:
C:\app\Cris\product\11.2.0 \dbhome_2\ network\ad min\sqlnet .ora
Adapter HOSTNAME zur Auflösung des Alias benutzt
Verbindungsversuch mit (DESCRIPTION=(CONNECT_DATA =(SERVICE_ NAME=))(AD DRESS=(PRO T
OCOL=TCP)(HOST=202.202.236 .10)(PORT= 1521)))
TNS-12541: TNS: Kein Listener
-------------------------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- --
When I do tnsping for the second database it works no matter in which folder I'm in.
Does anybody have any idea what could be wrong, please help me!
--------------------------
C:\app\Cris\product\11.2.0
TNS Ping Utility for 64-bit Windows: Version 11.2.0.1.0 - Production on 22-JUN-2
015 14:17:50
Copyright (c) 1997, 2010, Oracle. All rights reserved.
Parameterdateien benutzt:
C:\app\Cris\product\11.2.0
Adapter TNSNAMES zur Auflösung des Alias benutzt
Verbindungsversuch mit (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP
)(HOST = CRIS-WS)(PORT = 1521))) (CONNECT_DATA = (SID_NAME = OUC) (SERVICE_NAME =
ORCL.168.1.205)))
OK (0 ms)
--------------------------
Buuuuuuuuut if I do a tnsping for the same database outside this folder [C:\app\Cris\product\11.2.
--------------------------
C:\>tnsping testorcl
TNS Ping Utility for 64-bit Windows: Version 11.2.0.1.0 - Production on 22-JUN-2
015 14:15:25
Copyright (c) 1997, 2010, Oracle. All rights reserved.
Parameterdateien benutzt:
C:\app\Cris\product\11.2.0
Adapter HOSTNAME zur Auflösung des Alias benutzt
Verbindungsversuch mit (DESCRIPTION=(CONNECT_DATA
OCOL=TCP)(HOST=202.202.236
TNS-12541: TNS: Kein Listener
--------------------------
When I do tnsping for the second database it works no matter in which folder I'm in.
Does anybody have any idea what could be wrong, please help me!
ASKER
Yes
This is the tnsnames.ora for the first database
C:\app\Cris\product\11.2.0 \dbhome_1\ NETWORK\AD MIN>
TESTORCL =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = CRIS-WS)(PORT = 1521))
)
(CONNECT_DATA =
(SID_NAME = OUC)
(SERVICE_NAME = ORCL.168.1.205)
)
)
This is my tnsnames.ora for the second database:
C:\app\Cris\product\11.2.0 \dbhome_2\ NETWORK\AD MIN>
ORCLWE8 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = CRIS-WS)(PORT = 1521))
)
(CONNECT_DATA =
(SID_NAME = OWE8)
(SERVICE_NAME = ORCLWE8)
)
)
And the listener.ora:
C:\app\Cris\product\11.2.0 \dbhome_1\ NETWORK\AD MIN>
# listener.ora Network Configuration File: c:\app\Cris\product\11.2.0 \dbhome_1\ NETWORK\AD MIN\listen er.ora
# Generated by Oracle configuration tools.
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS =
(PROTOCOL = TCP)
(HOST = CRIS-WS)
(PORT = 1521)
)
)
)
)
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = orcl.168.1.205)
(ORACLE_HOME = c:\app\Cris\product\11.2.0 \dbhome_1)
(SID_NAME = OUC)
)
(SID_DESC =
(GLOBAL_DBNAME = orclwe8)
(ORACLE_HOME = c:\app\Cris\product\11.2.0 \dbhome_1)
(SID_NAME = OWE8)
)
)
This is the tnsnames.ora for the first database
C:\app\Cris\product\11.2.0
TESTORCL =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = CRIS-WS)(PORT = 1521))
)
(CONNECT_DATA =
(SID_NAME = OUC)
(SERVICE_NAME = ORCL.168.1.205)
)
)
This is my tnsnames.ora for the second database:
C:\app\Cris\product\11.2.0
ORCLWE8 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = CRIS-WS)(PORT = 1521))
)
(CONNECT_DATA =
(SID_NAME = OWE8)
(SERVICE_NAME = ORCLWE8)
)
)
And the listener.ora:
C:\app\Cris\product\11.2.0
# listener.ora Network Configuration File: c:\app\Cris\product\11.2.0
# Generated by Oracle configuration tools.
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS =
(PROTOCOL = TCP)
(HOST = CRIS-WS)
(PORT = 1521)
)
)
)
)
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = orcl.168.1.205)
(ORACLE_HOME = c:\app\Cris\product\11.2.0
(SID_NAME = OUC)
)
(SID_DESC =
(GLOBAL_DBNAME = orclwe8)
(ORACLE_HOME = c:\app\Cris\product\11.2.0
(SID_NAME = OWE8)
)
)
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
So you are calling two different tnsping's which is using two different tnsnames.ora files.