Oracle Error: "ORA-12505 Connection refused, the specified SID (;SID_NAME;) was not recognized by the Oracle server while connecting to Oracle Database".

Oracle Error: "ORA-12505 Connection refused, the specified SID (;SID_NAME;) was not recognized by the Oracle server while connecting to Oracle Database".

book

Article ID: KB0082453

calendar_today

Updated On:

Products Versions
Spotfire Server All Versions

Description

Description:
Resolving ORA error received while connecting to Oracle Database:
 
ORA-12505 Connection refused, the specified SID (<SID_NAME>) was not recognized by the Oracle server.
OR
ORA-12505TNS:listener does not currently know of SID given in connect descriptor.

Symptoms:
While connecting to Oracle Database through Information Designer or while creating a bootstrap file for Spotfire Database on Oracle, users get the following ORA error: 

ORA-12505 Connection refused, the specified SID (<SID_NAME>) was not recognized by the Oracle server.
OR
ORA-12505: TNS:listener does not currently know of SID given in connect descriptor.

Cause:
There can be two causes for this error:
 
1). Incorrect SID name or Oracle Listener has not configured for the specified SID.
2). Listener is configured for Service Name not SID.

Issue/Introduction

Oracle Error: "ORA-12505 Connection refused, the specified SID (;SID_NAME;) was not recognized by the Oracle server while connecting to Oracle Database".

Resolution

Resolution 1). Confirm with the Oracle DBA the correct SID. Use the 'tnsping' command to check the DB status.
 
Resolution 2): Modify the connection URL to use the Service Name instead of the SID. If the listener is configured for Service Name then use the following connection URL:
jdbc:oracle:thin:@hostname:1521/<serivce_name> 
 
Connection URLs for Oracle Native JDBC Driver
---------------------------------------------------------------------
For SID: jdbc:oracle:thin:@hostname:1521:<SID>  
for Service Name: jdbc:oracle:thin:@hostname:1521/<ServiceName>
 
The connection URL for Oracle DataDirect Driver
----------------------------------------------------------------------
For SID: jdbc:tibcosoftwareinc:oracle://<host>:<port1521>;SID=<sid>
For Service Name: jdbc:tibcosoftwareinc:oracle://<host>:<port1521>;ServiceName=<ServiceName>

Additional Information

https://community.oracle.com/thread/433363?tstart=0