Cannot execute as the database principal because the principal "guest" does not exist, this type of principal cannot be impersonated, or you do not ha

简介: 原文: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.今天遇到这样一个问题:一个系统的作业需要给系统Support人员开放SQL Agent下作业的查看、执行权限。
原文: 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.

今天遇到这样一个问题:一个系统的作业需要给系统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 里面执行。

 

exec master.dbo.sp_MSdbuserpriv N'serv'

 

解决这个问题也很简单,只需要给这个NT账号,授予master数据库下面的public角色即可解决问题。

目录
相关文章
|
缓存 Java 数据库连接
MybatisPlusException: Your property named “xxx“ cannot find the corresponding database column name!
MybatisPlusException: Your property named “xxx“ cannot find the corresponding database column name!
360 0
|
SQL Java 关系型数据库
spring boot集成mybatis只剩两个sql 并提示 Cannot obtain primary key information from the database, generated objects may be incomplete
spring boot集成mybatis只剩两个sql 并提示 Cannot obtain primary key information from the database, generated objects may be incomplete
253 0
spring boot集成mybatis只剩两个sql 并提示 Cannot obtain primary key information from the database, generated objects may be incomplete
|
消息中间件 Linux
Linux - error: cannot open Packages database in /var/lib/rpm
Linux - error: cannot open Packages database in /var/lib/rpm
550 0
|
Java Spring Maven
深入Spring Boot:怎样排查 Cannot determine embedded database driver class for database type NONE
写在前面 这个demo来说明怎么一步步排查一个常见的spring boot AutoConfiguration的错误。 https://github.
3978 0
|
SQL Oracle 关系型数据库
WARNING: Too Many Parse Errors With error=911 When Running a JDBC Application Connected to an Oracle 19c database
WARNING: Too Many Parse Errors With error=911 When Running a JDBC Application Connected to an Oracle 19c database (
525 2
|
Oracle 关系型数据库
19c 开启Oracle Database Vault
19c 开启Oracle Database Vault
373 1

热门文章

最新文章