导航
  • 主页
  • 基础类
  • 应用实例
  • 新技术前沿

求助,用xp_cmdshell调用dtexec失败,但是手动执行能成功

mengmou 2007-11-30 06:28:37
一个用windows验证方式验证的ssis包,手动执行可以成功。但是在sa下用xp_cmdshell调用dtexec就失败。我怀疑是安全上下文的问题,咋整啊

Microsoft (R) SQL Server Execute Package Utility
Version 9.00.3042.00 for 32-bit
Copyright (C) Microsoft Corp 1984-2005. All rights reserved.
NULL
Started: 4:23:13 AM
Progress: 2007-11-30 04:23:14.20
Source: Transfer data to tempdb
Validating: 0% complete
End Progress
Progress: 2007-11-30 04:23:14.23
Source: Transfer data to tempdb
Validating: 50% complete
End Progress
Error: 2007-11-30 04:23:14.29
Code: 0xC0202009
Source: Transfer data to tempdb CCRCLog Destination [2881]
Description: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80040E09.
An OLE DB record is available. Source: "Microsoft SQL Native Client" Hresult: 0x80040E09 Description: "SELECT permission denied on object 'CCRCLog', database 'tempdb', schema 'dbo'.".
End Error
Error: 2007-11-30 04:23:14.29
Code: 0xC0202040
Source: Transfer data to tempdb CCRCLog Destination [2881]
Description: Failed to open a fastload rowset for "[dbo].[CCRCLog]". Check that the object exists in the database.
End Error
Error: 2007-11-30 04:23:14.29
Code: 0xC004706B
Source: Transfer data to tempdb DTS.Pipeline
Description: "component "CCRCLog Destination" (2881)" failed validation and returned validation status "VS_ISBROKEN".
End Error
Progress: 2007-11-30 04:23:14.29
Source: Transfer data to tempdb
Validating: 100% complete
End Progress
Error: 2007-11-30 04:23:14.29
Code: 0xC004700C
Source: Transfer data to tempdb DTS.Pipeline
Description: One or more component failed validation.
End Error
Error: 2007-11-30 04:23:14.29
Code: 0xC0024107
Source: Transfer data to tempdb
Description: There were errors during task validation.
End Error
DTExec: The package execution returned DTSER_FAILURE (1).
Started: 4:23:13 AM
Finished: 4:23:14 AM
Elapsed: 0.859 seconds
NULL
...全文
243 点赞 收藏 23
写回复
23 条回复
切换为时间正序
请发表友善的回复…
发表回复
hb_gx 2007-12-06
原来是在域帐户下

谢谢LZ分享经验
回复
mengmou 2007-12-06
呵呵,已经晚了
回复
-狙击手- 2007-12-06
再来一楼
回复
-狙击手- 2007-12-06
加上我就能平均 了
回复
mengmou 2007-12-06
怎么不能平均给啊
回复
mengmou 2007-12-06
用域帐户重启了,解决了。原因是xp_cmdshell会使用sql server service启动帐户为安全上下文,而启动帐户是local system不是域帐户,这个帐户被传递到ssis包中进行对两个server的连接进行安全验证。这样导致ssis包中的一个server在进行安全验证时认为这个local system没有权限,因为这个local system 不是它的帐户,所以不行。


散分啦。
回复
chenhexi007 2007-12-04
学习。
回复
mengmou 2007-12-04
这台服务器有两个实例,一个2000,一个2005,在2000上失败,在2005上就可以,真邪门
回复
rfq 2007-12-04
学习
回复
rouqu 2007-12-03
up
回复
playwarcraft 2007-12-03
http://www.gozyw.com/Html/sjk/SYBASE/2007/4/1736608.html
不知道有沒有用。。。。
回复
mengmou 2007-12-03
高升的办法试过了,也不行。
回复
mengmou 2007-12-03
test
回复
mengmou 2007-12-03
前见天还好好的,忽然就不行了。我查了一下sql server是用local system启动的,想用域账户重启一下,老大回复说
When you try running packages with exec xp_cmdshell 'dtexec…' from the sql 2000 instance on db7 they should run under the sql agent service account, which is the iibsqladmin account, so I'm not exactly sure why it wouldn't work, but I don't think restarting the services will fix it, as it's probably permissions related.
回复
mengmou 2007-12-03
不是xp_cmdshell的问题。登录模式就是混合的。


回复
中国风 2007-12-03
xp_cmdshell--需要sa有系统管理员角色(system administrators)---在数据库里查看一下
回复
中国风 2007-12-03
05:
楼主用以下方法查一下原因:

SQL Server 外围应用配置器—功能介面状态(启用xp_cmdshell)
--
把登陆模式改为混合模式。。
回复
fa_ge 2007-12-01
关注
回复
xiaos139 2007-12-01
我也碰到过这种问题,这个和DTS内部的东西有关,你把这个包重建一次就可以解决了
忘了是怎么产生的了,好像是修改了什么东西。
回复
newqm 2007-12-01
帮顶
回复
发动态
发帖子
MS-SQL Server
创建于2007-09-28

3.2w+

社区成员

MS-SQL Server相关内容讨论专区
申请成为版主
社区公告
暂无公告