C# Corner
Tech
News
Videos
Forums
Trainings
Books
Events
More
Interviews
Jobs
Live
Learn
Career
Members
Blogs
Challenges
Certifications
Bounties
Contribute
Article
Blog
Video
Ebook
Interview Question
Collapse
Feed
Dashboard
Wallet
Learn
Achievements
Network
Refer
Rewards
SharpGPT
Premium
Contribute
Article
Blog
Video
Ebook
Interview Question
Register
Login
Issue with Audit enabling in SQL Server 2008
WhatsApp
Venkatesan Jayakantham
15y
7.4
k
0
0
25
Blog
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
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.
People also reading
Membership not found