tnsping at local and remote host? | Unix Linux Forums | Shell Programming and Scripting

  Go Back    


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

tnsping at local and remote host?

Shell Programming and Scripting


Tags
ping, ping port, port, port ping

Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 03-16-2007
milo milo is offline
Registered User
 
Join Date: Nov 2006
Last Activity: 23 November 2011, 1:26 PM EST
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
tnsping at local and remote host?

Hi all,

There are two hosts (A & B) as Oracle clients connect to a Oracle server. From host A, using tnsping have good result

A$ /opt/app/oracle/product/9.2.0.1.0/bin/tnsping crbt

TNS Ping Utility for Solaris: Version 9.2.0.1.0 - Production on 16-MAR-2007 16:24:41

Copyright (c) 1997 Oracle Corporation. All rights reserved.

Used parameter files:
/opt/app/oracle/product/9.2.0.1.0/network/admin/sqlnet.ora

Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = Oracle-1)(PORT = 1521))) (CONNECT_DATA = (SERVICE_NAME = crbt)))
OK (70 msec)


But from host B, using rsh to check DB connectivity of A, it doesn't work

B$ rsh A -l user /opt/app/oracle/product/9.2.0.1.0/bin/tnsping crbt

TNS Ping Utility for Solaris: Version 9.2.0.1.0 - Production on 16-MAR-2007 16:06:34

Copyright (c) 1997 Oracle Corporation. All rights reserved.

Message 3511 not found; No message file for product=network, facility=TNSTNS-03505: Message 3505 not found; No message file for product=network, facility=TNS


If you experience with this, appreciate for advice.

Thanks,
milo
Sponsored Links
    #2  
Old 03-16-2007
Deal_NoDeal Deal_NoDeal is offline
Registered User
 
Join Date: Feb 2007
Last Activity: 28 March 2008, 10:35 AM EDT
Location: Boston, MA
Posts: 64
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by milo
Hi all,

There are two hosts (A & B) as Oracle clients connect to a Oracle server. From host A, using tnsping have good result

A$ /opt/app/oracle/product/9.2.0.1.0/bin/tnsping crbt

TNS Ping Utility for Solaris: Version 9.2.0.1.0 - Production on 16-MAR-2007 16:24:41

Copyright (c) 1997 Oracle Corporation. All rights reserved.

Used parameter files:
/opt/app/oracle/product/9.2.0.1.0/network/admin/sqlnet.ora

Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = Oracle-1)(PORT = 1521))) (CONNECT_DATA = (SERVICE_NAME = crbt)))
OK (70 msec)


But from host B, using rsh to check DB connectivity of A, it doesn't work

B$ rsh A -l user /opt/app/oracle/product/9.2.0.1.0/bin/tnsping crbt

TNS Ping Utility for Solaris: Version 9.2.0.1.0 - Production on 16-MAR-2007 16:06:34

Copyright (c) 1997 Oracle Corporation. All rights reserved.

Message 3511 not found; No message file for product=network, facility=TNSTNS-03505: Message 3505 not found; No message file for product=network, facility=TNS


If you experience with this, appreciate for advice.

Thanks,
milo

Ok here is what I would guess. When you "rsh" the ORACLE related env variables (E.g $ORACLE_SID, $ORACLE_HOME) do not get set and that's why the tnsping fails.

So, what you have to basically do is write a wrapper script script around tnsping which set the env variables and then call that script from the rsh.

E.g mytnsping.sh
#!/bin/sh

export ORACLE_SID=/aaa/bbb/watever1
export ORACLE_HOME=/ccc/ddd/watever2

/opt/app/oracle/product/9.2.0.1.0/bin/tnsping crbt

Now, call this from rsh like

rsh A -l user mytnsping.sh

Let me know if this works. This is only a guess - I did not try it
Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
what command for copy a filesystem (local host or remote host) bora99 Linux 1 02-29-2012 07:05 AM
Help! How to find the local host after few ssh hops to remote host??? gomes1333 UNIX for Advanced & Expert Users 3 03-27-2010 10:49 PM
running commands to remote host from centralized host anjum.suri Shell Programming and Scripting 6 08-18-2009 10:55 AM
Run a shell script from one host which connext to remote host and run the commands SN2009 Shell Programming and Scripting 6 04-13-2009 04:39 AM
How to delete the files from local host to remote host krishna176 Solaris 3 03-24-2007 04:48 PM



All times are GMT -4. The time now is 11:44 PM.