Solved

Connect Oracle 10G client to server

Posted on 2009-04-01
14
1,592 Views
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
0
Comment
Question by:sangeeta9189
  • 5
  • 4
  • 2
  • +1
14 Comments
 
LVL 4

Expert Comment

by:jd_programmer1
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.

http://ora-12154.ora-code.com/
0
 

Author Comment

by:sangeeta9189
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
0
 

Author Comment

by:sangeeta9189
ID: 24046840
This is a fresh installation, so I just need the steps to connect client to server
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.

 
LVL 4

Accepted Solution

by:
jd_programmer1 earned 250 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.
http://youngcow.net/doc/oracle9i/network.920/a96580/cman.htm





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?
0
 
LVL 25

Assisted Solution

by:lwadwell
lwadwell earned 250 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.

.WORLD =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS =
        (PROTOCOL = TCP)
        (HOST = )
        (PORT = )
      )
    )
    (CONNECT_DATA =
      (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.


lwadwell
0
 

Author Comment

by:sangeeta9189
ID: 24047103
When i execute command
tnsping orcl.WORLD
it gives me message
Used parameter files:
C:\oracle\product\10.2.0\client_1\network\admin\sqlnet.ora
TNS-03505: Failed to resolve name

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

Author Comment

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

Expert Comment

by:lwadwell
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.
0
 
LVL 25

Expert Comment

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

Author Comment

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

Expert Comment

by:lwadwell
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.
0
 
LVL 4

Expert Comment

by:dkaisla
ID: 24093210
create a tnsnames.ora file if it does not exist with an entry as suggested by lwadwell.
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.

Question has a verified solution.

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

Hello All, In previous article we used Hortonworks sandbox to work with Hadoop. Now, lets think to create own single node Hadoop on Linux. Here we Install and Configure Apache Hadoop on UI based Oracle Linux. I assume, you have VMware installe…
Note: You must have administrative privileges in order to create/edit Roles. Salesforce.com (http://www.salesforce.com/) (SFDC) is a cloud-based customer relationship management (CRM) system. It is a database most commonly used by sales and marke…
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.
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…

786 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