Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using Crystal Reports with a centralized TNSNAMES.ORA file

Status
Not open for further replies.

ernstmik

Programmer
Nov 5, 2003
16
0
0
US
I have a centralized tnsnames.ora file that I am trying to use to connect to an Oracle database. I have set the TNS_ADMIN variable in the system section of the Windows environment variables. I can tnsping the database I want to connect to and it returns positive results using the centralized file. I can even login to the database I want to connect to through SQL*Plus.

However, I cannot connect to the database through Crystal Reports. It fails every time with a "Invalid Login" message. When I remove the centralized tnsnames.ora file and move it back to its local directory, I can instantly connect through Crystal Reports.

Does anyone have any ideas and can Crystal Reports use a remote tnsnames.ora file?
 
Doubt this will work, but perhaps a shortcut to the centralized file in the local?
 
If you are connecting using ODBC, you might want to change your connection to an Oracle native driver. To do this, go to your database menu, set datasource location. In the lower part of the dialog box go to create a new connection. Scroll down to "Oracle Server" which should be right under or near OLE DB. Once you get the bottom of this dialog pointed at the Oracle database, point the top part of the dialog to your current data source, then click the update button.

Oracle native drivers will run faster as well than ODBC since the overhead of the ODBC isn't needed.

If that isn't the problem:

Successfully tnspinging the database is usually a good sign that things are working on the Oracle side. But there can be other issues. So it isn't a sure thing.

Check to make sure you have a copy of the SQLNET.ORA file in the same location.

Failing all of that, you could post the version of crystal, Oracle and Windows that you are using. Then also post what entry you put in the tns_admin variable (yes it sounds like it is placed correctly in Windows). Also post the contents of your sqlnet.ora file as well as your tnsnames.ora file.

That way we can see what you are trying to do, and maybe spot something.

Or if you want to go through documentation to solve this you can go to You can get an account there for free and read the manuals for Networking if you like.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top