November 27, 2019 at 11:39 am
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.
November 27, 2019 at 1:37 pm
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
November 27, 2019 at 3:09 pm
Thanks, Grant.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply