List all configured audit events
This query is not very helpful other than getting the total count and the object ID’s. The queries that follow later join with various types to provide user-friendly information.
select r.registered_id, r.event,r.user_name
from dmi_registry r
where r.is_audittrail = 1
Across-the-board audit configuration
select 'ALL',r.event,r.user_name
from dmi_registry r
where r.is_audittrail = 1
and r.registered_id = '0000000000000000'
Audit configuration for types
select t.name,r.event,r.user_name
from dmi_registry r, dm_type t
where r.is_audittrail = 1
and t.r_object_id = r.registered_id
Audit configuration for Sysobjects
select t.object_name,r.event,r.user_name
from dmi_registry r, dm_sysobject t
where r.is_audittrail = 1
and t.r_object_id = r.registered_id
Audit configuration for users
select t.user_name,r.event,r.user_name
from dmi_registry r, dm_user t
where r.is_audittrail = 1
and t.r_object_id = r.registered_id