Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Connecting to Oracle from SQL*PLUS

Status
Not open for further replies.

bansilsharma

Programmer
Jan 1, 2002
3
IN
Hi,I have a problem in accessing ORACLE server remotely over the internet from windows console application. I have an Oracle database lying on a remote machine on Global IP. Now I am trying to connect this database from my win98 client machine by using SQL*PLUS utility. After waiting for about 1 minutes time, it returns me an error "Operation Timed Out". Can anybody tell me the solution how to connect an Oracle database over the internet???

In the tnsnames.ora file I have created a datasource where I have mentioned HOST="the IP address of the remote machine."


 
Have you tried to do a PING on the machine hosting the database? That will tell you if you are allowed to see the machine. If not, it is a network problem. I doubt that it is a problem with your tnsnames.ora file. You would get a message of the form ORA-... something.

jcote
 
Even if you can ping the remote host you may not connect to your database if the TCP/IP port of your listener is not open (the usual port is 1521 or 1526).

Besides, if you have configured multi-threaded server, you have to open the ports to the dispatchers (you can see the numbers of them by executing "lsnrctl serv" in your database server) or you can include the parameter (SERVER=DEDICATED) to your connection description in the client's tnsnames.ora

I Hope this helps
 
Hi Friends,

I tried the tips given by you people, but even it didn't work.

I am using the following datasource:

DS.WORLD=
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = Global IP of the server machine)(PORT = 1521))
)
(CONNECT_DATA = (SID = Global Database Name)(SERVER = DEDICATED))
)

The user name and password are also correct.
And I am able to ping this Global IP from my machine. But unable to connect through SQL*PLUS to oracle database. Please help,,,its very urgent. Thanks in advance.
 

You can also check the CONNECT_TIMEOUT_LISTENER parameter from your listener.ora file. Assign 0 "zero" or a larger value on this parameter to make the connection time out longer.

Restart the listener after you updated the parameter to take effect. Robbie

"The rule is, not to besiege walled cities if it can possibly be avoided" -- Art of War
 
Thanks Robbie,

But this error is not bcaz of CONNECT_TIMEOUT_LISTENER parameter exactly. To be very precise, we need to give some extra settings to connect to an oracle database remotely over the internet. But I don't know what needs to be done.

Bansi
 
If your client is a unix box try -
tnsping ds.world
tnsping ds

On windows search your orant or orawin folder for tnsping*
mine is called tnsping80.exe, then
tnsping80 ds.world
tnsping80 ds

This will test the connection through your tnsnames.ora, the network and the listener at the server.

A successful test will end with -
OK (xx msecs)
otherwise an error message will be generated, which should help you find the problem.

Steve



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top