While creating audit and enabling it, am getting the below error.
------------------------------------------------------------------------------------
An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)
------------------------------
Cannot alter a server audit from a user database. This operation must be performed in the master database. (Microsoft SQL Server, Error: 33074)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.00.1600&EvtSrc=MSSQLServer&EvtID=33074&LinkId=20476
------------------------------BUTTONS:
OK------------------------------
------------------------------------------------------------------------------------
Microsoft have accepted it as a bug in the product and it will be fixed in future versions. Below is the work around,
1. Execute the below query
------------------------------------------------------------------------------------
An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)
------------------------------
Cannot alter a server audit from a user database. This operation must be performed in the master database. (Microsoft SQL Server, Error: 33074)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.00.1600&EvtSrc=MSSQLServer&EvtID=33074&LinkId=20476
------------------------------BUTTONS:
OK------------------------------
------------------------------------------------------------------------------------
Microsoft have accepted it as a bug in the product and it will be fixed in future versions. Below is the work around,
1. Execute the below query
TSQL:
USE [master]
GO
ALTER SERVER AUDIT [YouAuditName] WITH (STATE=ON)
GO
2. Change the default database for the logged in user as master and afterwards enable the Audit.

Join the conversation! Your thoughts help the community grow.