SQL Server Query Analyzer creates a query log

Source: Internet
Author: User
Tags sql server query

Use [master]
GO

/****** Object:audit [Serverauditdb] Script date:2016-04-28 16:02:58 ******/
CREATE SERVER AUDIT [Serverauditdb]
To FILE
(FILEPATH = N ' E:\ServerAuditDB\ '
, MAXSIZE = 0 MB
, max_rollover_files = 2147483647
, Reserve_disk_space = OFF
)
With
(Queue_delay = 1000
, on_failure = CONTINUE
, Audit_guid = ' 66830c88-99fd-442a-8df2-2f292e25bc5b '
)
ALTER SERVER AUDIT [Serverauditdb] with (state = ON)
GO
Deng Xiaoping Tomato 16:04:02
Small eggplant
Use [Ceshi]
GO

CREATE DATABASE AUDIT specification [Databaseauditspecification-ceshi]
For SERVER AUDIT [Serverauditdb]
ADD (Database_object_change_group),
ADD (SELECT on object::[dbo].[ Digui] by [public]),
ADD (SELECT on object::[dbo].[ Customer] by [public])
With (state = ON)
GO

SQL Server Query Analyzer creates a query log

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.