CREATE SERVER AUDIT SPECIFICATION (Transact-SQL)
Applies To: SQL Server 2014, SQL Server 2016 Preview
Topic Status: Some information in this topic is preview and subject to change in future releases. Preview information describes new features or changes to existing features in Microsoft SQL Server 2016 Community Technology Preview 2 (CTP2).
Creates a server audit specification object using the SQL Server Audit feature. For more information, see SQL Server Audit (Database Engine).
Applies to: SQL Server (SQL Server 2008 through current version).
Users with the ALTER ANY SERVER AUDIT permission can create server audit specifications and bind them to any audit.
After a server audit specification is created, it can be viewed by principals with the, CONTROL SERVER, or ALTER ANY SERVER AUDIT permissions, the sysadmin account, or principals having explicit access to the audit.
The following example creates a server audit specification called HIPPA_Audit_Specification that audits failed logins, for a SQL Server Audit called HIPPA_Audit.
CREATE SERVER AUDIT SPECIFICATION HIPPA_Audit_Specification FOR SERVER AUDIT HIPPA_Audit ADD (FAILED_LOGIN_GROUP); GO
For a full example about how to create an audit, see SQL Server Audit (Database Engine).