Imports the SQL Server error log into a table, so that it can be queried
This is a "Stored Procedure" that can be saved in SQL Server and called when needed
By: Narayana Vyas Kondreddi, http://vyaskn.tripod.com, vyaskn@hotmail.com
Limitation: With error messages spanning more than one line only the first line is included in the table
Access to code is limited.
Login here using your Linkedin account. to see or download code.
No registration, not another password to remember, login using your Linkedin account and have access to all public codes in BoldCodes.com
LoginTo import the current error log to table myerrorlog
EXEC sp_import_errorlog 'myerrorlog'
To import the current error log to table myerrorlog, and overwrite the table 'myerrorlog' if it already exists
EXEC sp_import_errorlog 'myerrorlog', @overwrite = 1
To import the previous error log to table myerrorlog
EXEC sp_import_errorlog 'myerrorlog', 1
To import the second previous error log to table myerrorlog
EXEC sp_import_errorlog 'myerrorlog', 2
EXEC sp_import_errorlog 'myerrorlog'
To import the current error log to table myerrorlog, and overwrite the table 'myerrorlog' if it already exists
EXEC sp_import_errorlog 'myerrorlog', @overwrite = 1
To import the previous error log to table myerrorlog
EXEC sp_import_errorlog 'myerrorlog', 1
To import the second previous error log to table myerrorlog
EXEC sp_import_errorlog 'myerrorlog', 2
Views 3976
Downloads 1337
