rborda
asked on
How to obtain some fields out of the security log created by SQL Server
Thank you in advance for any input,
I need two get only the user and the date out of the "security log" that shows user's logon/logoff data.
This log is found under Management\SQL Server Logs\Current... then there are several Archives.
The following two selects does not provide me with the same information that the log contains:
select * from sys.server_principals
select * from sys.database_principals
I need two get only the user and the date out of the "security log" that shows user's logon/logoff data.
This log is found under Management\SQL Server Logs\Current... then there are several Archives.
The following two selects does not provide me with the same information that the log contains:
select * from sys.server_principals
select * from sys.database_principals
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
http://www.databasejournal.com/img/sp_import_errorlog.sql
using this stored procedure:
EXEC sp_readerrorlog @log_number