Alert for create\restore database failed
-
Monday, December 05, 2011 10:34 AM
Hi,
I removed create DB rights from users, but i want to recieve alerts, when somebody trying to create DB on server. What error number i could use for this?
I already tried to set severity to 14(insufficient permission), but in this case i only have message
Login failed for user <>. Reason: Failed to open the explicitly specified database. [CLIENT: <local machine>]
This seems to be a garbage message, becouse sometimes i can see this messages in sql log even for my login.
All Replies
-
Wednesday, December 07, 2011 5:33 AMModerator
Hi Skazimax,
This type of serverity level is treated as the generally error and is not normally possible to get them logged. In your scenario, you may have a try to implement xp_LogEvent to log a user-defined message into SQL Server log file and Windows Event Viewer. For more information about this topic, please refer to this article:
SQL Server Alerts: Soup to Nuts
http://www.simple-talk.com/sql/database-administration/sql-server-alerts-soup-to-nuts/
If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.Stephanie Lv
TechNet Community Support
- Marked As Answer by Stephanie LvModerator Tuesday, December 13, 2011 9:15 AM

