Export (0) Print
Expand All
Expand Minimize

DROP SERVER AUDIT (Transact-SQL)

Drops a Server Audit Object using the SQL Server Audit feature. For more information on SQL Server Audit, see Understanding SQL Server Audit.

Topic link iconTransact-SQL Syntax Conventions


DROP SERVER AUDIT audit_name
    [ ; ]

You must set the State of an audit to the OFF option in order to make any changes to an Audit. If DROP AUDIT is run while an audit is enabled with any options other than STATE=OFF, you will receive a MSG_NEED_AUDIT_DISABLED error message.

A DROP SERVER AUDIT removes the metadata for the Audit, but not the audit data that was collected before the command was issued.

DROP SERVER AUDIT does not drop associated server or database audit specifications. These specifications must be dropped manually or left orphaned and later mapped to a new server audit.

To create, alter or drop a Server Audit Principals require the ALTER ANY SERVER AUDIT or the CONTROL SERVER permission.

The following example drops an audit called HIPAA_Audit.

ALTER SERVER AUDIT HIPAA_Audit
STATE = OFF;
GO
DROP SERVER AUDIT HIPAA_Audit;
GO

Updated content

Corrected the Permissions section.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft