Dynamic Monitoring of JDBC database access operations-p6spy and jdbcp6spy
P6spy is a JDBC Driver packaging tool. Through encapsulation of JDBC Driver, p6spy monitors and analyzes SQL statements for various purposes.
P6spy1.3 http://sourceforge.net/projects/p6spy/ sf.net? Source = directory
WSJdbcDataSource PoolConnectionDataSource
Ojdbc6 cannot be injected. It is confirmed that there may be version problems.
Officially confirmed that JDK 1.5 and later are not easy to use. It has been verified that it can be deployed under STS: mysql can be deployed, oracle cannot be deployed, and myeclipse can be deployed, but it cannot be deployed on WAS7, connectionPoolDataSource is not implemented at all, and there seems to be a problem in JDK 6.
Java-jar irontracksql_plus.jar can be viewed graphically. This tool can view the SQL requests sent by the application.
Module. ibeam = com. irongrid. ibeam. server. IBeamFactory
Monitorport = 2000
P6spy2 github.com https://github.com/p6spyusage
Add jar package
Direct Injection in jdbc strings
Conn = DriverManager. getConnection (
// "Jdbc: oracle: thin: @ 192.168.1.9: 1521: orcl ",
"Jdbc: p6spy: oracle: thin: @ 192.168.1.9: 1521: orcl ",
"System", "XXX ");
Conn = DriverManager. getConnection (
"Jdbc: p6spy: mysql: // 192.168.1.55: 3306/test ",
// "Jdbc: mysql: // 192.168.1.55: 3306/test ",
"XXX ",
"XXX ");