db2top:如何用实际值替换问号(?,,?)?

db2top:如何用实际值替换问号(?,,?)?,db2,db2-luw,Db2,Db2 Luw,我正在运行db2top,如下所示: db2top -d mydb -u myuser -p mypass Shift+D, Shift+W, q (after running a binary that executes sql commands) cat db2adv.sql insert into mydb.party (registered_number) values (:L0 ); select MAPPING_ELEMENT_ID from final table (INSER

我正在运行db2top,如下所示:

db2top -d mydb -u myuser -p mypass 
Shift+D, Shift+W, q (after running a binary that executes sql commands)
cat db2adv.sql
insert into mydb.party (registered_number) values (:L0 );

select MAPPING_ELEMENT_ID from final table (INSERT INTO CONFIG.MAPPING_ELEMENT (SQL_ACTION, META_ACTION, MAPPING_ID) VALUES (?, ?, ?) );
看到这样的线条:

db2top -d mydb -u myuser -p mypass 
Shift+D, Shift+W, q (after running a binary that executes sql commands)
cat db2adv.sql
insert into mydb.party (registered_number) values (:L0 );

select MAPPING_ELEMENT_ID from final table (INSERT INTO CONFIG.MAPPING_ELEMENT (SQL_ACTION, META_ACTION, MAPPING_ID) VALUES (?, ?, ?) );

我明白了吗?可能是参数化查询,但是如何才能看到DB2处理的实际值呢

主机变量不会显示在db2top中。此外,在DSM(数据服务器管理器)或dsmtop新工具(db2top的替换工具)中,也不会显示“?”的内容。
您可以遵循mustaccio的建议,或者使用DB2审计工具或活动事件监视器。这些选项将允许查看您要求的详细信息。

我认为您无法在服务器端捕获绑定值(除非您运行跟踪,而您不想这样做)。更好地使用ODBC或JDBC跟踪,这取决于应用程序使用的驱动程序。