--
-- sets auditing level to log failures
-- Tested and run on SQL 2000, not yet tested or known if the
-- registry settings are the same for sql 2005
--
xp_instance_regwrite N'HKEY_LOCAL_MACHINE',
N'SOFTWARE\Microsoft\MSSQLServer\MSSQLServer',
N'AuditLevel', REG_DWORD,2
exec xp_loginconfig 'audit level'
|