April 22, 2008 at 8:38 am
I know that we can use this query to pull the AuditLevel and LoginMode from the registry, but is there anyway to get this information without touching the registry in SQL Server 2000 and 2005? Also, does anybody know how to find out where this audit log file is being stored without touching the registry? Thanks
declare @SmoLoginMode int
exec master.dbo.xp_instance_regread N'HKEY_LOCAL_MACHINE', N'Software\Microsoft\MSSQLServer\MSSQLServer', N'LoginMode', @SmoLoginMode OUTPUT
declare @SmoAuditLevel int
exec master.dbo.xp_instance_regread N'HKEY_LOCAL_MACHINE', N'Software\Microsoft\MSSQLServer\MSSQLServer', N'AuditLevel', @SmoAuditLevel OUTPUT
SELECT
(case when @SmoLoginMode < 3 then @SmoLoginMode else 9 end) AS [LoginMode],
@SmoAuditLevel AS [AuditLevel]
April 22, 2008 at 9:51 pm
Even I believe that you find this information is available only in the Registry.
Regards,
Pradeep
Pradeep Adiga
Blog: sqldbadiaries.com
Twitter: @pradeepadiga
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply