Skip to content

Latest commit

 

History

History
85 lines (70 loc) · 5.13 KB

File metadata and controls

85 lines (70 loc) · 5.13 KB
title DROP DATABASE AUDIT SPECIFICATION (Transact-SQL) | Microsoft Docs
ms.custom
ms.date 03/14/2017
ms.prod sql
ms.prod_service sql-database
ms.reviewer
ms.suite sql
ms.technology t-sql
ms.tgt_pltfrm
ms.topic language-reference
f1_keywords
DROP_DATABASE_AUDIT_SPECIFICATION_TSQL
DROP DATABASE AUDIT SPECIFICATION
dev_langs
TSQL
helpviewer_keywords
database audit specification
DROP DATABASE AUDIT SPECIFICATION statement
ms.assetid 3c387c6e-9a67-4daa-b64a-c87f6b3c9c4f
caps.latest.revision 14
author CarlRabeler
ms.author carlrab
manager craigg

DROP DATABASE AUDIT SPECIFICATION (Transact-SQL)

[!INCLUDEtsql-appliesto-ss2008-xxxx-xxxx-xxx-md]

Drops a database audit specification object using the [!INCLUDEssNoVersion] Audit feature. For more information, see SQL Server Audit (Database Engine).

Topic link icon Transact-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 SQL Server Audit (Database Engine).

See Also

CREATE SERVER AUDIT (Transact-SQL)
ALTER SERVER AUDIT (Transact-SQL)
DROP SERVER AUDIT (Transact-SQL)
CREATE SERVER AUDIT SPECIFICATION (Transact-SQL)
ALTER SERVER AUDIT SPECIFICATION (Transact-SQL)
DROP SERVER AUDIT SPECIFICATION (Transact-SQL)
CREATE DATABASE AUDIT SPECIFICATION (Transact-SQL)
ALTER DATABASE AUDIT SPECIFICATION (Transact-SQL)
ALTER AUTHORIZATION (Transact-SQL)
sys.fn_get_audit_file (Transact-SQL)
sys.server_audits (Transact-SQL)
sys.server_file_audits (Transact-SQL)
sys.server_audit_specifications (Transact-SQL)
sys.server_audit_specification_details (Transact-SQL)
sys.database_audit_specifications (Transact-SQL)
sys.database_audit_specification_details (Transact-SQL)
sys.dm_server_audit_status (Transact-SQL)
sys.dm_audit_actions (Transact-SQL)
sys.dm_audit_class_type_map (Transact-SQL)
Create a Server Audit and Server Audit Specification