How to query the LOG table in SQL to find changes made using the query CHANGE command in Aeries Query


To find all CHANGE queries executed:

SELECT * FROM LOG WITH (NOLOCK) WHERE CD = 'NetQryChgCmd'


The RCD column displays the number of records changed, the Aeries Query, and the SQL equivalent of the CHANGE query




To find CHANGE queries executed on a specific table, replace [xxx] with the desired table code

SELECT * FROM LOG WITH (NOLOCK) WHERE CD = 'NetQryChgCmd' AND OB = '[xxx]'


To find CHANGE queries performed by a specific user, replace [username] with the desired username

SELECT * FROM LOG WITH (NOLOCK) WHERE CD = 'NetQryChgCmd' AND USR = '[username]'


How to Find CHANGE Queries in the LOG table Using Aeries Query