Can't get my SSIS package to run

与世无争的帅哥 提交于 2019-12-13 06:35:13

问题


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.

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

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

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

At the package level I have

ProtectionLevel = EncryptSensitiveWithUserKey
PackagePassword = [BLANK]

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


回答1:


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.

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.



来源:https://stackoverflow.com/questions/1290153/cant-get-my-ssis-package-to-run

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!