Couple of day’s back our error log
was flooded with below error
Error: “The
activated proc '[dbo].[sp_syspolicy_events_ reader]' running on queue
'msdb.dbo.syspolicy_event_ queue' output the following: 'Cannot
execute as the database principal because the principal "##MS_ PolicyEventProcessingLogin##"
does not exist, this type of
principal cannot be impersonated, or you do not have permission.’
The error
itself says issue is with
- login "##MS_
PolicyEventProcessingLogin##" - On
MSDB database
- Issue
is permission impersonation
/*************SQL Code Start****************/
USE MSDB
Go
EXEC SP_CHANGE_USERS_LOGIN ‘REPORT’
/*************SQL Code End*****************/
Output: This returns the
UserName ##MS_PolicyEventProcessingLogin##
This gives clear understanding that User : ##MS_ PolicyEventProcessingLogin##
in MSDB was not mapped with its login.
So the quick fix is remap user with its
login using below sql proc
/*************SQL Code Start****************/
exec sp_change_users_login
‘AutoFix’, ‘##MS_PolicyEventProcessingLogin##’/*************SQL Code End*****************/
Now no more flooding of similar error.
This has really worked for me. Thank you very much Saurabh:) Keep posting some helpful tips and solutions
ReplyDeleteGood to hear Mohan.
Delete