xp_readerrorlog parameter detail

Recently we had  hardware and performance issues on SQL Server,with our client , so while monitoring the system we also looked at error log. We used xp_readerrorlog procedure.
This is really useful procedure and I feel I should share some information for this undocumented store procedures






xp_readerrorlog  has four parameters
1.EXEC Xp_readerrorlog 0

here 0 stands for file number where latest file has 0 number and subsequent rolled over file has incremented  number. So this will display current errorlog file while incremented number will subsequent show rolled over file for


2.EXEC Xp_readerrorlog    0,   1
here secound parameter has two values
1. error log
2 agent log

yes we can get agent log also from this proc :-)



EXEC Xp_readerrorlog    0,   1





EXEC Xp_readerrorlog    0,   1




3.EXEC Xp_readerrorlog     0,    1,    'dbcc'
This will search for string which has 'dbcc' word in it



4.EXEC Xp_readerrorlog    0,    1,    'dbcc',    'traceon'

this will filter result set more and give result which has both 'dbcc' and 'traceon' words in it

4 comments:

Alexey Knyazev said...

exec xp_readerrorlog 0, 1, N'DBCC', N'3604', '20120401', '20120401 18:00';

5) '20120401' - StartTime
6) '20120401 18:00' - EndTime

Anonymous said...

nice work

Anonymous said...

seventh parameter: sort order

exec xp_readerrorlog 0, 1, N'DBCC', N'3604', '20120901', '20121026 12:00', 'DESC'

bantal silikon-a said...

Jacket Leather Indonesia
Civet Coffee Indonesia
http://bantalsilikon01.blogspot.com/
jual sangkar

jual bantal jual bantal jual bantal jual bantal jual bantal jual bantal jual bantal jual bantal jual bantal jual bantal jual bantal jual bantal jual bantal
cd anne jelita brenda anne caca tasya ruth
bantal web bantal bantal silikon pembicara hellow
bumbu bumbu bumbu bumbu bumbu distro distro

marinirseo
distro
sabunherbal
keset
bantal
seo
distro
marinir
bumbu

Post a Comment

Amazon Contextual Product Ads

Popular Posts