Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to install tnsping?

Tags:

oracle

tnsping

How do I have to install tnsping? I tried to install oracle-instantclient12.1-basic-12.1.0.2.0-1.x86_64.rpm and I'm able to use some client commands but nog tnsping.

like image 293
DenCowboy Avatar asked Sep 29 '16 08:09

DenCowboy


2 Answers

Also see McTnsping "a Windows stand-alone program which requires no Oracle client". It's portable and doesn't need to be installed.

Usage 1: McTnsping.exe { <tns entry> | <host>:<port> } [<count>]

<tns entry>    the net service name in the tnsnames.ora file.
<host>:<port>  server name or IP and port (mandatory)
<count>        number of times to check target, default is 1.
like image 173
matt wilkie Avatar answered Oct 28 '22 12:10

matt wilkie


If whoever will reach the place like me... This is what worked for me:

Instant client Version 12.2.0.1 + sqlplus + tnsping (copied from another server of the same version)

Directory structure and env (as in bash profile):

export ORACLE_BASE=/opt/oracle
export ORACLE_HOME=${ORACLE_BASE}/instant_client122
export PATH=$ORACLE_HOME:$PATH
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME #since all binaries are in $ORACLE_HOME - no bin or lib are present
export TNS_ADMIN=$ORACLE_HOME/network/admin

copy from another server to target:

'tnsping' to $ORACLE_HOME
'$ORACLE_HOME/network/mesg/tnsus.msb' to $ORACLE_HOME/network/mesg

Then put proper values to $TNS_ADMIN/tnsnames.ora and load env variables. After this it should be able to perform 'tnsping' and show proper message as a response.

like image 43
st0ne_c0ld Avatar answered Oct 28 '22 12:10

st0ne_c0ld