Solved

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

Posted on 2013-06-28
6
825 Views
Last Modified: 2013-06-28
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
Comment
Question by:joaotelles
  • 3
  • 2
6 Comments
 
LVL 76

Accepted Solution

by:
slightwv (䄆 Netminder) earned 500 total points
Comment Utility
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
 

Author Comment

by:joaotelles
Comment Utility
# 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
 
LVL 76

Expert Comment

by:slightwv (䄆 Netminder)
Comment Utility
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
 

Author Comment

by:joaotelles
Comment Utility
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
 

Author Closing Comment

by:joaotelles
Comment Utility
Tks.
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Have you ever had to make fundamental changes to a table in Oracle, but haven't been able to get any downtime?  I'm talking things like: * Dropping columns * Shrinking allocated space * Removing chained blocks and restoring the PCTFREE * Re-or…
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
Via a live example, show how to take different types of Oracle backups using RMAN.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

772 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

10 Experts available now in Live!

Get 1:1 Help Now