SQL Server System Table to find Error log

  • Hi

    can any one please let me know if there is any system table where i can find sql server error log details

    other than general text error log file and stored procedure sp_readerrorlog.

  • There is no system table for error log.

  • As been told, the errorlog is no database table. Query the registry (use xp_regread) for the location of the errorlog.

    You can also use this construction to copy the errorlogfile into a table:

    CREATE TABLE #LogContents(LogDate smalldatetime, ProcessInfo varchar(35), LogLine nvarchar(1024))

    INSERT INTO #LogContents EXEC master..sp_readerrorlog 0

    Wilfred
    The best things in life are the simple things

  • virgo (10/14/2008)


    Hi

    can any one please let me know if there is any system table where i can find sql server error log details

    other than general text error log file and stored procedure sp_readerrorlog.

    The text file is the error log and it's the only place that you find it. The proc readerrorlog just goes and reads that text file. It's not stored in the DB at all.

    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 4 posts - 1 through 4 (of 4 total)

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