Service Virtualization

 View Only

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

Jun 02, 2017 10:26 AM

Issue

 

1. Have JDBC step where I am making a call to an Oracle database with the Connection String of:

 

jdbc:oracle:thin:@{{SERVER}}:1521:{{SIDNAME}

 

2. When I test I get the error:


2017-06-01 21:44:26,341Z (14:44) [AWT-EventQueue-0] ERROR com.itko.util.swing.UserMessage - There was a SQLException: java.sql.SQLException: Listener refused the connection with the following error:
ORA-12505, TNS:listener does not currently know of SID given in connect descriptor

java.sql.SQLException: Listener refused the connection with the following error:
ORA-12505, TNS:listener does not currently know of SID given in connect descriptor

 

Environment

 

All supported DevTest releases and platforms.

 

Cause

 

Connection string was formatted improperly.

 

Resolution

 

Used SQuirrel SQL Client to verify Oracle JDBC Connection String and getting the same error.


Realized needing to be making the Oracle JDBC call to the SERVICE and not the SID.


The format of the Connection String is different between calling the SID and calling the SERVICE.


Once the connection string was changed to call the SERVICE, the call was successful:

 

jdbc:oracle:thin:@{{SERVER}}:1521/{{SERVICENAME}

 

Additional Information

 

You can refer to the site.properties file for how to format a JDBC Connection String depending on the database you are calling from a SQL Database Execution (JDBC) step.

Statistics
0 Favorited
8 Views
0 Files
0 Shares
0 Downloads

Tags and Keywords

Related Entries and Links

No Related Resource entered.