A useful tip for look into the ERRORLOG, is use a SELECT statement with ERROLOG as table.
First is necessary to create a table with the structure of the ERROLOG outcome.
CREATE TABLE TBLERRORLOG
(
LOGDATE DATETIME,
PROCESSINFO VARCHAR(30),
DETAIL VARCHAR(8000)
)
Then, full the table with the results of extended stored procedure xp_readerrolog:
INSERT INTO TBLERRORLOG exec master..xp_readerrorlog
Now is possible SELECT the table TBLERRORLOG with a certain filter:
SELECT * FROM TBLERRORLOG where DETAIL like '%master%'
If you have several error logs, you can use the following code:
truncate table TBLERRORLOG
Go
INSERT INTO TBLERRORLOG exec sp_readerrorlog 2
go
SELECT * FROM TBLERRORLOG where DETAIL like '%master%'
0 comentarios:
Publicar un comentario