SQL Server Native Auditing question

  • I'm pretty sure the answer to this is "no" because I can't find anything via Google or MS's documentation that says it's possible, but I promised I'd double-check.

    We're auditing the use of an analytics database with SQL's native audit processes (i.e. the Database Audit Specifications) including SELECTS, UPDATES, etc. and the following question came up. Can this auditing be used to record the duration of queries and the number of records returned / affected?

    I'm thinking we'll need to use triggers or something to record this type of data, but I wanted to be sure the .sqlaudit files didn't contain that information before we chased down the triggers path.

    Brandie Tarvin, MCITP Database AdministratorLiveJournal Blog: http://brandietarvin.livejournal.com/[/url]On LinkedIn!, Google+, and Twitter.Freelance Writer: ShadowrunLatchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.

  • Duration & rows returned are in rpc_completed and/or sql_batch_completed Extended Events. That's how I'd capture this data if required. To my knowledge, you're correct, this is absolutely not in the core audit information.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

  • Thanks, Grant.

    Brandie Tarvin, MCITP Database AdministratorLiveJournal Blog: http://brandietarvin.livejournal.com/[/url]On LinkedIn!, Google+, and Twitter.Freelance Writer: ShadowrunLatchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.

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

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