SQL Server Audit (Audit) configuration Method--database objects

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.