ApexSQL Audit supports the possibility of installing its storage tables into a separated database. We will call "Audit Storage database" a database containing the Audit storage tables and "Audited database" a database for auditing.
You need to install DDL and Delete Architecture parts in Audit Storage database and at least the DDL Architecture part into the Audited database. The triggers won't be created without the DDL part. Reporting stored procedures are installed into Audit Storage database.
You may not install the Delete Architecture part into the Audited database; it's required only for removing of the Architecture and the triggers, so you may either install Delete part later or remove the triggers and Architecture manually.
Analyze Architecture part will be installed into your databases automatically along with necessary queries, so you may not care about them.
After the above steps you should edit the triggers’ template:
Hit Ctrl+R to open the Template Editor.
At the top of the template find and replace the default database name (that will match with a database name you are connected to):
DatabaseName = "[" & Audit.Database.Name & "]"
with the Audit Storage database name you plan to use:
DatabaseName = "[" & "_Audit_Storage_Database_"& "]"
Save your template.
Connect to your Audited database.
(Re)create the triggers in Audited database.
Note: You need to give the necessary rights for writing to Audit Storage database tables' owner.
For managing the triggers you should connect to the Audited database. For viewing the reports you should connect to the Audit Storage database.
There is one limitation in this approach: the UnDo procedure becomes unavailable.
Copyright © 2008 ApexSQL LLC. All Rights Reserved.