Use SID to connect to PDB(Pluggable database) in 12c
Today I came across a situation , my client has an old application which can use only SID to connect to the database. But the database is 12c and the database he is trying to connect is PDB.
In 12c we can not connect to the PDB using the SID, we have to use the service name. But for the sake of this old applications oracle created a parameter “USE_SID_AS_SERVICE_LISTENER” by which oracle interprets the SID to SERVICENAME.
Add the parameter “USE_SID_AS_SERVICE_LISTENER” in listener.ora like below.
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = orcl.oracle.com) (PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
)
USE_SID_AS_SERVICE_LISTENER=ON
Restart the listener
lsnrctl stop
lsnrctl start
Now we can connect to the PDB using the service name as SID.