Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

PDB or CDB allowing connection only on port 1521

User_WOK5SJan 6 2017 — edited Feb 17 2017

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)

    )

  )

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 17 2017
Added on Jan 6 2017
17 comments
3,584 views