Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1139
  • Last Modified:

How do I create SQL*Net Connect String ?

I would like to use Oracle ODBC to connect to the
Oracle database. How do I create SQL*Net Connect String ?
0
decae2001
Asked:
decae2001
  • 4
  • 2
  • 2
  • +4
1 Solution
 
soraCommented:
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
 
decae2001Author Commented:
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
 
soraCommented:
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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
k_murli_krishnaCommented:
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
 
decae2001Author Commented:
Let me try it !
0
 
Mark GeerlingsDatabase AdministratorCommented:
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
 
decae2001Author Commented:
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
 
decae2001Author Commented:
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
 
Mark GeerlingsDatabase AdministratorCommented:
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
 
MoondancerCommented:
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
 
DanRollinsCommented:
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
 
MindphaserCommented:
moved to PAQ

** Mindphaser - Community Support Moderator **
0

Featured Post

Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

  • 4
  • 2
  • 2
  • +4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now