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)

    )
This entry was posted in Oracle on by .
Unknown's avatar

About SandeepSingh

Hi, I am working in IT industry with having more than 15 year of experience, worked as an Oracle DBA with a Company and handling different databases like Oracle, SQL Server , DB2 etc Worked as a Development and Database Administrator.

Leave a Reply