viewing sql log on the command line

  • Hi Folks,

    is there any way you can view the sql log (the one under management in SSMS) from the command line?

  • You can either use sqlcmd.exe to execute sp_readerrorlog or simply use a TYPE command command to open the file. Something like TYPE C:\Mssql.1\Log\Errorlog

    [font="Verdana"]Markus Bohse[/font]

  • bodhilove (8/19/2008)


    Hi Folks,

    is there any way you can view the sql log (the one under management in SSMS) from the command line?

    It's a simple text file and will open in any text editor. The path to the file is listed at the top of each error log, so you can check via management studio where they are.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass

Viewing 3 posts - 1 through 2 (of 2 total)

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