DROP DATABASE AUDIT SPECIFICATION (Transact-SQL)

Drops a database audit specification object using the SQL Server Audit feature. For more information, see Understanding SQL Server Audit.

Topic link iconTransact-SQL Syntax Conventions

Syntax

DROP DATABASE AUDIT SPECIFICATION audit_specification_name
[ ; ]

Arguments

  • audit_specification_name
    Name of an existing audit specification object.

Remarks

A DROP DATABASE AUDIT SPECIFICATION removes the metadata for the audit specification, but not the audit data collected before the DROP command was issued. You must set the state of a database audit specification to OFF using ALTER DATABASE AUDIT SPECIFICATION before it can be dropped.

Permissions

Users with the ALTER ANY DATABASE AUDIT permission can drop database audit specifications.

Examples

A. Dropping a Database Audit Specification

The following example drops an audit called HIPAA_Audit_DB_Specification.

DROP DATABASE AUDIT SPECIFICATION HIPAA_Audit_DB_Specification;
GO

For a full example of creating an audit, see Understanding SQL Server Audit.

See Also

Reference

Concepts