2010. 8. 17. 16:23
Brain Trainning/DataBase
sp_readerrorlog
CREATE PROC [sys].[sp_readerrorlog]( |
xp_readerrorlog
Even though sp_readerrolog accepts only 4 parameters, the extended stored procedure accepts at least 7 parameters.
If this extended stored procedure is called directly the parameters are as follows:
- Value of error log file you want to read: 0 = current, 1 = Archive #1, 2 = Archive #2, etc...
- Log file type: 1 or NULL = error log, 2 = SQL Agent log
- Search string 1: String one you want to search for
- Search string 2: String two you want to search for to further refine the results
- Search from start time
- Search to end time
- Sort order for results: N'asc' = ascending, N'desc' = descending
EXEC master.dbo.xp_readerrorlog 6, 1, '2005', 'exec', NULL, NULL, N'desc' |
- 날짜 조회 방법
exec master.dbo.xp_readerrorlog 0, 1, null, null, '2010-08-15', '2010-08-17', N'asc'
'Brain Trainning > DataBase' 카테고리의 다른 글
Understanding How Restore and Recovery of Backups Work in SQL Server 2008 R2 (0) | 2010.08.19 |
---|---|
Understanding How Restore and Recovery of Backups Work in SQL Server 2005 (0) | 2010.08.19 |
특정이름의 테이블/SP 등등 삭제 (0) | 2010.08.13 |
버전 호환성 Upgrade 작업 후 해야할 작업 (0) | 2010.08.12 |
SP_Helpindex2 (0) | 2010.08.11 |