当时把系统登录用户“##MS_PolicyEventProcessingLogin##”删除了

目前客户遇到一个这样的问题:

由于某种原因,当时把系统登录用户“##MS_PolicyEventProcessingLogin##”删除了,后在系统日志中发现大量如下提示,每5秒报一次错误。

消息:

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.'

根据网上的说法是:利用SQL脚本重建##MS_PolicyEventProcessingLogin##用户,详情可见,http://www.itpub.net/thread-1737445-1-1.html

而我现在的疑问是:

目前客户数据库已用了其他简单方式建了这个##MS_PolicyEventProcessingLogin##用户,但报错依旧如上,如我按照上述方案运行此SQL脚本重建sql[2008R2SP2].sql,会对目前的数据库和集群状态有影响吗?  目前的运行环境是:SQL SERVER2012 Allways On集群,两节点。

 

经过进一步排查,最后解决方案:

分别进入msdb master模式,运行孤立用户修复:

  1. EXEC sp_change_users_login 'Report'
  2. exec sp_change_users_login 'AUTO_FIX','##MS_PolicyEventProcessingLogin##'
  3. exec sp_change_users_login 'UPDATE_ONE','##MS_PolicyEventProcessingLogin##','##MS_PolicyEventProcessingLogin##'

 转载请注明出处:

转载自http://lxfamn.cn/blog

未经允许不得转载:lxfamn » 当时把系统登录用户“##MS_PolicyEventProcessingLogin##”删除了

赞 (0) 打赏

相关推荐

    暂无内容!

置顶推荐

评论 0

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏