Connection string to Oracle pluggable database

Hi,

I’m trying to connect to an Oracle pluggable database - is there anything special to that compared to connecting to a non-pluggable Oracle instance?

The reason I’m asking this is that I can connect ok to a non-pluggable database from Dreamfactory but the same approach in connection string doesn’t appear to work with pluggable.

This connection string works:
non-pluggable database (example)
oci:dbname=(description=address_list=(address=(protocol=tcp)(hots=localhost)(port=1521)))(connect_data=(sid=x)))

But the same doesn’t appear to work with a pluggable database?

Is there is a difference in the connection string syntax or should I start to search for the reason elsewhere? I can connect to the same pluggable databse using other tools (e.g. JDeveloper) and thin client connection.


Update: Oracle Pluggable databases dont support (directly) SID’s. This can be however achieved by adding to the LISTENER.ORA file the following line: USE_SID_AS_SERVICE_LISTENER=on

I did find this from http://oracleinaction.com/12c-use_sid_as_service_listener_name/

When testing it from JDeveloper this did the trick when using thin client. Using oci received and error of x32 vs x64 mismatch in the client - need to check that out next.

Update 2: having the right version (x32) of instantclient made things to work.


Thanks,
M

2 Likes

Thanks for detailing your troubleshoot. Glad you got it working!