Hi all, I am looking for a way to be able to see what database/table(s) a Terdata MACRO inserts into, updates, or deletes from. We are setting query banding and are able to see the ALL of the tables the MACRO leverages, but simply are unable to determine which one(s) it is inserting into, updating or deleteing from.
Obviously we are looking for an automated way vs. showing the macro code and looking manually.
You might capture all sessons from pdcrinfo.dbqlobjtbl_hst for a macro, then all other objects touched by those sessions filtering on matching rows from dbqlogtbl where statementtype in (ins/upd/del).
this might work, I'd give it a try but I didn't test.
Thank you for the suggestion.
Both the PDCRINFO.DBQLOBJTBL and PDCRINFO.DBQLOBJTBL_hst have the same data. They both identify all of the tables referenced by QUERYID which is good; they just don’t call out what table it is writing to vs. reading from. In the PDCRINFO.DBQLOGTBL for the same QUERYID, the statement type is Insert and the QUERYTEXT is the execute of the Macro, like EXEC DBname.Macroname.