SAP Knowledge Base Article - Public

1333131 - Error: 'Logon failed. Details: HY000;[Oracle][ODBC][Ora]ORA-12560: TNS:protocol adapter error' when creating a report to Oracle in Crystal Reports

Symptom

  • Error when creating a report based on Oracle.
  • When attempting to create a report based on an ODBC connection to Oracle, Crystal Reports generates the error:

       "Logon failed. Details: HY000;[Oracle][ODBC][Ora]ORA-12560: TNS:protocol adapter error [Database Vendor Code: 12560]"

Environment

  • SAP Crystal Reports 2013
  • SAP Crystal Reports 2016
  • SAP Crystal Reports 2020 
        
  • Oracle 12
  • Oracle 18
  • Oracle 19

Reproducing the Issue

  1. In Microsoft ODBC Data Source Administrator, create an ODBC DSN to Oracle.
  2. In Crystal Reports, create a new report based on an ODBC connection, and select the ODBC DSN to Oracle.
    It then generates the error.

Cause

  • TNS Service Name field is blank in Oracle ODBC Driver Configuration window for Oracle Data Source Name (DSN).

Resolution

  • Add the TNS Service Name to the Oracle data source you want to connect to, in the ODBC DSN:
    1. Open the Micfrosoft ODBC Data Source Administrator
    2. Select the ODBC DSN for Oracle, and click on Configure button.
    3. Provide appropriate TNS Service Name in the "TNS Service Name" field in Oracle ODBC Driver Configuration window and click on OK.

Keywords

CR , KBA , BI-RA-CR , Crystal Reports designer or Business View Manager , Problem

Product

SAP Crystal Reports 2013 ; SAP Crystal Reports 2016 ; SAP Crystal Reports 2020