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
NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.


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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone 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

Note: You must have administrative privileges in order to configure lead or case queues. Salesforce.com (http://www.Salesforce.com) is a cloud-based customer relationship management (CRM) system. It is widely used around the world by sales and ma…
Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
Via a live example, show how to take different types of Oracle backups using RMAN.
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.
Suggested Courses

801 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