tailieunhanh - The Real MTCS SQL Server 2008 Exam 70/432 Prep Kit- P34

The Real MTCS SQL Server 2008 Exam 70/432 Prep Kit- P34: Congratulations on your journey to become certified in SQL Server 2008. This book will help prepare you for your exam and give you a practical view of working with SQL Server 2008. | Managing Security Chapter 4 147 EXERCISE Set Up a Database Audit Specification You need to set up a database audit specification on the HumanResources. Employee table to monitor any SELECT or DELETE statements. Start setting up your server audit enabling the server audit and then creating the database audit specification. Your code should resemble the following USE MASTER GO -- You are creating the server audit with this statement CREATE SERVER AUDIT Employee_Security_Audit TO FILE FILEPATH C Program Files Microsoft SQL Server MSSQL DATA GO -- You need to then enable the server audit ALTER SERVER AUDIT Employee_Security_Audit WITH STATE ON GO -- Now you need to set up the database audit by switching to the target database. USE AdventureWorks GO -- Now create the database audit specification for the Employee table. CREATE DATABASE AUDIT SPECIFICATION Employee_Table FOR SERVER AUDIT Employee_Security_Audit ADD SELECT DELETE ON BY dbo WITH STATE ON GO You have now completed setting up database auditing for the table in the AdventureWorks2008 database. 148 Chapter 4 Managing Security Change Data Capture CDC New in SQL Server 2008 and only available in the Developer Enterprise and Evaluation additions Change data capture CDC can be implemented to capture INSERT UPDATE and DELETE activity applied to SQL Server tables from the SQL Server transaction log. CDC captures column information along with the metadata such as the action being taken that is required to apply the changes to a target environment for rows affected. The data capture information is stored in change tables that resemble the column structure of the tracked source tables. New Noteworthy. Change Data Capture CDC CDC functionality is new in SQL Server 2008 providing the capability to capture INSERT UPDATE and DELETE activity from the SQL Server transaction logs. Before CDC can be used it must be enabled the following SQL code shows how .