Which four Transact-SQL statements should you use?

DRAG DROP

You administer a Microsoft SQL Server 2012 server that has a database named Contoso. The Contoso database has a table named EmployeeSalary in a schema named HumanResources.

You need to create a script that writes audit events into the application log whenever data in the EmployeeSalary table is modified.

Which four Transact-SQL statements should you use? (To answer, move the appropriate statements from the list of statements to the answer area and arrange them in the correct order.)

Answer:

Explanation:

* An audit must exist before creating a server audit specification for it. When a server audit specification is created, it is in a disabled state.

* The general process for creating and using an audit is as follows.

Create an audit and define the target.

Create either a server audit specification or database audit specification that maps to the audit. Enable the audit specification.

Enable the audit.

Read the audit events by using the Windows Event Viewer, Log File Viewer, or the fn_get_audit_file function.

* (Box 2) Example:

Creating a server audit with a Windows Application log target with options

CREATE SERVER AUDIT HIPAA_Audit

TO APPLICATION_LOG

WITH (QUEUE_DELAY = 1000, ON_FAILURE = SHUTDOWN);

* Box 4 Example:

/*Creates a server audit specification called "HIPPA_Audit_Specification" that audits failed logins for the SQL Server audit "HIPPA_Audit" created above.

*/

CREATE SERVER AUDIT SPECIFICATION HIPPA_Audit_Specification

FOR SERVER AUDIT HIPPA_Audit

ADD (FAILED_LOGIN_GROUP);

GO

— Enables the audit.

ALTER SERVER AUDIT HIPAA_Audit

WITH (STATE = ON);

GO

Latest 70-462 Dumps Valid Version with 301 Q&As

Latest And Valid Q&A | Instant Download | Once Fail, Full Refund

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments