Henry

曾经沧海难为水,除却巫山不是云,取次花丛懒回顾,半缘修道半缘君。

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理
USE master
GO
xp_readerrorlog 0, 1, N'Logging SQL Server messages in file', NULL, NULL, N'asc' 
GO

 

XP_READERRRORLOG

The parameters you can use with XP_READERRRORLOG are mentioned below for your reference:

1. Value of error log file you want to read: 0 = current, 1 = Archive #1, 2 = Archive #2, etc...
2. Log file type: 1 or NULL = error log, 2 = SQL Agent log
3. Search string 1: String one you want to search for
4. Search string 2: String two you want to search for to further refine the results
5. Search from start time
6. Search to end time
7. Sort order for results: N'asc' = ascending, N'desc' = descending

posted on 2011-10-28 22:53  Henry.Lau  阅读(432)  评论(0编辑  收藏  举报