Connection failure to a multitenant Oracle database

When attempting to connect to a Pluggable Database using the wrong SID notation instead of the required service notation, the following error occurs:

ORA-12505, TNS:listener does not currently know of SID given in connect descriptor.

Check the connect string and make sure it complies with the service notation which uses a slash (instead of a colon that is only used in SID notation):

jdbc:oracle:thin:@DB_HOST:DB_PORT/pdbname

Alternatively, you can configure the listener to also support the SID notation for a service. Edit the “$ORACLE_HOME/network/admin/listener.ora” file and add the following entry, where you replace the part “listener” with the name of your listener:

USE_SID_AS_SERVICE_listener=on

Then reload or restart the listener:

$ lsnrctl reload

For related information see [IG Oracle] .