How to Trace the JDBC Driver
-
Upload
naveedshakur -
Category
Documents
-
view
222 -
download
0
Transcript of How to Trace the JDBC Driver
-
7/26/2019 How to Trace the JDBC Driver
1/5
How To Trace the JDBC driver To Bottom
In this Document
Goal
Solution
Managing log files
References
APPLIES TO:
JDBC - Version 10.1.0 to 12.1.0.1.0Information in this ocument a!!lies to an" !latform.
GOAL
#he !ur!ose of this ocument is to illustrate the JDBC 10g$11g tracing feature. #his is alsoreferre as JDBC logging.
JDBC logging is no% ocumente in the JDBC De&elo!er's guie(
)racle Data*ase JDBC De&elo!er's Guie+11g Release 2 ,11.2art /um*er 134-0251 Diagnosa*ilit" in JDBC6ogging
)racle7 Data*ase JDBC De&elo!er's Guie12c Release 1 ,12.138500-052 Diagnosa*ilit" in JDBC6ogging
rior to JDBC 10g+ the JDBC 8i ri&er use a ifferent metho for logging. Starting %ith 10gR1an as of current &ersions+ the JDBC ri&er relies on the stanar java.util.loggingframe%or9!ro&ie %ith JD: 1.3 an higher.
https://support.oracle.com/epmos/faces/DocumentDisplay?_afrLoop=559102552399092&parent=SrDetailText&sourceId=3-12541581571&id=338433.1&_afrWindowMode=0&_adf.ctrl-state=uizq7yw4p_174https://support.oracle.com/epmos/faces/DocumentDisplay?_afrLoop=559102552399092&parent=SrDetailText&sourceId=3-12541581571&id=338433.1&_afrWindowMode=0&_adf.ctrl-state=uizq7yw4p_174#GOALhttps://support.oracle.com/epmos/faces/DocumentDisplay?_afrLoop=559102552399092&parent=SrDetailText&sourceId=3-12541581571&id=338433.1&_afrWindowMode=0&_adf.ctrl-state=uizq7yw4p_174#FIXhttps://support.oracle.com/epmos/faces/DocumentDisplay?_afrLoop=559102552399092&parent=SrDetailText&sourceId=3-12541581571&id=338433.1&_afrWindowMode=0&_adf.ctrl-state=uizq7yw4p_174#aref_section22https://support.oracle.com/epmos/faces/DocumentDisplay?_afrLoop=559102552399092&parent=SrDetailText&sourceId=3-12541581571&id=338433.1&_afrWindowMode=0&_adf.ctrl-state=uizq7yw4p_174#REFhttp://download.oracle.com/docs/cd/E11882_01/java.112/e16548/diagnose.htm#CIAGBGFIhttp://docs.oracle.com/database/121/JJDBC/diagnose.htm#CIAGBGFIhttps://support.oracle.com/epmos/faces/DocumentDisplay?_afrLoop=559102552399092&parent=SrDetailText&sourceId=3-12541581571&id=338433.1&_afrWindowMode=0&_adf.ctrl-state=uizq7yw4p_174#GOALhttps://support.oracle.com/epmos/faces/DocumentDisplay?_afrLoop=559102552399092&parent=SrDetailText&sourceId=3-12541581571&id=338433.1&_afrWindowMode=0&_adf.ctrl-state=uizq7yw4p_174#FIXhttps://support.oracle.com/epmos/faces/DocumentDisplay?_afrLoop=559102552399092&parent=SrDetailText&sourceId=3-12541581571&id=338433.1&_afrWindowMode=0&_adf.ctrl-state=uizq7yw4p_174#aref_section22https://support.oracle.com/epmos/faces/DocumentDisplay?_afrLoop=559102552399092&parent=SrDetailText&sourceId=3-12541581571&id=338433.1&_afrWindowMode=0&_adf.ctrl-state=uizq7yw4p_174#REFhttp://download.oracle.com/docs/cd/E11882_01/java.112/e16548/diagnose.htm#CIAGBGFIhttp://docs.oracle.com/database/121/JJDBC/diagnose.htm#CIAGBGFIhttps://support.oracle.com/epmos/faces/DocumentDisplay?_afrLoop=559102552399092&parent=SrDetailText&sourceId=3-12541581571&id=338433.1&_afrWindowMode=0&_adf.ctrl-state=uizq7yw4p_174 -
7/26/2019 How to Trace the JDBC Driver
2/5
SOLUTION
#he JDBC ri&er tracing facilit" utili;es !ac9age
-
7/26/2019 How to Trace the JDBC Driver
3/5
Tracing Levels
@or e&er" logger there are ifferent le&els one can set. De!ening on the information re?uireone can s!ecif" general le&el %ith less out!ut or &er" etaile out!ut. #he tracing le&els can ha&e
the follo%ing &alues(
I/@)
o JDBC =I le&el tracing
o e>!ecte &olume( lo%
SVR
o rogram error eg. an une>!ecte &alue encountere in a s%itch statement
o rror conitions that usuall" lea to catastro!hic or unreco&era*le results
o e>!ecte &olume( lo%
A=R/I/G
o rror conitions that are usuall" reco&era*le
o e>!ecte &olume( lo%
@I/
o @unction entr"$return information
o e>!ecte &olume( meium
@I/R
o igh-le&el e*ug information
o e>!ecte &olume( meium
@I/S#
o Detail e*ug information
-
7/26/2019 How to Trace the JDBC Driver
4/5
o e>!ecte &olume( high
C)/@IG
o S6 string
o e>!ecte &olume( lo%
Tracing JDBC Using System Properties
#o ena*le the logging *" using S"stem !ro!erties "ou %ill nee a so calle !ro!erties file. #heJDBC irector" has a com!lete sam!le logging !ro!erties file calleOracleLog.properties. #hisfile is locate in )R=C6E)M$ or higher JD: &ersion
2. Fse the e*ug li*rar" of the JDBC Dri&er+ such as ojdbc14_g.jar10g ri&eror ojdbc5_g.jaror ojdbc6_g.jar11g ri&er
5. Create a !ro!erties file to set the ifferent le&els of tracing+ for e>am!le(
handlers=java.util.logging.ConsoleHandler,java.util.logging.FileHandler
# default file output is in user's home directory.
java.util.logging.FileHandler.pattern = jdbc.log
# example of a full pathname in indo!s
#java.util.logging.FileHandler.pattern="$$temp$$jdbc%&.log
java.util.logging.FileHandler.limit = ())))
java.util.logging.FileHandler.count = %java.util.logging.FileHandler.formatter = java.util.logging.*+Formatter
java.util.logging.FileHandler.append = true
# -redefined levels are , /01020, 23435, 43F6, C63F45, F430, F4302,
# F430/7, 6FF
# /etting this to /01020 avoids duplicate output from default logger
java.util.logging.ConsoleHandler.level = /01020
java.util.logging.ConsoleHandler.formatter = java.util.logging./impleFormatter
-
7/26/2019 How to Trace the JDBC Driver
5/5
oracle.jdbc.level = F430/7
3. #o run the test %ith tracing ena*le use follo%ing comman(