April 30, 2009 at 5:23 am
Hi,
I have an interesting situation executing the following test script:
CREATE PROC spTesting
WITH EXECUTE AS OWNER
AS
GRANT EXEC ON OBEJCT::sp_name TO role_name;
GO
When I execute this proc (with owner as sysadmin), the following error is raised:
Msg 2115, Level 16, State 1, ...
Server level event notifications are disabled as the database MSDB does not exist.
However, if I commented out the WITH EXECUTE AS OWNER clause, it works fine!
What could be the sense of the error message, or am I missing something here?
April 30, 2009 at 5:52 am
Not able to reproduce the message you are getting script is executing fine in my environment.
Can you check if you can perform basic queries on MSDB databases ?
-:-)
Cheer Satish 🙂
April 30, 2009 at 6:05 am
I am sysadmin on the particular test server. Nothing unusual in the msdb database.
I tried it on a secondary server and it works fine there. I do use Event Notifications, but I can't see how that could be related to the WITH EXECUTE AS clause?
April 30, 2009 at 6:15 am
As a follow up: I've dropped the server-level event notification and it now works. Recreated a database-level event notification and it still works. Could this be a bug in SQL Server 2005?
May 8, 2009 at 1:43 am
Thanks for sharing the information , will need to test it further to confirm
-Sat 🙂
Cheer Satish 🙂
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply