How to resolve "ORA-12505 :TNS listener does not currently know of SID given in connect descriptor" while connecting to Oracle in TIBCO Data Virtualization?

How to resolve "ORA-12505 :TNS listener does not currently know of SID given in connect descriptor" while connecting to Oracle in TIBCO Data Virtualization?

book

Article ID: KB0070013

calendar_today

Updated On:

Products Versions
TIBCO Data Virtualization All Supported Versions

Description

Users may encounter the below error message when connecting to the Oracle database from TIBCO Data Virtualization.

 Unable to connect to data source "<data source path>" at ":1521@" with the supplied connection information.  [datasrc-3961050] Listener refused the connection with the following error: ORA-12505, TNS:listener does not currently know of SID given in connect descriptor

The above error can be seen due to the incorrect connection string being used while connecting to the Oracle Database. When connecting to an Oracle RAC Database using the service_name and not sid, we should be using '/' after the PORT when trying to connect to an Oracle RAC Database using service_name otherwise we will get the above error. Below is an example of JDBC connection string from Oracle:

Example connection strings:

Oracle database (non-RAC)

For an Oracle database (non-RAC) the connect string must have the following format:

 jdbc:oracle:thin:@[host]:[port]:[sid]


For example: jdbc:oracle:thin:@myhost.us.example.com:1521:prod


Oracle RAC database

To connect to an Oracle RAC database, use the following format:

 jdbc:oracle:thin:@//<host>[:<port>]/<service_name>


For example: jdbc:oracle:thin:@//myhost.example.com:1521/my_service

More details are mentioned here -> https://docs.oracle.com/middleware/12211/bip/BIPAD/GUID-FB2AEC3B-2178-48DF-8B9F-76ED2D6B5194.htm#BIPAD289

Issue/Introduction

This article explains the steps to resolve "ORA-12505:TNS listener does not currently know of SID given in connect descriptor" while connecting to Oracle in TIBCO Data Virtualization.

Environment

All Supported Environments

Resolution

To resolve this error, follow the below steps:

1. In TDV Studio's configuration tab for the data source, select the Advanced tab under "Connection Information".
2. On the Connection URL pattern, change the ":" between PORT and DATABASE_NAME to "/" as given below:

Change the below:
User-added image
To:
User-added image

3. Test the connection to ensure the connection works and save the changes.

Additional Information