Viewing SQL Server Logs with many records

  • Is there a better way to view the sql server logs other than the inbuild log viewer (maybe a system view that I could query)?

    My trouble is that the log viewer insits on pulling down all the log records which now number somewhere above 20 million (I got bored around this point and had to kill the process). Thus some way of telling the server to rotate the logs every million records or so would also be helpful.

  • You can cycle your error log   sp_cycle_errorlog  creates a new log, I normally schedule these just after midnight at a frequency which suits as required, e.g. every sunday, every night.

    [font="Comic Sans MS"]The GrumpyOldDBA[/font]
    www.grumpyolddba.co.uk
    http://sqlblogcasts.com/blogs/grumpyolddba/

  • Thats what I was looking for, thanks.

  • Still after cycling the errorlog I sometimes have a large errorlog - specielly when audit level is full - and the I use UltraEdit, but any other editor will do the trick. One benefit is that in the editor, it's easy to search in the errorlog.

    /Niels Grove-Rasmussen

  • I have simply changed ours to audit only failed logins attempts. Why on earth would you want to see every single good login ?  No wonder your logs are so large.

  • It is only auditing the failed attempts .

  • It always depends upon what your concept of large is .. when I've enabled deadlocking trace flags I've often ended up with 80Mb logs per day - the easisest way to view these was wordpad, copy the current log first. depends how often you need to view your logs.

    [font="Comic Sans MS"]The GrumpyOldDBA[/font]
    www.grumpyolddba.co.uk
    http://sqlblogcasts.com/blogs/grumpyolddba/

Viewing 7 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic. Login to reply