How to turn on SQL C2 logging to faciliate collections with InTrust.
Collecting SQL C2 logs with InTrust requires C2 logging first be turned on and the extended stored procedure xp_cmdshell be enabled.
To enable C2 logging and facilitate collections with InTrust complete the following steps:
1. In SQL Analyzer, run the following query to the relevant SQL server to enable advanced options (hidden by default):
EXEC master.dbo.sp_configure show advanced options, 1
2. Enable C2 audit mode:
EXEC sp_configure c2 audit mode, 1
This setting establishes the C2 audit trace and turns on the option to fail the server should the server be unable to write to the audit file for any reason.
3. In SQL Server 2005, also run the following command:
EXEC sp_configure xp_cmdshell, 1
4. Restart the SQL server to complete the procedure.