Search code examples
db2db2-luw

db2top: How do I replace question marks (?, ?, ?) with actual values?


I'm running db2top like this:

db2top -d mydb -u myuser -p mypass 
Shift+D, Shift+W, q (after running a binary that executes sql commands)
cat db2adv.sql

and seeing lines like this:

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 (?, ?, ?) );

I understand that the ? are probably parameterized queries, but how can see the actual values that DB2 processes?


Solution

  • Hostvariables will not be shown in db2top. Also in DSM (Data Server Manager) or dsmtop the new tool (replacement tool for db2top) the content of your "?" is not shown. You can follow mustaccio's advise or use DB2 audit facility or an activity event monitor. These options would allow to see the details you are asking for.