DROP DATABASE AUDIT SPECIFICATION (Transact-SQL)DROP DATABASE AUDIT SPECIFICATION (Transact-SQL)

适用于:Applies to: 是SQL ServerSQL Server(所有支持的版本)yesSQL ServerSQL Server (all supported versions) 适用于:Applies to: 是SQL ServerSQL Server(所有支持的版本)yesSQL ServerSQL Server (all supported versions)

使用 SQL ServerSQL Server Audit 功能删除数据库审核规范对象。Drops a database audit specification object using the SQL ServerSQL Server Audit feature. 有关详细信息,请参阅 SQL Server Audit(数据库引擎)For more information, see SQL Server Audit (Database Engine).

主题链接图标 Transact-SQL 语法约定Topic link icon Transact-SQL Syntax Conventions

语法Syntax

DROP DATABASE AUDIT SPECIFICATION audit_specification_name  
[ ; ]  

备注

若要查看 SQL Server 2014 及更早版本的 Transact-SQL 语法,请参阅早期版本文档To view Transact-SQL syntax for SQL Server 2014 and earlier, see Previous versions documentation.

参数Arguments

audit_specification_name**audit_specification_name
现有审核规范对象的名称。Name of an existing audit specification object.

备注Remarks

DROP DATABASE AUDIT SPECIFICATION 删除审核规范的元数据,但在发出 DROP 命令之前不会删除所收集的审核数据。A DROP DATABASE AUDIT SPECIFICATION removes the metadata for the audit specification, but not the audit data collected before the DROP command was issued. 必须先使用 ALTER DATABASE AUDIT SPECIFICATION 将数据库审核规范状态设置为 OFF,然后才可以删除该规范。You must set the state of a database audit specification to OFF using ALTER DATABASE AUDIT SPECIFICATION before it can be dropped.

权限Permissions

具有 ALTER ANY DATABASE AUDIT 权限的用户可以删除数据库审核规范****。Users with the ALTER ANY DATABASE AUDIT permission can drop database audit specifications.

示例Examples

A.A. 删除数据库审核规范Dropping a Database Audit Specification

下面的示例删除名为 HIPAA_Audit_DB_Specification 的审核。The following example drops an audit called HIPAA_Audit_DB_Specification.

DROP DATABASE AUDIT SPECIFICATION HIPAA_Audit_DB_Specification;  
GO  

有关如何创建审核的完整示例,请参阅 SQL Server Audit(数据库引擎)For a full example of creating an audit, see SQL Server Audit (Database Engine).

另请参阅See Also

CREATE SERVER AUDIT (Transact-SQL) CREATE SERVER AUDIT (Transact-SQL)
ALTER SERVER AUDIT (Transact-SQL) ALTER SERVER AUDIT (Transact-SQL)
DROP SERVER AUDIT (Transact-SQL) DROP SERVER AUDIT (Transact-SQL)
CREATE SERVER AUDIT SPECIFICATION (Transact-SQL) CREATE SERVER AUDIT SPECIFICATION (Transact-SQL)
ALTER SERVER AUDIT SPECIFICATION (Transact-SQL) ALTER SERVER AUDIT SPECIFICATION (Transact-SQL)
DROP SERVER AUDIT SPECIFICATION (Transact-SQL) DROP SERVER AUDIT SPECIFICATION (Transact-SQL)
CREATE DATABASE AUDIT SPECIFICATION (Transact-SQL) CREATE DATABASE AUDIT SPECIFICATION (Transact-SQL)
ALTER DATABASE AUDIT SPECIFICATION (Transact-SQL) ALTER DATABASE AUDIT SPECIFICATION (Transact-SQL)
ALTER AUTHORIZATION (Transact-SQL) ALTER AUTHORIZATION (Transact-SQL)
sys.fn_get_audit_file (Transact-SQL) sys.fn_get_audit_file (Transact-SQL)
sys.server_audits (Transact-SQL) sys.server_audits (Transact-SQL)
sys.server_file_audits (Transact-SQL) sys.server_file_audits (Transact-SQL)
sys.server_audit_specifications (Transact-SQL) sys.server_audit_specifications (Transact-SQL)
sys.server_audit_specification_details (Transact-SQL) sys.server_audit_specification_details (Transact-SQL)
sys.database_audit_specifications (Transact-SQL) sys.database_audit_specifications (Transact-SQL)
sys.database_audit_specification_details (Transact-SQL) sys.database_audit_specification_details (Transact-SQL)
sys.dm_server_audit_status (Transact-SQL) sys.dm_server_audit_status (Transact-SQL)
sys.dm_audit_actions (Transact-SQL) sys.dm_audit_actions (Transact-SQL)
sys.dm_audit_class_type_map (Transact-SQL) sys.dm_audit_class_type_map (Transact-SQL)
创建服务器审核和服务器审核规范Create a Server Audit and Server Audit Specification