Solved

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

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

Flexible connectivity for any environment

The KE6900 series can extend and deploy computers with high definition displays across multiple stations in a variety of applications that suit any environment. Expand computer use to stations across multiple rooms with dynamic access.

Question has a verified solution.

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

Background In several of the companies I have worked for, I noticed that corporate reporting is off loaded from the production database and done mainly on a clone database which needs to be kept up to date daily by various means, be it a logical…
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.
This video shows setup options and the basic steps and syntax for duplicating (cloning) a database from one instance to another. Examples are given for duplicating to the same machine and to different machines
This video shows how to copy an entire tablespace from one database to another database using Transportable Tablespace functionality.
Suggested Courses

630 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