Audti the Actions That Access the Audti Files

  • Hi,

    Does SQL Server provide functionality to audit the actions that access the audit file? For instance, if I run the following query, can  SQL Server write the query to the audit file?

    SELECT TOP 100 *
    FROM sys.fn_get_audit_file ('K:\Audit\MyAuditFileName.sqlaudit',default,default)

    I am not able to find in the server level audit action groups for this.

    Thanks,

    Lijun

  • Lijun Zhang - Monday, March 12, 2018 11:12 AM

    Hi,

    Does SQL Server provide functionality to audit the actions that access the audit file? For instance, if I run the following query, can  SQL Server write the query to the audit file?

    SELECT TOP 100 *
    FROM sys.fn_get_audit_file ('K:\Audit\MyAuditFileName.sqlaudit',default,default)

    I am not able to find in the server level audit action groups for this.

    Thanks,

    Lijun

    I believe you need to do it with a database level audit to capture the select statement.
    Create the audit specification in master, Action type select, object name fn_get_audit_file, principal public

    Sue

  • Thanks. That works.

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

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