Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 920
  • Last Modified:

Oracle 11.2 - trying to conect to DB from a remote client

Hi,

I have  a DB running in one server and I want to be able to connect to it from a remote server (RHEL server)..

So I installed the instant client 11.2 on the client side (basic + sqlplus) but I still get:

sqlplus system/manager

SQL*Plus: Release 12.1.0.1.0 Production on Fri Jun 28 10:58:11 2013

Copyright (c) 1982, 2013, Oracle.  All rights reserved.

ERROR:
ORA-12543: TNS:destination host unreachable


=====

I have configured properly the tnsnames and the sqlnet:

more tnsnames.ora
# TNSNAMES.ORA Network Configuration File:
DP9A =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 172.16.4.37)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = DP9A)
    )
  )

> more sqlnet.ora
NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)

=======

Also I added some env variables:

ORACLE_HOME=/opt/smarttrust/dpa/thirdparty/instantclient
TNS_ADMIN=/opt/smarttrust/dpa/thirdparty/instantclient
TNS_NAMES=/opt/smarttrust/dpa/thirdparty/instantclient
TWO_TASK=DP9A
ORACLE_SID=DP9A


I can ping the DB server from the client:

ping 172.16.4.37
PING 172.16.4.37 (172.16.4.37) 56(84) bytes of data.
64 bytes from 172.16.4.37: icmp_seq=1 ttl=64 time=0.174 ms
64 bytes from 172.16.4.37: icmp_seq=2 ttl=64 time=0.262 ms
64 bytes from 172.16.4.37: icmp_seq=3 ttl=64 time=0.192 ms
64 bytes from 172.16.4.37: icmp_seq=4 ttl=64 time=0.231 ms


And I can access the DB from the DB server.

Any suggestion?
0
joaotelles
Asked:
joaotelles
  • 3
  • 2
1 Solution
 
slightwv (䄆 Netminder) Commented:
Is there a firewall between the machines?  It might be blocking the connection.

What happens when you try:
telnet 172.16.4.37 1521
0
 
joaotellesAuthor Commented:
# telnet 172.16.4.37 1521
Trying 172.16.4.37...
telnet: connect to address 172.16.4.37: No route to host

Is there anything I can configure on the client/server to side to overcome this?
0
 
slightwv (䄆 Netminder) Commented:
Could be just about anything.  Check with your network folks.

http://fixunix.com/networking/236868-no-route-host-but-ping-ok.html

My first guess is a firewall issue.
0
 
joaotellesAuthor Commented:
Just did it...

/etc/init.d/iptables stop
iptables: Flushing firewall rules:                         [  OK  ]
iptables: Setting chains to policy ACCEPT: filter          [  OK  ]
iptables: Unloading modules:                               [  OK  ]


And it worked.
0
 
joaotellesAuthor Commented:
Tks.
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now