xp_cmdshell 的 SSIS 错误 [英] SSIS error with xp_cmdshell

查看:18
本文介绍了xp_cmdshell 的 SSIS 错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是一个项目的新手并创建了一个新的 SSIS 包.当我通过双击执行包时,它可以工作.当我在 shell 中输入时:

I'm new to a project and created a new SSIS package. When I execute the package by double-clicking it, it works. When I type into the shell:

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

它也有效.但是当我运行具有以下代码的存储过程时:

It works also. But when I run my Stored Procedure which has the following code:

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

失败了.错误的来源:mypackage Connectio manager "my connection manager" Desc: "Login failed for user 'myUser'."'myUser' 有权执行 xp_cmdshell.它是代理用户.奇怪的是,我可以毫无问题地执行其他包,只是这个包不起作用.知道我错过了什么吗?(顺便说一句:所有包都有 DontSaveSensitive 保护级别)

It fails. The error has the source: mypackage Connectio manager "my connection manager" Desc: "Login failed for user 'myUser'." 'myUser' has rights to execute xp_cmdshell. It is the proxy user. Oddly enough, I can execute other packages without any problems, just this one doesn't work. Any idea what I'm missing? (BTW: all Packages have DontSaveSensitive protection level)

这里是完整的错误信息,有什么想法吗?

Here the full error message, any ideas?

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

推荐答案

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

xp_cmdshell only allows for one set of double quoted parameters to be passed.

使用 xp_cmdshell (SQL Server 2008) 通过 DTEXEC 传递变量

这篇关于xp_cmdshell 的 SSIS 错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆