Solved

How do I create SQL*Net Connect String ?

Posted on 2002-04-16
12
1,127 Views
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 ?
0
Comment
Question by:decae2001
  • 4
  • 2
  • 2
  • +4
12 Comments
 
LVL 5

Expert Comment

by:sora
Comment Utility
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>
UID=scott
PWD=tiger


sora
0
 

Author Comment

by:decae2001
Comment Utility
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 ?
0
 
LVL 5

Expert Comment

by:sora
Comment Utility
You will need to install Net8 which comes in the Oracle client CD. The oracle odbc driver needs the Net8 layer to be installed.


sora
0
 
LVL 17

Expert Comment

by:k_murli_krishna
Comment Utility
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
0
 

Author Comment

by:decae2001
Comment Utility
Let me try it !
0
 
LVL 34

Expert Comment

by:Mark Geerlings
Comment Utility
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.
0
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.

 

Author Comment

by:decae2001
Comment Utility
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 :

SQLSTATE:NA000
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.
0
 

Author Comment

by:decae2001
Comment Utility
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 ?????

0
 
LVL 34

Expert Comment

by:Mark Geerlings
Comment Utility
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.
0
 
LVL 1

Expert Comment

by:Moondancer
Comment Utility
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.
http://www.experts-exchange.com/jsp/qList.jsp?ta=commspt
 
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.
http://www.experts-exchange.com/questions/Q.20154995.html
http://www.experts-exchange.com/questions/Q.20166118.html
http://www.experts-exchange.com/questions/Q.20239806.html
http://www.experts-exchange.com/questions/Q.20240147.html
http://www.experts-exchange.com/questions/Q.20289981.html
http://www.experts-exchange.com/questions/Q.20290234.html



*****  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
http://www.experts-exchange.com/jsp/qManageQuestion.jsp?ta=commspt&qid=20274643
POINTS FOR EXPERTS awaiting comments are listed in the link below
http://www.experts-exchange.com/commspt/Q.20277028.html
 
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.
Moondancer
Moderator @ Experts Exchange
0
 
LVL 49

Expert Comment

by:DanRollins
Comment Utility
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
0
 
LVL 6

Accepted Solution

by:
Mindphaser earned 100 total points
Comment Utility
moved to PAQ

** Mindphaser - Community Support Moderator **
0

Featured Post

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.

Join & Write a Comment

Suggested Solutions

Subquery in Oracle: Sub queries are one of advance queries in oracle. Types of advance queries: •      Sub Queries •      Hierarchical Queries •      Set Operators Sub queries are know as the query called from another query or another subquery. It can …
From implementing a password expiration date, to datatype conversions and file export options, these are some useful settings I've found in Jasper Server.
This video explains at a high level with the mandatory Oracle Memory processes are as well as touching on some of the more common optional ones.
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

728 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now