The server principal "sa" is not able to access the database "xxxx" under the current security context
2017-03-07 17:30
1316 查看
在SQL Server服务器上一个作业执行时,遇到下面错误信息:
Message:
Executed as user: dbo. The server principal "sa" is not able to access the database "xxxx" under the current security context. [SQLSTATE 08004] (Error 916). The step failed.
作业本身执行的存储过程非常简单,就是将数据库A中的历史数据处理过后,归档到A_History库中,结果就遇到这么一个问题。将作业的存储过程取出在SSMS客户端执行成功,没有问题,但是作业执行就遇到这个从我。后面折腾了一下,终于弄清楚了原委。 原来这个作业步骤的“Advanced”选项里面,设置成了Run as user 为dbo。
取消这个选项,问题即可解决。个人设置作业时从不设置此选项,但是有一些开发人员创建的作业就设置了此处选项,结果遇到了这个问题。
另外。我这篇博客SQL Agent Job 报“Access to the remote server is denied because the current security context is not trusted”里面遇到的其实也是这个问题。可笑当时虽然解决了,阴错阳差的解决了问题,但是还是没有找到Root Cause。 以此为戒!
Message:
Executed as user: dbo. The server principal "sa" is not able to access the database "xxxx" under the current security context. [SQLSTATE 08004] (Error 916). The step failed.
作业本身执行的存储过程非常简单,就是将数据库A中的历史数据处理过后,归档到A_History库中,结果就遇到这么一个问题。将作业的存储过程取出在SSMS客户端执行成功,没有问题,但是作业执行就遇到这个从我。后面折腾了一下,终于弄清楚了原委。 原来这个作业步骤的“Advanced”选项里面,设置成了Run as user 为dbo。
取消这个选项,问题即可解决。个人设置作业时从不设置此选项,但是有一些开发人员创建的作业就设置了此处选项,结果遇到了这个问题。
另外。我这篇博客SQL Agent Job 报“Access to the remote server is denied because the current security context is not trusted”里面遇到的其实也是这个问题。可笑当时虽然解决了,阴错阳差的解决了问题,但是还是没有找到Root Cause。 以此为戒!
相关文章推荐
- Issue: Server principal is not able to access the database under the current security context
- SQLBackupAndFTP The server principal "NT AUTHORITY\SYSTEM" is not able to access the database "xxxx"
- SQL Agent Job 报“Access to the remote server is denied because the current security context is not trusted”
- "Host 'USER-XXXX' is not allowed to connect to this MySQL server"
- The SQL Server Service Broker for the current database is not enabled, and as a result query notifications are not supported.
- PRB: "Requested Registry Access Is Not Allowed" Error Message When ASP.NET Application Tries to Write New EventSource in the Eve
- Sharepoint Error : The URL "filename" is invalid. It may refer to a nonexistent file or folder, or refer to a valid file or folder that is not in the current Web
- WINDOW7 Cake is NOT able to connect to the database.
- 安装Visual Studio 2010时提示"The location specified for the help content store is invalid or you do not have access to it".
- The origin server did not find a current representation for the target resource or is not willing to
- The origin server did not find a current representation for the target resource or is not willing to
- The SQL Server Service Broker for the current database is not enabled
- Access to the database file is not allowed. [ File name = ***\DataBase.sdf
- ArcGIS Server注册共享文件夹报错/地理数据库同理【the arcgisserver is not able to connect to the specified directory】
- 138 Your database instance is running. You are not able to access Oracle Enterprise Manager Database
- message from server: "Host 'XXXX' is not allowed to connect to this MySQL server"
- The URL "filename" is invalid. It may refer to a nonexistent file or folder, or refer to a valid file or folder that is not in the current Web
- message from server: "Host 'XXXX' is not allowed to connect to this MySQL server"
- Server Error in '/' Application. Access to the Path Is Denied" error message appears
- The origin server did not find a current representation for the target resource or is not willing to