PDB connect getting ORA-12518: TNS:listener error in Oracle 21c

ORA-12518: TNS:listener could not hand off client connection

Our CDB database is connected well but in PDB we are getting TNS: listener error

Error:

SQLPLUS sys@xepdb1 as sysdba
password:
ORA-12518, TNS:listener could not hand off client connection

Cause:

We tried to registry the PDB & CDB database the manually in listener.ora file which entry is wrong. Our CDB database is working fine but PDB has issue. Check the wrong entry in following listener.ora file:

SID_LIST_LISTENER =

  (SID_LIST =

    (SID_DESC =

      (SID_NAME = xepdb1)             --- Wrong Entry

      (ORACLE_HOME = C:\app\oracle\product\21c\dbhomeXE)

      (GLOBAL_DBNAME = xepdb1)          

    )

    (SID_DESC =

      (SID_NAME = XE)

      (ORACLE_HOME = C:\app\oracle\product\21c\dbhomeXE)

      (GLOBAL_DBNAME = xe)

    )

Solution:

we use Instance SID NAME as XEPDB1 which is wrong entry due to Container database. The container database XE has the instance name XEPDB1. PDB instance_name ‘XEPDB1’ in the CDB instance_name ‘XE’.

Correct entry in listener.ora file:

SID_LIST_LISTENER =

  (SID_LIST =

    (SID_DESC =

      (SID_NAME = xe)             ---Correct it as CDB Name

      (ORACLE_HOME = C:\app\oracle\product\21c\dbhomeXE)

      (GLOBAL_DBNAME = xepdb1)        ---PDB Name  

    )

    (SID_DESC =

      (SID_NAME = XE)

      (ORACLE_HOME = C:\app\oracle\product\21c\dbhomeXE)

      (GLOBAL_DBNAME = xe)

    )

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.