Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2013-06-28
6
Medium Priority
?
900 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 77

Accepted Solution

by:
slightwv (䄆 Netminder) earned 2000 total points
ID: 39284682
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
ID: 39284955
# 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 77

Expert Comment

by:slightwv (䄆 Netminder)
ID: 39284973
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
ID: 39285017
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
ID: 39285020
Tks.
0

Featured Post

Simple, centralized multimedia control

Watch and learn to see how ATEN provided an easy and effective way for three jointly-owned pubs to control the 60 televisions located across their three venues utilizing the ATEN Control System, Modular Matrix Switch and HDBaseT extenders.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I remember the day when someone asked me to create a user for an application developement. The user should be able to create views and materialized views and, so, I used the following syntax: (CODE) This way, I guessed, I would ensure that use…
Fine Tune your automatic Updates for Ubuntu / Debian
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
This video explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.
Suggested Courses

670 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