Approximate steps:
A. Create an audit
B. Create an audit to access a database table - to monitor a user's access to a specified database table
C. Test Auditing features - Use login account Allen Accessing database Tables Customers
D. Use T-SQL function to parse and filter the log data for audit
E. Archive storage of audit files
1. Create a login account and give the appropriate permissions
Create a login account Allen
2. Create an audit
To create an audit: audit-sql-table
Configure each setting, such as
650) this.width=650; "title=" 22.png "style=" Float:none; "src=" http://s3.51cto.com/wyfs02/M00/58/4F/ Wkiom1sui5vzajvqaaj9skg661y605.jpg "alt=" Wkiom1sui5vzajvqaaj9skg661y605.jpg "/>
Enable auditing " audit-sql-table "
650) this.width=650; "title=" 23.png "style=" Float:none; "src=" http://s3.51cto.com/wyfs02/M01/58/4C/ Wkiol1sujf3cvsstaagtizty-wo936.jpg "alt=" Wkiol1sujf3cvsstaagtizty-wo936.jpg "/>
1. Create an audit of access data tables-to monitor a user's access to a specified data table
Create an audit audit-sql-table for a data table
650) this.width=650; "title=" 24.png "style=" Float:none; "src=" http://s3.51cto.com/wyfs02/M01/58/4F/ Wkiom1sui5vbzeg1aagof1hnybq457.jpg "alt=" Wkiom1sui5vbzeg1aagof1hnybq457.jpg "/>
Click Audit action type, and object class, name, schema, principal name
650) this.width=650; "title=" 25.png "style=" Float:none; "src=" http://s3.51cto.com/wyfs02/M02/58/4C/ Wkiol1sujf3gftusaah5ub0d4iu255.jpg "alt=" Wkiol1sujf3gftusaah5ub0d4iu255.jpg "/>
Enable database Audit specification databaseaudittable
650) this.width=650; "title=" 26.png "style=" Float:none; "src=" http://s3.51cto.com/wyfs02/M02/58/50/ Wkiom1sui5ud9n1uaahc4r6chr8278.jpg "alt=" Wkiom1sui5ud9n1uaahc4r6chr8278.jpg "/>
4. Test Auditing features-using a login accountAllenAccess
Use login account Allen identity login, corresponding ACCDB database for querying,
execute the following code, where orders table is not in design Record object
650) this.width=650; "title=" 27.png "style=" Float:none; "src=" http://s3.51cto.com/wyfs02/M00/58/4C/ Wkiol1sujf2gb7oyaac26p4cecq329.jpg "alt=" Wkiol1sujf2gb7oyaac26p4cecq329.jpg "/>
5. View audit log records
View audit log records, such as
650) this.width=650; "title=" 28.png "style=" Float:none; "src=" http://s3.51cto.com/wyfs02/M00/58/50/ Wkiom1sui5yt7ynraaqzdmjevci483.jpg "alt=" Wkiom1sui5yt7ynraaqzdmjevci483.jpg "/>
with Dm_server_audit_status View View Log physical path
650) this.width=650; "title=" 29.png "style=" Float:none; "src=" http://s3.51cto.com/wyfs02/M01/58/4C/ Wkiol1sujf7aoogfaagput0murw246.jpg "alt=" Wkiol1sujf7aoogfaagput0murw246.jpg "/>
re-use Fn_get_audit_file function to view information about the audit log.
650) this.width=650; "title=" 30.png "style=" Float:none; "src=" http://s3.51cto.com/wyfs02/M01/58/50/ Wkiom1sui5yslhfgaahgz-uides563.jpg "alt=" Wkiom1sui5yslhfgaahgz-uides563.jpg "/>
Function-related information
http://msdn.microsoft.com/zh-cn/library/cc280765 (v=sql.105). aspx
This article is from "What is our favorite" blog, please be sure to keep this source http://pxizhi.blog.51cto.com/5283742/1600689
SQL Server Audit (Audit) configuration Method--database objects