Solved

ORA-12203 TNS: Unable to connect to Destination

Posted on 2000-03-03
18
3,319 Views
Last Modified: 2012-08-14
I installed Oracle 8.05 on Redhat 6.1 linux. If i fire up SQl plus seesion from the localhost, i can login succsfully as any user, If i go to a win98 or NT machine, I will get the following error after trying to start any oracle Tool
ORA-12203 TNS: Unable to connect to Destination

I have the correct entries for the TNS names file, The SID is defualt "ORCL"
using ip i tried both the ip address and just the host name in the tns file, and i tried it with both with the .world and without the .world. the same client workstation are able to connect to another ORACLE server that is running on NT, I am a bit new to this , so any help would be greatly appreciated.
Thanks in advance

 
0
Comment
Question by:klute
  • 7
  • 4
  • 2
  • +4
18 Comments
 
LVL 6

Expert Comment

by:crsankar
ID: 2582487
Create a host string using net8 easy configuration utility and try.

0
 

Expert Comment

by:abir
ID: 2582512

   You can try the following,to test the connectivity

   1)  ping <ip address of linux m/c> ;from the win95/98/NT client.

   if it works fine then,from the command prompt of the client issue the command,

   2) tnsping '< the alias you have created in Tnsnames.ora of client>'

the status should be 'OK'.


0
 
LVL 1

Author Comment

by:klute
ID: 2582634
As far as pinging the linux computer, I can telnet into it just fine, Wow I completley forgot all about tns ping utility, i will try that on Monday.
0
 
LVL 4

Expert Comment

by:sudhi022299
ID: 2583324
if you can telnet to the linux box, then i believe that you should be able to ping too.

FYI:
Three ways for the resolution of service names.

1. Host naming: using this method you would use the computer name as the service name like <username>/<password>@<machinename>
For this method there is a very little client configuration required.

2. Local Naming: using the TNSNAMES.ORA file. Service names would map to connect descriptors stored in this file. There are 2 files that you have to be sure of. SQLNET.ORA and TNSNAMES.ORA file.
the path of these 2 files would be set in the registry TNS_ADMIN. Oracle is going to search for these 2 files in the directory set to TNS_ADMIN. If you don't find an entry in the registry, then the default dir ORACLE_HOME\NET80\ADMIN is the directory.
sqlnet.ora -- client configuration file.
make sure that any entry: names.directory_path = (TNSNAMES)
is present.
Next thing is to have the correct descriptor. For eg:
TEST.WORLD =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = w887n)(PORT = 1521))
    (CONNECT_DATA =
      (SID = ORCL)
    )
  )
here the "test" is the service name.
users would connect to a database with an sid ORCL running on a machine named "w887n" by <username>/<password>@test
you can specify the ip address of the host for the HOST parameter in the connect descriptor.

3. using Oracle Names.
If you need info on this leave a comment here.

Regards,
Sudhi.
0
 
LVL 4

Expert Comment

by:jtrifts
ID: 2586901
If your default domain name is .world, try tagging on .world to your call to connect.  

Q1. Does this do anything?

Check that all relevant directories have tnsnames.ora / sqlnet.ora files present:

e.g. if the following folders exist:

/network/admin

/net80/admin

/ora815/entwork/admin

Q2. What tools have you tried connecting with?  
Q3. Do you use toad? / Does this connect?

Q4. If you check your sqlnet.log file. What is the description of the problem? (this should be more detailed than the error message you receive).

Regards,

JTrifts
0
 

Expert Comment

by:ldg_tn
ID: 2587907
After a recent change installation of Developer 2000 (version  6.05) we
had this same problem on only one of the 50+ forms we have.

This form was based upon a view and although we recreated the form and view and everything else we could think of the problem persisted.  Our main menu would open the form and it could be used all day as long as you did not close it.  Once it was closed, the database was disconnected.
As a temp work around, users kept one PC open just to use this form.

Our Oracle was on an NT machine and as it turned out, the use of Statitics was the bug and had to do with the NT box.  

Try having the DBA turn off statistics (use rule base) and see if this does not do the trick.  It immediately solved our problem.
0
 
LVL 1

Author Comment

by:klute
ID: 2594657
I went to the server
typed lsnrctl start ' to start the listener'

then svrmgrl,
connect internal,
then startup,
quit

this started and brought up the databases.
here is a list of errors i get


Warning: You are no longer connected to ORACLE.
SQL> connect system/manager@192.168.1.2
ERROR:
ORA-12224: TNS:no listener


D:\orant\BIN>tnsping80 lmprd.world

TNS Ping Utility for 32-bit Windows: Version 8.0.5.0.0 - Production on 07-MAR-00
 21:38:45

(c) Copyright 1997 Oracle Corporation.  All rights reserved.

Attempting to contact (ADDRESS=(PROTOCOL=TCP)(Host=192.168.1.2)(Port=1521))
TNS-12541: TNS:no listener

I really dont know what to do next


0
 
LVL 6

Expert Comment

by:crsankar
ID: 2594676
I doubt if you cannot connect using

connect internal/oracle@192.168.1.2

you have to create a host string. Try creating a connect string using sql*net or net8 easy config.
0
 
LVL 1

Author Comment

by:klute
ID: 2594913
Adjusted points to 225
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

Expert Comment

by:sudhi022299
ID: 2598275
klute, why don't you create a connect string and try it.
0
 
LVL 1

Author Comment

by:klute
ID: 2598391
I just want to make sure we are on the page here, when you say create a connect string, you mean go to Oracle net 8 easy config, and just follow the wizard, If so i will go ahead and try it andlet you know.

Thanks

0
 
LVL 4

Expert Comment

by:jtrifts
ID: 2599717
Klute,

To re-iterate, if you are using easy config, this should make use of your sqlnet.ora and tnsnames.ora files to connect.

If you get an error, more details can be found in the sqlnet.log.  Please check this and post the error descriptions.

Also, does your defeault domain (in the sqlnet.ora file) match the domain tnsnames.ora file?

Are these files present in your net80/admin (and any other netword/admin) folder(s)?
0
 
LVL 1

Author Comment

by:klute
ID: 2603257
Hello
 i have created a new entry in tnsnames
by using the net8 easy config wizard.
at the end it gives you a chance to test your connection, this is what i get

Connecting....

The test did not succeed.
ORA-12224: TNS:no listener

There may be an error in the fields entered
or the server may not be ready for a connection.
You can check the server and retry, or continue.

when i start the server this what i do

[oracle@server01 oracle]$ lsnrctl start

LSNRCTL for Linux: Version 8.0.5.0.0 - Production on 09-MAR-00 20:21:08

(c) Copyright 1997 Oracle Corporation.  All rights reserved.

Starting /usr/oracle/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 8.0.5.0.0 - Production
System parameter file is /usr/oracle/network/admin/listener.ora
Log messages written to /usr/oracle/network/log/listener.log
Listening on: (ADDRESS=(PROTOCOL=ipc)(DEV=6)(KEY=ORCL))
Listening on: (ADDRESS=(PROTOCOL=ipc)(DEV=10)(KEY=PNPKEY))
Listening on: (ADDRESS=(PROTOCOL=tcp)(DEV=11)(HOST=127.0.0.1)(PORT=1521))

Connecting to (ADDRESS=(PROTOCOL=IPC)(KEY=ORCL))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 8.0.5.0.0 - Production
Start Date                09-MAR-00 20:21:16
Uptime                    0 days 0 hr. 0 min. 0 sec
Trace Level               off
Security                  OFF
SNMP                      OFF
Listener Parameter File   /usr/oracle/network/admin/listener.ora
Listener Log File         /usr/oracle/network/log/listener.log
Services Summary...
  ORCL          has 2 service handler(s)
The command completed successfully        

listener is started, then i go and bring up the databases

[oracle@server01 oracle]$ svrmgrl

Oracle Server Manager Release 3.0.5.0.0 - Production

(c) Copyright 1997, Oracle Corporation.  All Rights Reserved.

Oracle8 Enterprise Edition Release 8.0.5.1.0 - Production
With the Partitioning and Objects options
PL/SQL Release 8.0.5.1.0 - Production

SVRMGR> connect internal
Connected.
SVRMGR> startup
ORACLE instance started.
Total System Global Area                          4754704 bytes
Fixed Size                                          48400 bytes
Variable Size                                     4222976 bytes
Database Buffers                                   409600 bytes
Redo Buffers                                        73728 bytes
Database mounted.
Database opened.
SVRMGR> quit
Server Manager complete.
[oracle@server01 oracle]$                      

-----------------------------------

i then can start sqlplus on the server

SQL*Plus: Release 8.0.5.0.0 - Production on Thu Mar 9 20:29:46 2000

(c) Copyright 1998 Oracle Corporation.  All rights reserved.

Enter user-name: system
Enter password:

Connected to:
Oracle8 Enterprise Edition Release 8.0.5.1.0 - Production
With the Partitioning and Objects options
PL/SQL Release 8.0.5.1.0 - Production

SQL>              

I can run basic queries too (from the server)

SQL> select * from tab;

TNAME                          TABTYPE  CLUSTERID
------------------------------ ------- ----------
AQ$DEF$_AQCALL                 VIEW
AQ$DEF$_AQERROR                VIEW
AQ$_QUEUES                     TABLE
AQ$_QUEUE_TABLES               TABLE
AQ$_SCHEDULES                  TABLE
CATALOG                        SYNONYM
COL                            SYNONYM
DEF$_AQCALL                    TABLE
DEF$_AQERROR                   TABLE
DEF$_CALLDEST                  TABLE
DEF$_DEFAULTDEST               TABLE

TNAME                          TABTYPE  CLUSTERID
------------------------------ ------- ----------
DEF$_DESTINATION               TABLE
DEF$_ERROR                     TABLE
DEF$_LOB                       TABLE
DEF$_ORIGIN                    TABLE
DEF$_PROPAGATOR                TABLE
DEF$_TEMP$LOB                  TABLE
PRODUCT_PRIVS                  VIEW
PRODUCT_USER_PROFILE           SYNONYM
PUBLICSYN                      SYNONYM
REPCAT$_AUDIT_ATTRIBUTE        TABLE
REPCAT$_AUDIT_COLUMN           TABLE
                                                 
But i cannot connect to it from any windows clients.
i get an error like the one above about the listener not running..

Please advise.
Thanks so much in advance


0
 
LVL 4

Expert Comment

by:sudhi022299
ID: 2603286
ok, your listener is running fine.
The listener is listening on the default port of 1521.
In case if you have a tnsnames entry with a different port number then you'll get that message.

Another option, look for duplicate tnsnames.ora files. Sometimes having more than one file also causes this message.

Post your tnsnames.ora entry too.
0
 
LVL 1

Author Comment

by:klute
ID: 2603585
I only have 1 tnsnames file on the workstation.
I checked through the entire file system and there was only one file.
I tried this from 5 windows NT computers and 1 Win98 comp. they have only one ver of tnsnames.ora
and none of then can connect they all get the same error about the listener not running.

0
 
LVL 4

Expert Comment

by:sudhi022299
ID: 2604051
klute, please post your tnsnames.ora entry here.
0
 

Accepted Solution

by:
paled earned 225 total points
ID: 2608801
Your listener is working just fine on lo (loopback)

                    Listening on: (ADDRESS=(PROTOCOL=tcp)(DEV=11)(HOST=127.0.0.1)(PORT=1521))

what you need to do is add another entry in the listener.ora for an IP Address or hostname for your local network.

The other client machines cannot connect to 127.0.0.1 on your machine.

Thanks for posting the listener log - it was easy to spot.

Paul
0
 
LVL 1

Author Comment

by:klute
ID: 2610886
Wow, its the stupid things that you overlook, When i initially modyfied the listener.ora file i could not remember the ip address that box had so i just put localhost instead of the ip.
you where right 100% it was listening on the loopback adapter. And i never paid ettention to the ip it was displaying in the log. But When i put the correct ip everythng worked.
wow i dont know how to thank you enouph paul. ,

Thanks
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

Configuring and using Oracle Database Gateway for ODBC Introduction First, a brief summary of what a Database Gateway is.  A Gateway is a set of driver agents and configurations that allow an Oracle database to communicate with other platforms…
How to Unravel a Tricky Query Introduction If you browse through the Oracle zones or any of the other database-related zones you'll come across some complicated solutions and sometimes you'll just have to wonder how anyone came up with them.  â€¦
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 Original Export Utility.  The corresponding Import utility, which works the same way is referenced, but not demonstrated.

760 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

22 Experts available now in Live!

Get 1:1 Help Now