无法运行我的 SSIS 包 [英] Can't get my SSIS package to run

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

问题描述

我创建了一个包并将其部署到 SQL Server 2005.该包基本上通过 FTP 下载文件 (.csv) 并将内容提取到表中.数据被清理,然后数据被移动到生产表.

I created and deployed a package to SQL Server 2005. The package basically downloads a file (.csv) via FTP and extracts the contents to a table. The data is cleaned and then the data is moved to a production table.

部署包后,我尝试从一个简单的 .NET 应用程序调用它

After deploying the package, I tried calling it from a simple .NET application

      Dim app As New Application
    Dim pkg As Package

    Try
        pkg = app.LoadFromSqlServer("OrderImport", "machine\dataware", "sa", "sapassword", Nothing)

        Dim result As DTSExecResult = pkg.Execute()
        MsgBox(result.ToString)
    Catch ex As Exception
        MsgBox(ex.Message)
    Finally
        app = Nothing
        pkg = Nothing
    End Try

并收到消息失败".然后我通过 Management Studio 转到 SSIS 并尝试从那里执行包.它可以通过 FTP 下载文件,但是,当它到达 .CSV 文件以提取数据时,它会显示错误

and got the message "Failure". I then went to SSIS via the Management Studio and tried to execute the package from there. It's able to download the files via FTP, however, when it reaches the .CSV file at the point to extract teh data it show an error

The system cannot find the file specified
ERROR: Cannot open the datafile filename.csv

我还能看什么?如果可能,我希望能够使用 SQL Server 用户帐户执行包.

What else can I look at? I want to be able to execute the package with SQL Server user accounts, if possible.

在包级别我有

ProtectionLevel = EncryptSensitiveWithUserKey
PackagePassword = [BLANK]

还有一件事 - 如何将这些错误记录到文件中?

One more thing - how do I log these errors to a file?

推荐答案

当您 ftp 文件时,它实际上是在您期望的位置以正确的名称复制它吗?您可能希望输入文件的绝对路径.

When you ftp the file is it actually copying it where you expect, with the correct name? You may want to put in the absolute path to the file.

在尝试从应用程序运行 SSIS 包之前,我倾向于从命令行运行它,这样更容易调试.

I tend to get the SSIS package working from the command line before I try to run it from an application, easier to debug that way.

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

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