How to enable sqlnet tracing for debugging sqlplus traffic in RSA Identity Governance and Lifecycle
2 years ago
Originally Published: 2016-09-14
Article Number
000053748
Applies To
RSA Product Set: RSA Identity Governance and Lifecycle
Issue
Sometimes Oracle declines a connection to the database and additional debug is needed on the client side to see what request is being sent over.
Tasks
To enable sqlnet tracing you need to create a file in the directory that is defined using the TNS_ADMIN environment variable.

When using our installer to connect to a remote database this directory would be the directory prefixed with instantclient under /home/oracle.

To enable tracing for a failed installation, do not uninstall after the previous failed attempt so that the instantclient folder structure remains.

create a file named sqlnet.ora within that directory with these contents:
TRACE_LEVEL_CLIENT=USER
TRACE_FILENO_CLIENT=6
TRACE_FILELEN_CLIENT=51200
TRACE_UNIQUE_CLIENT=ON
TRACE_TIMESTAMP_CLIENT=ON
TRACE_DIRECTORY_CLIENT=/home/oracle/instantclient12_1/log
LOG_DIRECTORY_CLIENT=/home/oracle/instantclient12_1/log
DIAG_ADR_ENABLED=OFF

sqlnet operations look for the existence of this file at every execution.  The next attempted installation will log verbose information about the connection string being used and the result or results received.

For a detailed reference on the above parameters and additional parameters that can be set, please refer to this online Oracle reference:
http://docs.oracle.com/cd/B19306_01/network.102/b14213/sqlnet.htm