SSIS错误和xp_cmdshell(SSIS error with xp_cmdshell)

2019-11-02 06:51发布

我是新来的项目,并创建了一个新的SSIS包。 当我通过双击它执行的包,它的工作原理。 当我键入到外壳:

dtexec /F "D:\path\to\my\ssis\package\mypackage.dtsx" /SET \Package.Variables[User::MyVariable].Properties[Value];"10"

它的工作原理也。 但是,当我跑我的存储过程具有以下代码:

EXEC xp_cmdshell 'dtexec /F "D:\path\to\my\ssis\package\mypackage.dtsx" /SET \Package.Variables[User::MyVariable].Properties[Value];"10"'

它失败。 该错误有来源:mypackage的Connectio经理“我的连接管理器”说明:“登录失败,用户MYUSER'。” “MYUSER”有权执行xp_cmdshell。 这是代理用户。 奇怪的是,我可以执行其他包没有任何问题,只是这一个不工作。 任何想法,我缺少什么? (顺便说一句:所有的套餐都DontSaveSensitive保护级)

这里完整的错误消息,任何想法?

Elapsed:  0.296 seconds
Finished: 10:33:44
Started:  10:33:44
DTExec: The package execution returned DTSER_FAILURE (1).
End Warning    
d in MaximumErrorCount. Change the MaximumErrorCount or fix the errors.
Description: SSIS Warning Code DTS_W_MAXIMUMERRORCOUNTREACHED.  The Execution method succeeded,     but the number of errors raised (1) reached the maximum allowed (1); resulting in failure. This occurs when the number of errors reaches the number specifie
Source: csv_v1_import_package 
Code: 0x80019002
Warning: 2013-07-18 10:33:44.60
End Error
Description: Failed to acquire connection "My Connection Manager". Connection may not be configured correctly     or you may not have the right permissions on this connection.
Source: Update MyTable SQL Code Execute SQL Task
Code: 0xC00291EC
Error: 2013-07-18 10:33:44.60
End Error
An OLE DB record is available.  Source: "Microsoft OLE DB Provider for SQL Server"  Hresult:     0x80040E4D  Description: "Login failed for user 'MY_SERVER\username'.".
Description: SSIS Error Code DTS_E_OLEDBERROR.  An OLE DB error has occurred. Error code:     0x80040E4D.
Source: csv_v1_import_package Connection manager "My Connection Manager"
Code: 0xC0202009
Error: 2013-07-18 10:33:44.60
Started:  10:33:44
NULL
Copyright (C) Microsoft Corporation 2010. All rights reserved.
Version 10.50.4000.0 for 64-bit
Microsoft (R) SQL Server Execute Package Utility

Answer 1:

xp_cmdshell的只允许双引号参数的一组传递 。

参考

  • 运行时SSIS包挂

  • 通过DTEXEC传递变量和xp_cmdshell(SQL Server 2008中)



文章来源: SSIS error with xp_cmdshell