cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to create a connection in Crystal Report

Former Member
0 Kudos

I recently installed OracleXEUniv.exe and Crystal Report 2008 on my Local m/c.

When I tried to create a connection from CR to Database via Database Expert under

Create New Connection>Oracle Server :

after entering

SERVICE : XE

USER ID : system

I have entered correct Password

a popup appears :

FAILED TO OPEN THE CONNECTION

DETAILS: ORA-12154: TNS : could not resolve the connect identifier

specified

[database Vendor Code: 12154]

any suggestions ?

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hello Farhan,

Reason:

A connection to a database or other service was requested using a connect identifier, and the connect identifier specified could not be resolved into a connect descriptor using one of the naming methods configured. For example, if the type of connect identifier used was a net service name then the net service name could not be found in a naming method repository, or the repository could not be located or reached.

Action:

- If you are using local naming (TNSNAMES.ORA file):

- Make sure that "TNSNAMES" is listed as one of the values of the NAMES.DIRECTORY_PATH parameter in the Oracle Net profile (SQLNET.ORA)

- Verify that a TNSNAMES.ORA file exists and is in the proper directory and is accessible.

- Check that the net service name used as the connect identifier exists in the TNSNAMES.ORA file.

- Make sure there are no syntax errors anywhere in the TNSNAMES.ORA file. Look for unmatched parentheses or stray characters. Errors in a TNSNAMES.ORA file may make it unusable.

- If you are using directory naming:

- Verify that "LDAP" is listed as one of the values of the NAMES.DIRETORY_PATH parameter in the Oracle Net profile (SQLNET.ORA).

- Verify that the LDAP directory server is up and that it is accessible.

- Verify that the net service name or database name used as the connect identifier is configured in the directory.

- Verify that the default context being used is correct by specifying a fully qualified net service name or a full LDAP DN as the connect identifier

- If you are using easy connect naming:

- Verify that "EZCONNECT" is listed as one of the values of the NAMES.DIRETORY_PATH parameter in the Oracle Net profile (SQLNET.ORA).

- Make sure the host, port and service name specified are correct.

- Try enclosing the connect identifier in quote marks. See the Oracle Net Services Administrators Guide or the Oracle operating system specific guide for more information on naming.

If this does not work out, please try the below based on your data base connection. If OLEDB

What Oracle Home is being used when you use OLEDB? Is it C:\app\Administrator\product\11.2.0\dbhome_2 ?


If not, try copying tnsnames.ora and sqlnet.ora from C:\app\Administrator\product\11.2.0\dbhome_2\network\admin to the %ORACLE%\network\admin directory of the home you're using OLEDB wtih. Its basically an TNS entries error, but not related to Crystal Reports.

Please try it out and let us know.

Hope this help you.


Former Member
0 Kudos

Within C:\oraclexe\app\oracle\product\10.2.0\server\NETWORK\ADMIN

There exists a folder (SAMPLE) and 3 files (listener, sqlnet, tnsnames)

LISTENER FILE contains the following information :

SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (SID_NAME = PLSExtProc)
      (ORACLE_HOME = C:\oraclexe\app\oracle\product\10.2.0\server)
      (PROGRAM = extproc)
    )
    (SID_DESC =
      (SID_NAME = CLRExtProc)
      (ORACLE_HOME = C:\oraclexe\app\oracle\product\10.2.0\server)
      (PROGRAM = extproc)
    )
  )

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))
      (ADDRESS = (PROTOCOL = TCP)(HOST = Aafizaa)(PORT = 1521))
    )
  )

DEFAULT_SERVICE_LISTENER = (XE)

----------------------------------------------------------------------------------------------------------------------------------

SQLNET FILE contains the following information :

# This file is actually generated by netca. But if customers choose to
# install "Software Only", this file wont exist and without the native
# authentication, they will not be able to connect to the database on NT.

SQLNET.AUTHENTICATION_SERVICES = (NTS)

----------------------------------------------------------------------------------------------------------------------------------

TNSANMES FILE contains the following information :

XE =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = Aafizaa)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = XE)
    )
  )

EXTPROC_CONNECTION_DATA =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))
    )
    (CONNECT_DATA =
      (SID = PLSExtProc)
      (PRESENTATION = RO)
    )
  )

ORACLR_CONNECTION_DATA =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))
    )
    (CONNECT_DATA =
      (SID = CLRExtProc)
      (PRESENTATION = RO)
    )
  )

----------------------------------------------------------------------------------------------------------------------------------

Furthermore SAMPLE FOLDER contains 3 files(LISTENER, SQLNET, TNSNAMES)

----------------------------------------------------------------------------------------------------------------------------------

Any suggestions on what to do next?

abhilash_kumar
Active Contributor
0 Kudos

Moved to the CR - Data Connectivity space.

-Abhilash