SAP Knowledge Base Article - Public

1850017 - Error ORA-12505 when creating a JDBC connection based on Oracle database in Crystal Reports 2011

Symptom

  • When creating a JDBC connection based on Oracle database in Crystal Reports 2011, you receiving the the following Error message: ORA-12505, TNS:listener does not currently know of SID given in connect descriptor [Database Vendor Code: 12505]

Environment

  • BusinessObjects BI Platform 4.0
  • Crystal Reports 2011
  • Oracle 11G

Reproducing the Issue

  1. In Crystal Reports 2011, select File > New > Standard Report...
  2. In Standard Report Creation Wizard expend 'Create New Connection' and select JDBC (JNDI).
  3. In Connection URL specify connection in the format jdbc:oracle:thin:@<server-name>:<port>:<database name>
  4. Specify all required connection information in the Wizard and click Finish.
  5. Get error message: "Failed to open connection. Details: SQL Exception: [SQL State:] 66000 [Error Message:] Listener refused the connection with the following error: ORA-12505, TNS:listener does not currently know of SID given in connect descriptor [Database Vendor Code: 12505]"

Cause

  • For Crystal Reports 2011, the Connection URL parameters for the Oracle 11 JDBC Driver require the use of system ID (SID). Oracle is moving away from the use of SID to Service Name.

Resolution

  • Specify the Service Name as part of the JDBC connection URL parameter entry. It would follow this format:

   jdbc:oracle:thin:@//<server-name>:<port>:/<service-name>

Keywords

12505, ORA, ORA-12505, CR, Crystal Reports, Oracle, JDBC , KBA , BI-RA-CR , Crystal Reports designer or Business View Manager , How To

Product

SAP Crystal Reports 2011