Popular Posts

Sunday, May 8, 2011

Read Log file of SQL Server

             There are two types log file maintain SQL Server database (1) SQL server Log file and (2) SQL Agent log file.

we can read both log files by using inbuilt SP.
this SP using 4 type parameter.

(1)0-for SQL server log file (2) 1-for SQL Agent log file

Default parameter : SQL server 
 xp_readerrorlog 0

we can find log record by keyword.
   xp_readerrorlog 0,1,'Backup'


other we can know log file size by date.
same parameter 0,1.

sp_enumerrorlogs 1



No comments:

Post a Comment