Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 279 Vote(s) - 3.48 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to install tnsping?

#1
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.
Reply

#2
Oracle Instance Client does not include `tsnping` application. You must run "Oracle Universal Installer" and enable the option for it.

I don't' remember exactly which option you have to set, either it was "Oracle Database Utilities" or "Oracle Net"

[![enter image description here][1]][1]


[1]:
Reply

#3
Here's what I did to copy `tnsping` over to another machine. In my case, the oracle client is installed at `C:\Oracle\product\12.1.0\client_1`.

This assumes there's already an Instant Client or similar installed on the destination machine; and that the oracle path and registry keys are set.

(1) Copy `tnsping.exe` from the source to the destination machine, into `client_1\bin`.

(2) Copy the following files from `client_1\bin` to `client_1\bin`:

oraasmclnt12.dll
oracell12.dll
oraclient12.dll
oraclsce12.dll
oracommon12.dll
oracore12.dll
orageneric12.dll
orahasgen12.dll
oraldapclnt12.dll
oran12.dll
orancds12.dll
orancrypt12.dll
oranhost12.dll
oranl12.dll
oranldap12.dll
oranls12.dll
oranro12.dll
orantcp12.dll
orantns12.dll
oraocr12.dll
oraocrb12.dll
oraocrutl12.dll
oraplp12.dll
orapls12.dll
ORASLAX12.DLL
orasnls12.dll
oraunls12.dll
orauts.dll
oravsn12.dll
oraxml12.dll
orazt12.dll
oraztkg12.dll

This should be about 84.6 MB.

(3) In the `client_1` on the destination machine, make a backup of the following files:

oci.dll
orannzsbb12.dll
oraons.dll
orasql12.dll
orawsec12.dll

Now on the source machine, find those files in `client_1\bin` and copy them to `client_1\` (no bin) on the destination machine, overwriting the existing files. (Note: oci.dll is ~330 kb smaller, orasql12.dll is ~300 kb smaller. I'm not sure what's lost, hence the backup).

(4) On the destination machine, create the directory `mesg` in `client_1\Network`. Now copy the following file from the source to the destination:

client_1\Network\mesg\tnsus.msb

(5) Open up regedit. Create the following key:

HKEY_LOCAL_MACHINE\SOFTWARE\Oracle\KEY_OraClient12Home1_32bit

(From another machine, it looks like the x64 version is named `HKEY_LOCAL_MACHINE\SOFTWARE\Oracle\KEY_OraClient12Home1`, but the `tnsping` program I'm using says it's 64 bit, so ...)

Under the key, create a string named `ORACLE_HOME` with the value `C:\Oracle\product\12.1.0\client_1`.

You should be done now (`$$$` = redacted):

C:\Users\$$$>tnsping $$$

TNS Ping Utility for 64-bit Windows: Version 12.1.0.2.0 - Production on 03-APR-2
019 08:47:37

Copyright © 1997, 2014, Oracle. All rights reserved.

Used parameter files:
C:\Oracle\product\12.1.0\client_1\network\admin\sqlnet.ora


Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)
(HOST = $$$)(PORT = $$$))) (CONNECT_DATA = (SERVICE_NAME = $$$
$$$) (SERVER = DEDICATED)))
OK (30 msec)

-----

# Troubleshooting

Here's the process I followed, sharing for when these steps invariably fail to work on a later version.

First off, I just copied the `tnsping.exe` over.

I didn't haphazardly pick the above dlls, as far as I can tell everyone is required. I ran the exe, and it would popup an error, I would copy the dll over and try again:

[![missing from your computer][1]][1]

After a few dlls, you'll run into a different kind of error:

[![application unable to start][2]][2]

If that happens, fire up [process monitor](

[To see links please register here]

) and put a filter in for the ProcessName to contain `tnsping` and try to run the program again. You should see something like the following. The main thing to notice is that it tries to load (in this example) `orawsec12.dll`, which succeeds, but then it continues to try to load the dll looking in different paths, and then at the end it triggers `werfault` and the program ends. I guess it realizes there's some kind of version mismatch and keeps looking for the right version.

[![application unable to start][3]][3]

The missing registry key will show up like the following in process monitor (operation `RegOpenKey`, result `NAME NOT FOUND`):

[![registry name not found][4]][4]

If the `tnsus.msb` file is missing, you should see something like the following in process monitor (operation `CreateFile`, result `NAME NOT FOUND`):

[![filesystem name not found][5]][5]


[1]:

[2]:

[3]:

[4]:

[5]:
Reply

#4
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.
Reply

#5
Also see **McTnsping** [link broken] _"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.



[1]:

[To see links please register here]

Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through