A new version of audit was introduced in version 6.2, replacing the old audit. There are a few significant changes but the most important one is that the audit is now fully integrated into the AGR Core and comes ready to be used and fully configured when you install or upgrade AGR. There is no longer a separate audit database but instead the data and configuration is contained within the database itself.
The audit consists of 2 main parts:
The content tracking part allows you to monitor the data for vital tables, such as the settings table. Out of the box AGR is already monitoring a number of tables.
The object tracking keeps track of the following object types:
When an object of the above type is created, altered or dropped an event is written to the core.audit_event table.
As with content tracking you can use the core.audit_event_list procedure to list changes to a specific object
In addition to the regular object tracking there is a table, core.audit_object_hash that contains more detailed information on each object in the database such as the original object definition and information on how many times this object has been modified. This can be helpful during updates to check if any of the core objects have been modified.
All of the audit is done via triggers.
The procedure core.audit_event_list has a few tricks up its sleeve:
from_date
& to_date
- for filtering the results by date and time, pretty basicfilter
- here you can filter the results by any column in the result set. This includes the columns of the table, if the object is a table. Note that when filtering on strings you need to double-quote the string. See examples belowrows
- if you are getting too many results you can use this to enter the maximum number of rows returnedsimple
- by default, you get a lot of un-interesting columns such as the IP number and program name. Setting this to true (1) will give you a simpler result setdebug
- enabling the debug will print out a query to work on instead of a result setThe ip_address column in core.audit_event is populated by using information from a DMV view that requires the VIEW_SERVER_STATE permissions. If the user doing the audit does not have this permission the ip address will show N/A