Home » RDBMS Server » Networking and Gateways » TNSPing is OK but connect by sqlplus is error
TNSPing is OK but connect by sqlplus is error [message #67570] Sat, 16 October 2004 18:20 Go to next message
Nguyen Lam
Messages: 2
Registered: October 2004
Junior Member
Hi all,

I get this trouble, I installed Oracle 9i database on Windows 2000 Advance Server. When it located in our company, I connect to it successfully! When I put the server in our ISP, I can't connect (even tnsping, using port 1521). So I change listener port setting to another port, tnsping is OK, but when using sqlplus, it shows error: "ORA-12543 TNS:destination host unreachable".

I think that in tnsping, the server reply to port is configured. But in sqlplus, it reply to another port that isn't allowed by firewall. Is it right???

Please help me in connect to that server!
Re: TNSPing is OK but connect by sqlplus is error [message #67637 is a reply to message #67570] Mon, 29 November 2004 21:04 Go to previous messageGo to next message
Mohamad Wahyudi
Messages: 2
Registered: November 2004
Junior Member
Hi there....
I have a same problem with Nguyen Lam.
My case is described below :
We have setup two oracle server connected each other thru firewall in between, but currently we have a problem with this connection.
Say Server A and Server B.
When Server A is trying to connect to Server B either using TNSPing and SQLPlus, they will establish properly. And I've the used tcp port is 1521 for both connection at Server B, and tcphigh port at Server A, and it is normal, since Server A is a calling server.
But it was the opposite situation, when B connect to A.
using the TNSPing, B will connect to A using tcp port 1521, but when B trying to connect to A using SQLPlus, then they will use randow tcp port at both sides.
At A, the tcp port used was in incremental count.
First attempt, it used tcp 1023, 2nd attempt used tcp 1024, 3rd attempt used 1025 etc.
Is this case, at firewall we can not set the destination port at A to be 1521, since the destination port at A is always used randomly (count up).
How to solve it. Is there any solution on this. We have set the tsname.ora and listener.ora using the same tcp port 1521.
Looking forward to hearing your advised in short.

Best regards, Wahyudi - ABN AMRO Bank jakarta.
Re: TNSPing is OK but connect by sqlplus is error [message #67640 is a reply to message #67637] Tue, 30 November 2004 03:12 Go to previous messageGo to next message
SUBBARAO MANCHIKANTI
Messages: 8
Registered: December 2000
Junior Member
Hi Mohamad,

What is the Operating system on A. You can try to set USE_SHARED_SOCKET registry entry in Windows if the OS is Windows otherwise check metalink for Unix operating system. When Oracle client requests a connection from server, server will allocate port randomly so it is not possible set in firewall. There is another solution for this, using Oracle proxy server for I am familier with this. I used SHARED_SOCKET registry for my Windows system

Good Luck,
Subbarao
Re: TNSPing is OK but connect by sqlplus is error [message #67642 is a reply to message #67640] Tue, 30 November 2004 15:17 Go to previous messageGo to next message
Mohamad Wahyudi
Messages: 2
Registered: November 2004
Junior Member
Hi Subbarao,

Thank you for your very quick reply.
Server A is Windows NT 4.0 Server and Server B is Unix Server.
Do I need to check the metalink parameter in Unix, when it becomes a calling Server ?
For Server A, what should I check on USE_SHARED_SOCKET parameter ?
Could you brief me on this ? Is it configured in Windows Registry ? Is it located in HK_LOCAL_MACHINE ?
Or where ?
Looking forward to hearing from you soon.

Best Regards,
Mohamad Wahyudi
WCS IT Infrastructure - Network & Telecommunications Services
* Addr.    : ABN AMRO Bank NV - Jakarta Branch, 2nd level. Jl. Ir. H. Juanda 23-24 Jakarta 10120, Indonesia
* Phone   : +62 (0) 21 3820678
* Mobile    : +62 (0) 811 800131
* Fax        : +62 (0) 21 2312990
* e-mail    : wah.yudi@id.abnamro.com
Re: TNSPing is OK but connect by sqlplus is error [message #67643 is a reply to message #67642] Tue, 30 November 2004 16:11 Go to previous message
Nguyen Lam
Messages: 2
Registered: October 2004
Junior Member
Dear Mohamad Wahyudi,
I've just resolve the problem by setting the registry value:
It located at: HKEY_LOCAL_MACHINESOFTWAREORACLEHOME0
At the following key: USE_SHARED_SOCKET (string value) with value: TRUE
Reboot your machine and ... ok!
Hope it solve your problem!

Regards,
Lam Nguyen
IT Dept,
MHB Bank, Vietnam
* Addr. : MHB Bank - Head Office - 09 Vo Van Tan street, Dist 3, Ho Chi Minh City, Vietnam
* Phone : +848 9302509
* e-mail : lamnguyen@mhb.com.vn
Previous Topic: find oracle servers on network
Next Topic: Connectivity problems between Oracle9i and Forms 6
Goto Forum:
  


Current Time: Thu May 02 02:43:47 CDT 2024