"auto statistics internal" error showing in my extended event... What does it mean?

  • I have an XE running to catch failing queries, and I keep seeing this error; "auto statistics internal"

    I can't find any information on what the error indicates or how to fix it. Can anyone help?

    Here is the script for my XE:

    IF EXISTS(SELECT 1 FROM sys.dm_xe_sessions)

    DROP EVENT SESSION

    what_queries_are_failing ON SERVER

    DECLARE @filename1 VARCHAR(256)

    DECLARE @filename2 VARCHAR(256)

    DECLARE @SQL NVARCHAR(1000)

    SET @filename1 = (

    SELECT SUBSTRING(physical_name, 1, PATINDEX('%DBAMonitoringDatabase%', physical_name)-1) + 'what_queries_are_failing.xel'

    FROM sys.master_files

    WHERE DB_NAME(database_id) = 'DBAMonitoringDatabase'

    AND file_id = 2

    )

    SET @filename2 = (

    SELECT SUBSTRING(physical_name, 1, PATINDEX('%DBAMonitoringDatabase%', physical_name)-1) + 'what_queries_are_failing.xem'

    FROM sys.master_files

    WHERE DB_NAME(database_id) = 'DBAMonitoringDatabase'

    AND file_id = 2

    )

    --drop event session what_queries_are_failing on server

    SET @SQL = 'Create EVENT SESSION

    what_queries_are_failing

    ON SERVER

    ADD EVENT sqlserver.error_reported

    (

    ACTION (sqlserver.sql_text, sqlserver.tsql_stack, sqlserver.database_id, sqlserver.username, sqlserver.client_hostname)

    WHERE ([severity]> 10)

    )

    ADD TARGET package0.asynchronous_file_target

    (set filename = ''' + @filename1 + ''',

    metadatafile = ''' + @filename2 + ''',

    max_file_size = 5,

    max_rollover_files = 5)

    WITH (MAX_DISPATCH_LATENCY = 5SECONDS)

    '

    EXEC sp_executesql @SQL

    -- Start the session

    ALTER EVENT SESSION what_queries_are_failing

    ON SERVER STATE = Start

    GO

    Jared
    CE - Microsoft

  • Hi Jared,

    I came up to the same error message with an XE session, and could not find any information about this error.

    Did you find an answer to this?

    Igor Micev,My blog: www.igormicev.com

  • I found this:

    9104 essentially means that auto statistics failed for some reason (deadlock, resource crunch, ...). Since the engine can go on without auto-created or auto-refreshed statistics, the engine doesn't surface this error.

    https://social.msdn.microsoft.com/Forums/sqlserver/en-US/e75ed5fc-b96a-450c-9363-547f3adc6f00/error-9104

    Jared
    CE - Microsoft

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

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