Oracle DB SQL-Net Trace Procedure
Oracle DB SQL-Net Trace Procedure
The following is the static method of enabling SQL*Net tracing, via edits to the sqlnet.ora file.
This method requires a bounce of the DB to pick up the changes to sqlnet.ora.
There is a dynamic method (MOS Note 1550897.1) that is more complex but does not require a
DB outage. This can be useful if you need to enable limited tracing in a production environment
where bouncing the DB is not possible.
Table of Contents
References:............................................................................................................................1
Trace Levels (from 12c Net Svcs Admin Guide)....................................................................1
1. SERVER side tracing.............................................................................................................2
2. CLIENT side tracing...............................................................................................................3
2.A. SQL*Developer Tracing..................................................................................................4
FULL ORACLE CLIENT TRACING.......................................................................................4
JAVA NET TRACE with LISTENER.....................................................................................7
2.B. JDBC client-side tracing/logging.....................................................................................8
References:
● SQL*Net & Oracle Net Services - Tracing and Logging at a Glance (MOS Note 219968.1)
● 12c Database Net Services Administrator's Guide
● 12c Database Net Services Reference
trace_directory_client=/<linux path> or
\<windows path> Directory where trace files are written to
This approach requires that the platform where you want to trace under SQL*Developer also is
configured with the full Oracle Client stack. First ensure that this is the case. Then follow these
steps in SQL*Developer:
1. Tools > Preferences > Database > Advanced -- gets you to this screen.
2. Click the box for Use Oracle Client
3. Click the Configure button below that to set the client home directory as described in this
article. (In our testing, the instant client did not work!)
6. Place the trace parameters in the sqlnet.ora file as outlined in the first section.
7. Open any database connection in SQL Developer and run these commands to show that the
configuration is functioning properly:
8. CONNECTION should show that the connection is using the OCI thick driver, which means it
should pick up the sqlnet.ora setings.
10. Verify that trace files were generated in the appropriate directory as you specified in the
trace_directory_client parameter.
JAVA NET TRACE with LISTENER
https://support.oracle.com/epmos/faces/DocContentDisplay?id=1390063.1
This is another method documented by Oracle that might work, but may have issues:
1. Documentation only certifies compatible through SQL Developer version 4. Version 20 is now
available.
2. It creates an intermediary “listener” on the client that may cause issues
3. It would not necessarily provide the detail Oracle is asking for
However, it might be worth a try in some settings. However, on Horizon VDIs and VMs we will
still need the CyberArk people to perform many of the client-side steps.
https://www.oracle.com/technetwork/database/enterprise-edition/jnettra
ce.jar
2. Run this command to set up the “listener” that will generate tracing on
connections to our problem database:
8090 is just a random port on the client that will be used by the listener. You
can use any free port.
Following command can be used to check for example if the port <8090> is
free:
netstat -na |find "8090"
The port is free if no line is returned.
3. Start SQL Developer and use this jdbc connection string to create a
connection to the problem database:
dbc:oracle:thin:@<ipaddress_of_VM>:8090:pubuat01
note that you will need to specify the IP of the VM (client) server
Open the connection, and all network interactions will be written to trace files
named client_*.trc in the c:\temp directory.
2.B. JDBC client-side tracing/logging
JDBC clients don’t have the SQLNET tracing capability configured (unless it is
the Oracle thick JDBC client). There are some possibilities for client-side
information if you look into these references: