Solved

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

Posted on 2013-06-28
6
870 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 500 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

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

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

Suggested Solutions

Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
Shell script to create broker configuration file using current broker Configuration, solely for purpose of backup on Linux. Script may need to be modified depending on OS-installation. Please deploy and verify the script in a test environment.
This video shows how to Export data from an Oracle database using the Datapump Export Utility.  The corresponding Datapump Import utility is also discussed and demonstrated.
This video shows how to configure and send email from and Oracle database using both UTL_SMTP and UTL_MAIL, as well as comparing UTL_SMTP to a manual SMTP conversation with a mail server.

710 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