我们可以与JDBC驱动程序连接以查看当前正在执行的查询吗?

时间:2022-05-16 20:50:25

Is there any way we can see the currently executing queries initiated from a java dynamic web application ? Is it possible to do so by interfacing with the JDBC Driver ?

有什么方法可以看到从Java动态Web应用程序启动的当前正在执行的查询?是否可以通过与JDBC驱动程序连接来实现?

1 个解决方案

#1


1  

P6Spy can be used for that.

P6Spy可以用于此。

P6Spy functions like proxy, intercepting and logging JDBC calls and forwarding them to the real driver afterwards. In the application is the JDBC connection configured to go to the P6Spy driver and then inside the P6Spy configuration is the real connection configured to which P6Spy forwards.

P6Spy的功能类似于代理,拦截和记录JDBC调用,然后将它们转发给真正的驱动程序。在应用程序中,JDBC连接配置为转到P6Spy驱动程序,然后在P6Spy配置内部配置为P6Spy转发的真实连接。

There is also number of alternatives.

还有许多替代品。

#1


1  

P6Spy can be used for that.

P6Spy可以用于此。

P6Spy functions like proxy, intercepting and logging JDBC calls and forwarding them to the real driver afterwards. In the application is the JDBC connection configured to go to the P6Spy driver and then inside the P6Spy configuration is the real connection configured to which P6Spy forwards.

P6Spy的功能类似于代理,拦截和记录JDBC调用,然后将它们转发给真正的驱动程序。在应用程序中,JDBC连接配置为转到P6Spy驱动程序,然后在P6Spy配置内部配置为P6Spy转发的真实连接。

There is also number of alternatives.

还有许多替代品。