Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win


Connect Oracle 10G client to server

Posted on 2009-04-01
Medium Priority
Last Modified: 2013-12-18
I have a workgroup of 4 computers. In one PC, I have installed Oracle 10G server. On another PC I have installed Oracle 10G client.
When I try to login to SQL*Plus on client it gives me an error

TNS could not resolve connect identifier specified.

Can someone please let me know how to connect client to the server.

Thank you
Question by:sangeeta9189
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
  • 5
  • 4
  • 2
  • +1

Expert Comment

ID: 24046797
A quick Google found a few things to try. I believe this error is a generic "could not connect" error, so it could be many things.


Author Comment

ID: 24046834
Thanks for replying.

I searched in the client installation and it does not have TNSNAMES.ora file.

It has SQLNET.ora

the server instllation has tnsnames.ora
Please suggest

Author Comment

ID: 24046840
This is a fresh installation, so I just need the steps to connect client to server
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!


Accepted Solution

jd_programmer1 earned 1000 total points
ID: 24046911
I apologize. I do not know much about Oracle, I've just seen it used.

This is a guide for 9i, but it might work. Otherwise, it may be worth waiting for another expert to pick this up in the morning.

This is also from https://kb.iu.edu/data/apaa.html, which is for 10G:

Adding new database services

Use this section if you need to set up an Oracle client connection to an Oracle database on another computer:

From the Start menu, select Programs, then Oracle - OraClient10g_home, then Configuration and Migration Tools, and then Net Configuration Assistant.

Choose Local Net Service Name Configuration, and then click Next.

Select Add, and then choose Next.

You will be prompted for the Service Name. This is the Database SID followed by an extension (e.g., oed1.world ). Enter the full service name, and then click Next.
Note: If you do not know the service name, check with the database administrator.

Make sure that TCP is selected, and then click Next.

Enter your hostname. For Oed1, the hostname is dbserv.uits.indiana.edu . Unless you are instructed otherwise, select Use the standard port number of 1521. To continue, click Next.

Choose Yes, perform test, and then select Next.
Note: If the login test fails, select Change Login, enter your correct user information, and then try again. Choose Next when the test is successful.

Enter a net service name. UITS recommends using the same name that you supplied in step 4 (e.g., oed1.world ). Click Next.

If you would like to configure another net service name, select Yes, then Next, and then follow steps 1 through 8 again. Otherwise, select No, and then click Next.

Once you have configured all of your net service names, click Next, and then choose Finish.
Back to top

Connecting to Oracle with SQL*Plus

To connect to Oracle with SQL*Plus:

From the Start menu, select Programs and then Oracle - OraClient10g_home1.

From the Oracle menu, select Application Development, and then SQL Plus.

Enter your Oracle username and password in the spaces provided.

In the box labeled "Host String:", enter the name you specified when configuring Oracle Net (e.g., oed1.world). Click OK.
After completing the steps above, you will be in the SQL*Plus command line interface environment. To change your password, see How do I change my Oracle password using SQL*Plus?
LVL 25

Assisted Solution

lwadwell earned 1000 total points
ID: 24047044
Hi sangeeta9189,

How are you connecting?  If it via something like SQLPlus - you will need a TNSNAMES.ORA file on the client machine.  This file tell the client where the server is to connect to.

The location will depend on where the client is installed ... but will be in the subdirectory to the client called .../network/admin

A TNSNAMES.ORA should have an entry like below - you will need to change the  to the SID of the servers database,  to the ip address of the server machine and  to the port the listener of the server uses.  If you did not set the port number to something different of the server install, it probably is port 1521.

      (ADDRESS =
        (PROTOCOL = TCP)
        (HOST = )
        (PORT = )
      (SID = )

Once you have the TNSNAMES.ORA file set up, is a command prompt issue the command "tnsping .WORLD" (again changing the .  This command will tell you whether it can resolve the connection to the server and whether it is OK.


Author Comment

ID: 24047103
When i execute command
tnsping orcl.WORLD
it gives me message
Used parameter files:
TNS-03505: Failed to resolve name

It is looking at sqlnet.ora.
The tnsnames.ora on client machine is inside SAMPLE directory

Author Comment

ID: 24047127
I put the  lines you mentioned inside sqlnet.ora, but still same problem.
LVL 25

Expert Comment

ID: 24047128
the one in the sample directory is just that ... a sample.  It is not the one used ... it must be in the C:\oracle\product\10.2.0\client_1\network\admin directory.

Also try the tnsping command on the server machine please.
LVL 25

Expert Comment

ID: 24047134
The lines I gave must be in the TNSNAMES.ora file.  The sqlnet.ora file is a for configuration - not connections.

Author Comment

ID: 24047151
On the client machine, I did the following on command prompt
telnet 1521
but gives me a message
Connecting To not open connection to the host, on port 1521
: Connect failed
where is the Oracle Server machine.
However, if I execute the same command in server machine, it succeeds
Could it be some connectivity problem?
LVL 25

Expert Comment

ID: 24047189
telnet is a different protocol - nothing to do with Oracle databases.  

tnsping is the command to use - this is Oracle's tool for testing database communications.

the fact that the telnet could connect - but not use port 1521 is a positive sign - but telnet will never be able to connect to that port.

try again with tnsping please.

Expert Comment

ID: 24093210
create a tnsnames.ora file if it does not exist with an entry as suggested by lwadwell.

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Messaging apps are amazing tools with the power to do a lot of good, but the truth is the process of collaborating with coworkers requires relationships established through meaningful communication - the kind of communication that only happens face-…
Let’s face it: one of the reasons your organization chose a SaaS solution (whether Microsoft Dynamics 365, Netsuite or SAP) is that it is subscription-based. The upkeep is done. Or so you think.
This video shows information on the Oracle Data Dictionary, starting with the Oracle documentation, explaining the different types of Data Dictionary views available by group and permissions as well as giving examples on how to retrieve data from th…
This video shows how to Export data from an Oracle database using the Datapump Export Utility.  The corresponding Datapump Import utility is also discussed and demonstrated.

610 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