PdfPrep.com

Which three statements should you execute in sequence?

DRAG DROP

You have a Microsoft SQL Server audit named Audit1. Audit1 contains an audit specification named AuditSpec that audits failed logins.

You need to configure the audit to capture CREATE, ALTER, and DROP statements.

Which three statements should you execute in sequence? To answer, move the appropriate statements from the list to the answer area and arrange them in the correct order.

Answer:

Explanation:

Step 1: ALTER SERVER AUDIT SPECIFICATION Audit1Spec FOR SERVER AUDIT Audit1 ADD(DATABASE_OBJECT_CHANGE_GROUP)

DATABASE_OBJECT_CHANGE_GROUP: This event is raised when a CREATE, ALTER, or DROP statement is executed on database objects, such as schemas. This event is raised whenever any database object is created, altered or dropped. Note: This could lead to very large quantities of audit records. If you enable this group in a server audit specification, it will track changes to schema objects in all of the databases of this instance of SQL Server

Step 2: ALTER SERVER AUDIT SPECIFICATION Audit1Spec WITH (STATE = ON); When a server audit specification is created, it is in a disabled state. WITH ( STATE = { ON | OFF } ) enables or disables the audit from collecting records for this audit specification.

Step 3: ALTER SERVER AUDIT Audit1 WITH (STATE = ON);

All audits are disabled when initially created. Example: Enables the audit.

ALTER SERVER AUDIT HIPAA_Audit WITH (STATE = ON); GO

References: https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/create-a-server-audit­and-server-audit-specification?view=sql-server-2017

Exit mobile version