Scan SQL Server Error Log
create table #t_789(Log_date datetime,Process_Info Nvarchar(1000),Txt Nvarchar(3500) )
insert into #t_789 exec sp_readerrorlog;
insert into #t_789 exec sp_readerrorlog 1;
insert into #t_789 exec sp_readerrorlog 2;
insert into #t_789 exec sp_readerrorlog 3;
select * from #t_789 where Txt like '%error %';
Scan Current Error Log
--create table #t_789(Log_date datetime,Process_Info Nvarchar(1000),Txt Nvarchar(3500) )
truncate table #t_789
insert into #t_789 exec sp_readerrorlog;
select Log_date,txt from #t_789 order by 1 desc ;
No comments:
Post a Comment
If you have any doubt or question, please contact us.