SQL Server 2008 系统登录用户##MS_PolicyEventProcessingLogin##被误删后的恢复

客户SQL Server 2008R2数据库,在清理数据库用户时,连同系统登录用户“##MS_PolicyEventProcessingLogin##”等也一并删除了,后在系统日志中发现大量如下提示,每5秒报一次错误。

描述:

针对队列 'msdb.dbo.syspolicy_event_queue' 运行的激活过程 '[dbo].[sp_syspolicy_events_reader]' 输出以下信息: '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 Server的日志中,也有对应的错误提示:

消息

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

解决办法就是恢复系统登录用户,可以执行如下脚本。
 
脚本给个链接:

http://www.itpub.net/thread-1737445-1-1.html

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/81227/viewspace-748798/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/81227/viewspace-748798/

你可能感兴趣的:(SQL Server 2008 系统登录用户##MS_PolicyEventProcessingLogin##被误删后的恢复)