Hello,
I created 2 listeners : 1 for my CDB and one for 1 PDB
Both listeners start without issue. When doing tnsping on both listener, the reply is OK. netstats shows the ports are both in listen mode.
Problem : CDB listener is on port 1521 and PDB listener is on port 1523. When I try to connect to the PDB (after opening it in a prior connection to the CDB), it says :
ORA-12514: TNS:listener does not currently know of service requested in connect descriptor
The strange thing is that when I change the port number on the PDB listener (and tnsnames) to 1521 it works and I'm able to connect to the PDB.
The same thing happens when I switch roles i.e. CDB on 1523 and PDB on 1521 in which case only PDB allow connection but CDB does allow connection and shows the above error message
Why won't both descriptor work on their dedicated ports instead of just port 1521 ?
What am I missing ?
ps : netstat ans ps are showing that everything is fine though .....(listeners are started ; ports are in mode LISTEN whether 1521 or not)
Below are my settings :
environment variales :
ORACLE_HOSTNAME=fedora.dbaora.com
ORACLE_UNQNAME=ORA12C
ORACLE_BASE=/ora01/app/oracle
ORACLE_HOME=$ORACLE_BASE/product/12.1.0/db_1
ORACLE_SID=ORA12C
listener.ora
ORA12C = #CDB listener
(ADDRESS_LIST=
(ADDRESS=(PROTOCOL=tcp)(HOST=fedora.dbaora.com)(PORT=1521))
)
SID_LIST_ORA12C=
(SID_LIST=
(SID_DESC=
(SID_NAME=ora12c)
(ORACLE_HOME=/ora01/app/oracle/product/12.1.0/db_1)
)
)
PORA12C1 = #PDB listener
(ADDRESS_LIST=
(ADDRESS=(PROTOCOL=tcp)(HOST=fedora.dbaora.com)(PORT=1523))
)
SID_LIST_PORA12C1=
(SID_LIST=
(SID_DESC=
(SID_NAME=ora12c)
(ORACLE_HOME=/ora01/app/oracle/product/12.1.0/db_1)
)
)
tnsnames.ora
ORA12C = #CDB descriptor
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = fedora.dbaora.com)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = ORA12C.dbaora.com)
)
)
PORA12C1 = #PDB descriptor
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = fedora.dbaora.com)(PORT = 1523))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = pora12c1.dbaora.com)
)
)