如何在SAP HANA中获取PreparedStatement的SQL

时间:2021-01-13 16:53:52

I would like to log the SQL binding to the prepared statement. I'm using Java 8, JDBC driver. I'm using SAP hana DB. I have seen several posts that has oracle and other DBs but not SAP Hana.

我想将SQL绑定记录到预准备语句中。我正在使用Java 8,JDBC驱动程序。我正在使用SAP hana DB。我见过几个有oracle和其他数据库但没有SAP Hana的帖子。

Any help is appreciated.

任何帮助表示赞赏。

1 个解决方案

#1


1  

If you just want to trace this from a client side using JDBC you can simply use the JDBC trace for that. It clearly shows the prepare step and every binding that occurs. You might want to check the documentation for details.

如果您只想使用JDBC从客户端进行跟踪,则只需使用JDBC跟踪即可。它清楚地显示了准备步骤和发生的每个绑定。您可能需要查看文档以获取详细信息。

#1


1  

If you just want to trace this from a client side using JDBC you can simply use the JDBC trace for that. It clearly shows the prepare step and every binding that occurs. You might want to check the documentation for details.

如果您只想使用JDBC从客户端进行跟踪,则只需使用JDBC跟踪即可。它清楚地显示了准备步骤和发生的每个绑定。您可能需要查看文档以获取详细信息。