tailieunhanh - Hướng dẫn học Microsoft SQL Server 2008 part 135

Sửa đổi các thông số kỹ thuật kiểm toán Server Kiểm toán Các loại hành động mới có thể được thêm vào Kiểm toán Server thuật nếu kiểm toán Quy Server bị vô hiệu hóa: Đặc điểm kỹ thuật kiểm toán thay đổi Server tên Add (Action Group) | Part VIII Monitoring and Auditing action groups. The following command creates a Server Audit Specification and assigns it to the SQL Server 2008 Bible Audit CREATE SERVER AUDIT SPECIFICATION ServerAuditSpecification-20090204-212943 FOR SERVER AUDIT SQL Server 2008 Bible Audit ADD DBCC_GROUP ADD FULLTEXT_GROUP ADD DATABASE_CHANGE_GROUP WITH STATE ON Modifying Server Audit Specifications New Action Audit Types may be added to the Server Audit Specification if the Server Audit Specification is disabled Alter Server Audit Specification name Add Action Group To redirect a Server Audit Specification to a new SQL Server Audit both the Server Audit Specification and the new SQL Server Audit must be disabled. Database Audit Specifications Database Audit Specifications are created using the same UI dialog as the Server Audit Specification. Like the Server Audit Specification there may only be one Database Audit Specification per SQL Audit. To create multiple Database Audit Specifications there must be multiple SQL Audits one per Database Audit Specification. The critical point is that Database Audit Specifications can audit DML events such as select insert update and delete as shown in Figure 61-3. You can also see the list of possible Database Audit Action Types in the drop-down list. Viewing the Audit Trail The easiest way to view the audit trail is to select the SQL Server Audit in Object Explorer and select View Logs in the context menu. This opens the Log File Viewer to the Audit Collection as shown in Figure 61-4. The filter is useful to narrow the event viewed. Using T-SQL the logs can be read with the fn_get_audit_file function. 1302 SQL Audit 61 FIGURE 61-3 This Database Audit Specification will record every select statement executed by the dbo user in the AdventureWorks2008 database and pass the audit data to the SQL Server 2008 Bible SQL Audit bucket. FIGURE 61-4 Viewing the audit history using Management Studio s Log File Viewer. Here select