Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

How do I create SQL*Net Connect String ?

Posted on 2002-04-16
Last Modified: 2008-01-09
I would like to use Oracle ODBC to connect to the
Oracle database. How do I create SQL*Net Connect String ?
Question by:decae2001
  • 4
  • 2
  • 2
  • +4

Expert Comment

ID: 6946480
You need to first setup a tnsnames alias in your tnsnames file. Then use that for the DSN field in the ODBC setup. The other fields are self explanatory

DSN=<tnsnames alias>


Author Comment

ID: 6946610
I have WinNT. I don't have oracle installed.
But I do have oracle odbc driver.
where should I put tnsnames ?
And what is the next step after that ?

Expert Comment

ID: 6946740
You will need to install Net8 which comes in the Oracle client CD. The oracle odbc driver needs the Net8 layer to be installed.

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

LVL 17

Expert Comment

ID: 6947025
Keep oracle driver in a folder structure similar to an oracle intsalled one like 'D:\Oracle\Ora81\jdbc\lib\drivers.*' and append this to classpath. For thin drivers no need of client or net8 to be installed.

--- k_murli_krishna

Author Comment

ID: 6947552
Let me try it !
LVL 35

Expert Comment

by:Mark Geerlings
ID: 6948144
How did you get an Oracle ODBC driver without having any part of Oracle installed?  You certainly do not need a  complete Oracle database install or even a complete Developer2000 installation to use ODBC to connect to Oracle, but if you want to use an Oracle ODBC driver you need at least an Oracle client install.  If you have the Oracle client install and want to use the Oracle ODBC driver, then you have to create a SQL*Net Connect String in your tnsnames.ora file.  The easiest way to do this is with a wizard that is installed when you install the Oracle client.

With WinNT, you should be able to use a Microsoft ODBC driver to connect to Oracle if you prefer.  Then you may not need any part of the Oracle client install.

Author Comment

ID: 6950286
I have install oracle client. And I can create a data source by using MS ODBC for Oracle.

Then, I used Oracle ODBC Test program to test my connect.
And I got this error :

Native Error Code:3121
Driver Message:[Microsoft][ODBC driver for Oracle][Oracle]ORA-03121:no interface driver connected - function not performed.

I want to connect to the Oracle in unix box.

Author Comment

ID: 6950923
OK, I have downloaded a trial version of Oracle8.
I have installed it on my box. Now, I have everything I need to connect to a remote db.

I used net8 comf. asst. to create a local service name.
I put Test as a service name, and choose TCP as protocol.
Then, I click yes to perform a test. Then, I got this

Connecting...ORA-12504: TNS:listener was not given the SID in CONNECT_DATA
The test did not succeed.

Some of the information you provided may be incorrect.
Press Back to review the information provided for net service name, or Change Login to change username.

How to fix it ?????

LVL 35

Expert Comment

by:Mark Geerlings
ID: 6960003
You certainly do not need a full Oracle8 install just to use the Oracle ODBC driver.  An Oracle8 client installation is all that you need.  It sounds like the part that is missing is the Net8 (or SQL*Net) configuration after the install.

If you really do have a full Oracle8 database installation as well as the Oracle8 client installation, it may be more complicated depending on how many Oracle homes you have.  It is simplest with just one Oracle home, but if you have multiples, you will have to configure SQL*Net correctly in each one.

Did you set up a SQL*Net alias for the Oracle database you want to connect to on your Unix server?  If not, you need to run the Net8 wizard again to do that.  Then I suggest testing that from a DOS prompt.  Navigate to your Oracle_home\bin directory, then type:
tnsping [alias]
and press [Enter].

(The [alias] is whatever name you set up in the Net8 wizard for the database on Unix that you want to connect to.)

I noticed that the error message you posted in your latest comment seems to be coming from the Microsoft ODBC driver, not the Oracle ODBC driver.  Did you install both of them?  That may be complicating things for you too.

Expert Comment

ID: 6978534
ADMINISTRATION WILL BE CONTACTING YOU SHORTLY.  Moderators Computer101 or Netminder will return to finalize these if they are still open in 14 days.  Experts, please post closing recommendations before that time.

Below are your open questions as of today.  Questions which have been inactive for 21 days or longer are considered to be abandoned and for those, your options are:
1. Accept a Comment As Answer (use the button next to the Expert's name).
2. Close the question if the information was not useful to you, but may help others. You must tell the participants why you wish to do this, and allow for Expert response.  This choice will include a refund to you, and will move this question to our PAQ (Previously Asked Question) database.  If you found information outside this question thread, please add it.
3. Ask Community Support to help split points between participating experts, or just comment here with details and we'll respond with the process.
4. Delete the question (if it has no potential value for others).
   --> Post comments for expert of your intention to delete and why
   --> YOU CANNOT DELETE A QUESTION with comments; special handling by a Moderator is required.

For special handling needs, please post a zero point question in the link below and include the URL (question QID/link) that it regards with details.
Please click this link for Help Desk, Guidelines/Member Agreement and the Question/Answer process.  http://www.experts-exchange.com/jsp/cmtyHelpDesk.jsp

Click you Member Profile to view your question history and please keep them updated. If you are a KnowledgePro user, use the Power Search option to find them.  

Questions which are LOCKED with a Proposed Answer but do not help you, should be rejected with comments added.  When you grade the question less than an A, please comment as to why.  This helps all involved, as well as others who may access this item in the future.  PLEASE DO NOT AWARD POINTS TO ME.

To view your open questions, please click the following link(s) and keep them all current with updates.

*****  E X P E R T S    P L E A S E  ******  Leave your closing recommendations.
If you are interested in the cleanup effort, please click this link
POINTS FOR EXPERTS awaiting comments are listed in the link below
Moderators will finalize this question if in @14 days Asker has not responded.  This will be moved to the PAQ (Previously Asked Questions) at zero points, deleted or awarded.
Thanks everyone.
Moderator @ Experts Exchange
LVL 49

Expert Comment

ID: 7082392
Lacking timely response from decae2001 or contributing experts, but seeing that there is useful information here, I recommend:

    Save as PAQ -- No Refund.

DanRollins -- EE database cleanup volunteer

Accepted Solution

Mindphaser earned 100 total points
ID: 7096149
moved to PAQ

** Mindphaser - Community Support Moderator **

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Note: this article covers simple compression. Oracle introduced in version 11g release 2 a new feature called Advanced Compression which is not covered here. General principle of Oracle compression Oracle compression is a way of reducing the d…
Background In several of the companies I have worked for, I noticed that corporate reporting is off loaded from the production database and done mainly on a clone database which needs to be kept up to date daily by various means, be it a logical…
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
This video shows how to copy a database user from one database to another user DBMS_METADATA.  It also shows how to copy a user's permissions and discusses password hash differences between Oracle 10g and 11g.

860 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question