![t sql stored procedure exercises using adventureworks2012 t sql stored procedure exercises using adventureworks2012](https://blog.sqlauthority.com/i/b/missingtable1.jpg)
T sql stored procedure exercises using adventureworks2012 windows#
We have the same options for output: a file, the Windows Application log, or the Windows Security log. This is nice if you want to prevent audited activity from going unrecorded, but don’t want to impact everything. In SQL 2012, we now have options to continue (the equivalent of not checking the old checkbox), shutdown (checking the old checkbox) or fail operation, which will fail any operation that should have been recorded but couldn’t. In SQL 2008, this was only be checkbox to shutdown server on audit log failure.
![t sql stored procedure exercises using adventureworks2012 t sql stored procedure exercises using adventureworks2012](https://cf.ppt-online.org/files1/slide/p/ps4E6vNjoTiyV3dLDkCGhRbHMPm125queIntBK/slide-6.jpg)
The first is the “On Audit Log Failure” selection. If you’re familiar with creating an audit in SQL Server 2008, you’ll notice a few changes in SQL 2012. The first step in creating a SQL Audit is to create the audit object. So, going back to the salary procedure example, if a user is using a generic login to execute that procedure, you might have a hard time tracing it back to a real person. Unfortunately, that means it also can’t access certain information, like the network login or client associated with a session. One good thing about SQL Audit is that it executes asynchronously, which means it’s not going to hold up user processes. Wouldn’t it be nice to know not only who is executing that stored procedure, but who is trying to execute it? Why is this good? Well, suppose you’re auditing the execution of a stored procedure that modifies some sensitive data, like salary information.
![t sql stored procedure exercises using adventureworks2012 t sql stored procedure exercises using adventureworks2012](https://codeperfect.files.wordpress.com/2009/12/image5b75d.png)
What this meant to us as auditors was that the event would be recorded even if it didn’t really happen because the user didn’t have permissions. It was built on the extended events framework and what made it really neat was that the event was recorded when the permission-check for that event occurred. SQL Audit was introduced in SQL 2008, and for the first time auditing was treated as a “first-class” object in SQL Server, meaning it could be managed by DDL statements. This entry was posted in Features and tagged Auditing SQL Audit SQL Server on Jby Colleen M.