Problem viewing SQL Server Logs

  • When I click on SQL Server Logs from Management Studio I get the following error message:

    TITLE: Microsoft SQL Server Management Studio

    ------------------------------

    Failed to retrieve data for this request. (Microsoft.SqlServer.SmoEnum)

    For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&LinkId=20476

    ------------------------------

    ADDITIONAL INFORMATION:

    An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)

    ------------------------------

    A severe error occurred on the current command. The results, if any, should be discarded. (Microsoft SQL Server, Error: 0)

    For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=09.00.3054&EvtSrc=MSSQLServer&EvtID=0&LinkId=20476

    ------------------------------

    BUTTONS:

    OK

    ------------------------------

    I tried to view SQL Server Logs through the Log File Viewer but it's not accessible. Please help!

    Thanks,

    M

  • Sometimes the logs get very large and MS just times out, don't know if this is your issue, but either way I prefer to use a script to get the logs, that way I can easily filter. Put this together from a previous version in 2000.

    -- SQL SERVER 2005

    use master

    CREATE TABLE #Errors (logdate datetime, processinfo varchar (4000), vchMessage varchar(4000) )

    INSERT #Errors EXEC xp_readerrorlog

    INSERT #Errors EXEC xp_readerrorlog 1

    INSERT #Errors EXEC xp_readerrorlog 2

    INSERT #Errors EXEC xp_readerrorlog 3

    INSERT #Errors EXEC xp_readerrorlog 4

    INSERT #Errors EXEC xp_readerrorlog 5

    INSERT #Errors EXEC xp_readerrorlog 6

    SELECT

    @@servername as Server, logdate as [date],

    processinfo as Source,

    vchMessage as Message

    FROM

    #Errors

    --WHERE vchMessage LIKE '%Address Windowing Extensions is enabled%'

    --AND

    --vchMessage NOT LIKE '%.TRN%'

    -- AND vchMessage NOT LIKE '%Run the RECONFIGURE%' AND

    --vchMessage NOT LIKE '%Copyright (c)%'

    --AND vchMessage NOT LIKE '%login%'

    ORDER BY logdate

    DROP TABLE #Errors

    Andrew

  • Thanks for the script. I will try it out. The log file is small.

  • Hi,

    You may also use sp_cycle_errorlog to close the current log and begin a new one.

    http://msdn.microsoft.com/en-us/library/ms182512.aspx

    Cheers,

    John

  • Thanks John. I just tried that and still getting the error message.

  • Hi,

    Have you tried browsing to the log files on the file system?

    They typically live in a location similar to the following.

    C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\LOG

  • Yes, I can open them using notepad.

  • Hmmm, this is a long shot but I wonder if this could be permission issue? What privileges have been granted to the account you are using to connect to SQL Server?

  • I am logging in as myself and I am in the sysadmin role. I tried logging in as sa and still got the same error message.

  • Grasshopper? Did you every find a solution to this problem. I'm experiencing the same issue and have spent hours trying to solve, to no avail.

    Thanks

    Matt

  • Packer (2/23/2011)


    Grasshopper? Did you every find a solution to this problem. I'm experiencing the same issue and have spent hours trying to solve, to no avail.

    Thanks

    Matt

    Lol....grasshopper is the level, not his name...

    btw, 3 YR OLD THREAD

    Regards

    Sushant

    Regards
    Sushant Kumar
    MCTS,MCP

Viewing 11 posts - 1 through 10 (of 10 total)

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