October 27, 2010 at 11:30 am
Had a rather odd problem this morning wth the SQL Log Viewer. At first when I looked at it the viewer was showing a gap of 3 hours in the record where one record has date/time stamp of 10/26/2010 200AM and the very next one has a Date/Time stamp of 10/26/2010 505AM; a 3 hour gap. At firts I thought something happened and the system was down for 3 hours but when I looked at the Windows Logs I found SQL Logins being recorded during this same 3 hour period. I went back to the SQL Log Viewer and low and behod the thing no longer has a 3 hour gap in it.
Has anyone else had odd results like with this the Log Viewer? Is the built in Log Viewer picky or finicky? Perhpas not the best tool to use for veiwing the log?
Kindest Regards,
Just say No to Facebook!November 1, 2010 at 2:54 pm
It happens to me when i have 20 different apps running
so after that I started using undocumented sp_readerrorlog which also allows you to search error logs.
Here is the syntax for it.
CREATE PROC [sys].[sp_readerrorlog](
@p1 INT = 0,
@p2 INT = NULL,
@p3 VARCHAR(255) = NULL,
@p4 VARCHAR(255) = NULL)
AS
BEGIN
IF (NOT IS_SRVROLEMEMBER(N'securityadmin') = 1)
BEGIN
RAISERROR(15003,-1,-1, N'securityadmin')
RETURN (1)
END
IF (@p2 IS NULL)
EXEC sys.xp_readerrorlog @p1
ELSE
EXEC sys.xp_readerrorlog @p1,@p2,@p3,@p4
END
November 2, 2010 at 8:56 am
If you want to do stuff properly and reliably with the tlog, get a copy of ApexSQL's log tool(s).
Best,
Kevin G. Boles
SQL Server Consultant
SQL MVP 2007-2012
TheSQLGuru on googles mail service
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply