Question

I'm working on re-compiling some Pro*C code that no one currently at my company has ever compiled. It's compiling OK, but when I copy it to the production server and run it I'm getting Oracle error ORA-12547 (TNS: lost contact)

Any ideas?

Was it helpful?

Solution

Oh, figured it out. :-)

The C executable isn't run directly on the server, but launched through a script that sets up the connection environment. i.e. something like this:

export SHLIB_PATH=/oracleDatabaseSidHere/oracle/10.2/lib:/usr/lib:/oracleDatabaseSidHere/oracle/10.2/odg/lib
export ORACLE_BASE=/oracleDatabaseSidHere/oracle
export ORACLE_SID=oracleDatabaseSidHere
export ORACLE_HOME=/oracleDatabaseSidHere/oracle/10.2

# Set up the path and executable to run
PATH=.\:$PATH:$ORACLE_HOME/bin:/usrlocal/bin
PATH=$PATH:/path_to_application_logs

cd /path_to_application
application

OTHER TIPS

Related to this, I just found out that I get the same error ORA-12547 TNS lost contact on my Windows machine when I try to connect to an Oracle database with PL/SQL and at the same time I have a VPN connection open.

I had a similar problem on Linux, Oracle 11gR2. Oracle owner could run SQL*Plus and get in via either TNS or local connection. Non-oracle user could log in via TNS, but not as local connection.

Turns out the answer was that the ORACLE_HOME filesystem was mounted "nosuid". Removing that mount option solved my issue.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top