XE - more files than MAX_ROLLOVER_FILES

  • I have created an XE for deprecated features that writes to an asynchronous file target. Code below:

    CREATE EVENT SESSION Monitor_Deprecated_Discontinued_features ON SERVER

    --We are looking at deprecated features

    ADD EVENT sqlserver.deprecation_announcement

    (

    --Add additional columns to track

    ACTION (sqlserver.database_id, sqlserver.sql_text, sqlserver.session_id,

    sqlserver.tsql_stack, sqlserver.username, sqlserver.client_hostname)

    ),

    --We are looking at discontinued features

    ADD EVENT sqlserver.deprecation_final_support

    (

    --Add additional columns to track

    ACTION (sqlserver.database_id, sqlserver.sql_text, sqlserver.session_id, sqlserver.tsql_stack))

    --As a best practice use asynchronous file target, reduces overhead.

    ADD TARGET package0.asynchronous_file_target(

    SET filename= 'filepath'

    , metadatafile= 'filepath'

    , max_file_size = 5

    ,max_rollover_files = 5)

    WITH(MAX_DISPATCH_LATENCY = 1 SECONDS, STARTUP_STATE = ON

    )

    The problem is that I am seeing more than 5 files on almost all of our servers. Any idea why the amount of files is greater than the MAX rollover?

    Jared
    CE - Microsoft

  • A guess, the oldest file was locked or in use for some reason when the delete was attempted. If that delete fails it isn't retried later. I think I read about this occuring with trace files as well.

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

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