In this Document
APPLIES TO
Oracle Net Services - Version 12.1.0.1 and later
Information in this document applies to any platform.
SYMPTOMS
As an example, Client connection
string
uses the “SID” value to connect to a database instance.
So:
1 | |
However, the database is changed to a pluggable database (PDB so Multi-Tenant functionality) and the client connection now fails with ORA-12505.
1 | |
CHANGES
The TEST database is now a PDB. Connections to a pluggable database use SERVICE_NAME and not SID.
CAUSE
A PDB is not an instance.
So using a SID parameter in the connection string will not work unless the following
listener
.ora file setting is put in place:
USE_SID_AS_SERVICE_LISTENER = ON
When the database is an
Oracle Database
12c container database, the client must specify a service name in order to connect to it.
Listener status shows as only a Service and not an Instance, with the Instance being the CDB (Container Database):
1 | |
SOLUTION
Set the following control parameter in the listener.ora file and restart the listener:
USE_SID_AS_SERVICE_<listener_name> = ON
This will enable the system identifier (SID) in the connect descriptor to be interpreted as a service name when a user attempts a database connection.
Database
clients
with earlier releases of Oracle Database that have hard-coded connect descriptors can use this parameter to connect to a container or pluggable database.
Example of usage in listener.ora:
1 | |
The connection will work after this change or you will progress to the next logical
issue
:
1 | |
The listener will interpret the value for SID=TEST as SERVICE_NAME=TEST and allow the connection.
- Otherwise, modify the client connection string to use the a SERVICE_NAME field to match the actual PDB service name instead of the SID field :
1 | |



