Database Reference
In-Depth Information
%ORACLE_HOME%\log\diag\clients\user_UserID\host_##########_##\trace
On the Oracle database, you may have to make the basic directory tree and grant all users the
privilege to write to it.
mkdir %ORACLE_HOME%\log\diag\clients
Here is an example of what you would see with level 4 trace enabled (only the first few lines are
shown):
Trace file D:\app\oracle\product\11.2.0\dbhome_1\log\diag\clients\
user_UserID\host_##########_##\trace\ora_2988_5952.trc
2011-07-09 07:22:35.826970 : --- TRACE CONFIGURATION INFORMATION FOLLOWS ---
2011-07-09 07:22:36.058905 : New trace stream is
D:\app\oracle\product\11.2.0\dbhome_1\log\diag\clients\
user_UserID\host_##########_##\trace\ora_2988_5952.trc
2011-07-09 07:22:36.058968 : New trace level is 4
2011-07-09 07:22:36.059012 : --- TRACE CONFIGURATION INFORMATION ENDS ---
2011-07-09 07:22:36.059057 : --- PARAMETER SOURCE INFORMATION FOLLOWS ---
2011-07-09 07:22:36.059105 : Attempted load of system pfile source
D:\app\oracle\product\11.2.0\dbhome_1\network\admin\sqlnet.ora
2011-07-09 07:22:36.059203 : Parameter source loaded successfully
2011-07-09 07:22:36.059241 :
2011-07-09 07:22:36.059275 : Attempted load of local pfile source
C:\OraJavSecure\Chapter11\wallet\sqlnet.ora
2011-07-09 07:22:36.059308 : Parameter source was not loaded
2011-07-09 07:22:36.059337 :
2011-07-09 07:22:36.059367 : -> PARAMETER TABLE LOAD RESULTS FOLLOW <-
2011-07-09 07:22:36.059402 : Successful parameter table load
2011-07-09 07:22:36.059435 : -> PARAMETER TABLE HAS THE FOLLOWING CONTENTS <-
2011-07-09 07:22:36.059472 : TRACE_LEVEL_CLIENT = 4
2011-07-09 07:22:36.059504 : SQLNET.WALLET_OVERRIDE = TRUE
...
Logging Oracle Thin Client Trace Data
When you are using Java thin ojdbc drivers, you cannot configure trace by the setting in sqlnet.ora . You
will need to use the logging features of the ojdbc drivers. To accomplish this, you need to place a
different ojdbc drivers jar, ojbdc6_g.jar , on your CLASSPATH (in front of or as a replacement for ojdbc6.jar ).
This alternate, logging jar file is available in the Oracle Client directory %ORACLE_HOME%\jdbc\lib, or
on the Oracle downloads web site:
http://www.oracle.com/technetwork/indexes/downloads/index.html.
Change directories to wallet. To run the TestWallet class using this driver file (and the wallet), you
can run a single Java command line. Trace logging and client wallet are unrelated; we are just using
TestWallet as a convenient example to show trace logging.
cd Chapter11/wallet
java -Doracle.jdbc.Trace=true
-cp .;%ORACLE_HOME%\jdbc\lib\ojdbc6_g.jar;%ORACLE_HOME%\jlib\oraclepki.jar
-Djava.util.logging.config.file=OracleLog.properties TestWallet > temp.txt 2> temp2.txt
 
Search WWH ::




Custom Search