Cannot execute as the database principal because the principal "guest" does not exist, this type of principal cannot be impersonated, or you do not have permission.
2016-10-17 11:51
1491 查看
今天遇到这样一个问题:一个系统的作业需要给系统Support人员开放SQL Agent下作业的查看、执行权限。数据库版本为SQL Server 2014 SP2,给这个系统Support人员的NT账号授予msdb数据库下面权限后:
该系统Support人员反馈在双击查看该作业时报下面错误。于是我测试,验证了一下这个权限是否OK,
我测试的时候使用的是Microsoft SQL Server Management Sutdio 2014,发现不会出现这个错误。 后面我又继续测试了一下Microsoft SQL Server Management Sutdio 2008,发现使用这个版本确实会出现这个错误,Microsoft SQL Server Management Sutdio 2008版本如下所示:
于是我用SQL Profile跟踪了一下,双击作业操作时执行的SQL语句,如下所示
在执行下面SQL时,出现错误,可以将该SQL取出,在Microsoft SQL Server Management Sutdio 里面执行。
解决这个问题也很简单,只需要给这个NT账号,授予master数据库下面的public角色即可解决问题。
该系统Support人员反馈在双击查看该作业时报下面错误。于是我测试,验证了一下这个权限是否OK,
我测试的时候使用的是Microsoft SQL Server Management Sutdio 2014,发现不会出现这个错误。 后面我又继续测试了一下Microsoft SQL Server Management Sutdio 2008,发现使用这个版本确实会出现这个错误,Microsoft SQL Server Management Sutdio 2008版本如下所示:
于是我用SQL Profile跟踪了一下,双击作业操作时执行的SQL语句,如下所示
在执行下面SQL时,出现错误,可以将该SQL取出,在Microsoft SQL Server Management Sutdio 里面执行。
exec master.dbo.sp_MSdbuserpriv N'serv'
解决这个问题也很简单,只需要给这个NT账号,授予master数据库下面的public角色即可解决问题。
相关文章推荐
- SQL Server 对等复制配置失败后无法删除重建,报错:Cannot execute as the database principal because the principal "dbo" does not exist, this type of principal cannot be im
- Cannot find ./catalina.sh The file is absent or does not have execute permission This file is nee
- "Your computer could not be joined to the domain. You have exceeded the maximum number of computer accounts you are allowed to create in this domain. Contact your system administrator to have this limit reset or increased."
- Cannot find ./catalina.sh The file is absent or does not have execute permission This file is nee
- SQL 2005 建立数据库图表时出现以下错误Database diagram support objects cannot be installed because this database does not have a valid owner 解决
- 已解决:无法连接到WMI提供程序。你没有权限或者该服务器无法访问/cannot connect to WMI provider. You do not have permission or the……
- Sql 2005 Database diagram support objects cannot be installed because this database does not have a valid owner
- Database diagram support objects cannot be installed because this database does not have a valid owner.
- 已解决:无法连接到WMI提供程序。你没有权限或者该服务器无法访问/cannot connect to WMI provider. You do not have permission or the……
- nagios报错 It appears as though you do not have permission to view information for any of the hosts yo
- 已解决:无法连接到WMI提供程序。你没有权限或者该服务器无法访问/cannot connect to WMI provider. You do not have permission or the……
- Cannot find bin/catalina.sh The file is absent or does not have execute permission
- 已解决:无法连接到WMI提供程序。你没有权限或者该服务器无法访问/cannot connect to WMI provider. You do not have permission or the……
- Database diagram support objects cannot be installed because this database does not have a valid own
- The service cannot be activated because it does not support ASP.NET compatibility. ASP.NET compatibility is enabled for this application. Turn off ASP.NET compatibility mode in the web.config or add the AspNetCompatibilityRequirements attribute to the ser
- 关于 WMI Provider 不能连接的错误 - Cannot connect to WMI provider. You do not have permission or the server is unreachable.
- TFS2010提示:TF204017 The operation cannot be completed because the user does not have one or more required permissions (Use) for workspace
- Cannot connect to WMI provider.You do not have permission or the server is unreachable.Note that you can only manager SQL Server 2005 and later version with SQL Server Configuration Manager.Invalid namespace [0x8004100e]
- Online Music Store: EF 4 Code Only方式出错"Model compatibility cannot be checked because the database does not contain"