SQL Agent Job 报“Access to the remote server is denied because the current security context is not trusted”
SQL Server 2005(Microsoft SQL Server 2005 - 9.00.5000.00)下的一个作业执行一个存储过程,存储过程中动态SQL语句使用链接服务器(Linked Servers),从另外一台SQL Server服务器获取数据。但是执行时报“Access to the remote server is denied because the current security context is not trusted”。但是在SSMS客户端手工执行存储过程却又是OK的。
遇到这个问题很是诡异,看似是一个权限和安全方面的原因,但是有不少作业也是这么做的,唯独这台服务器遇到这个问题。网上也有大把人遇到这个问题。官方都有一些资料。
https://www.sqlservercentral.com/Forums/Topic579778-146-1.aspx
提供的解决方法也五花八门的。我都一一尝试了一下,结果都没有解决我的问题。最后按照下面这篇文章的介绍解决了问题。
修改作业的Owner,将作业Owner从sa改为链接服务器(Linked Server)的安全上下文( Current Security Context)所使用的账号(服务器两边都有该相同账号),问题解决。虽然问题解决了,但是还是没有明白root cause,跟一些人沟通都无解。暂时先记录一下这个问题。
----------------------------------------------------------------------------分割线---------------------------------------------------------
上面问题的原因已经弄清楚了,具体参考博客The server principal "sa" is not able to access the database "xxxx" under the current security context (相同的原因)其实是因为在作业的步骤里面,有个高级选项,有个Run as User,里面设置了以某个特殊账户执行。所以遇到了上面问题, 而我上面阴错阳差的解决了,直到今天才找到Root Cause。
SQL Agent Job 报“Access to the remote server is denied because the current security context is not trusted”的更多相关文章
- The server principal "sa" is not able to access the database "xxxx" under the current security context
在SQL Server服务器上一个作业执行时,遇到下面错误信息: Message: Executed as user: dbo. The server principal "sa" ...
- 解决JavaWeb项目报错:The origin server did not find a current representation for the target resource or is not willing to disclose that one exists.
明明有项目和文件,而且别的项目都可以运行,偏偏这个不能用,报错The origin server did not find a current representation for the targe ...
- 【报错】The origin server did not find a current representation for the target resource or is not willing to disclose that one exists.
提交表单之后, 报错页面显示: HTTP Status 404 – 未找到 Type Status Report 消息 Not found 描述 The origin server did not f ...
- CDH5.16.1的agent启动报错:ERROR Error, CM server guid updated, expected d9bcadb4-f983-41b8-a667-66760f47bc91, received a67f5efa-8473-4f6a-94d6-231d1f432ef0
1 详细错误 0/Oct/2019 14:56:13 +0000] 28577 MainThread agent ERROR Error, CM server guid updated, expect ...
- Symantec Backup Exec 报"Access denied to directory xxx" Error Code E0008488
使用Symantec Backup Exec将几台Linux服务器上的RMAN备份收带时,偶尔会遇到作业备份失败的情况,检查Job History,就会发现有“Access denied to dir ...
- 在configure distribution时遇到错误,不能打开sql agent
今天在配置Distribution时,遇到一个错误,不能打开sql agent,详细错误信息如下: SQL Server blocked access to procedure 'dbo.sp_set ...
- Sqlserver Sql Agent Job 只能同时有一个实例运行
Sqlserver Sql Agent中的Job默认情况下只能有一个实例在运行,也就是说假如你的Sql Agent里面有一个正在运行的Job叫"Test Job",如果你现在再去启 ...
- sql server代理服务无法启动(SQL Agent):OpenSQLServerInstanceRegKey:GetRegKeyAccessMask failed (reason: 2).
问题:从windows自带的事件查看器中查看到报错信息如下 OpenSQLServerInstanceRegKey:GetRegKeyAccessMask failed (reason: 2). (注 ...
- SQL Agent服务无法启动如何破
问题现象 从阿里云上镜像过来的一台的数据库服务器,SQL Agent服务启动不了,提示服务启动后停止.(原数据库服务器是正常的,怀疑跟镜像有关) 如下是系统日志和SQL Agent的日志 SQLSer ...
随机推荐
- Java 容器 & 泛型:三、HashSet,TreeSet 和 LinkedHashSet比较
Writer:BYSocket(泥沙砖瓦浆木匠) 微博:BYSocket 豆瓣:BYSocket 上一篇总结了下ArrayList .LinkedList和Vector比较,今天泥瓦匠总结下Hash ...
- SpringBoot2.0源码分析(三):整合RabbitMQ分析
SpringBoot具体整合rabbitMQ可参考:SpringBoot2.0应用(三):SpringBoot2.0整合RabbitMQ RabbitMQ自动注入 当项目中存在org.springfr ...
- 08 训练Tensorflow下围棋
这里介绍一下开源项目Mugo,它基于Tensorflow,可以使用sgf的棋谱训练围棋机器人,跟你下围棋,这里直接给出本人修改完善好的项目,只介绍一下用法. 链接:http://pan.baidu.c ...
- com.mysql.jdbc.Driver 和 com.mysql.cj.jdbc.Driver
com.mysql.jdbc.Driver 是 mysql-connector-java 5中的,com.mysql.cj.jdbc.Driver 是 mysql-connector-java 6中的 ...
- R语言实战(二)——数据分析基础知识
一.R中数据结构 1.数据集 通常是由数据构成的一个矩形数组,行 表示 观测(记录.示例),列 表示 变量(字段.属性) 2.R中的数据结构 3.向量 c()可以用来创建向量 > a <- ...
- c#连接oracle数据库 DBHelper
闲着没事自己写了一个OracleHelper类,希望大神给点建议优化 using System; using System.Collections.Generic; using System.Linq ...
- CIL中间语言浅谈
CIL中间语言 通用中间语言(Common Intermediate Language,简称CIL)(曾经被称为微软中间语言或MSIL)是一种属于通用语言架构和.NET框架的低阶(lowest-lev ...
- 从零开始学安全(十三)●SQL server 2008 R2 安装
安装过程1.下载并解压 sql_server_2008_r2_enterprise 点击 setup . 2.打开后如图,点击左侧的 安装 ,再点击右边的 全新安装或向现有安装添加功能. 3.安装支持 ...
- asp.net-基础-20180320
常用页面指令 <%@page%>:一个页面只能有一个 <%@Import NameSpace=“Value“%> 导入命名空间 <%@OutputCache%> 设 ...
- [angularjs] angularjs系列笔记(四)控制器
Scope作用域 Scope作用域是应用在HTML视图和Js控制器之间的纽带 Scope是一个对象,有可用的属性和方法 根作用域 所有的应用都有一个$rootScope,它可以作用在ng-app指令包 ...