Saif Khan
Saif Khan

Reputation: 18772

Can't get my SSIS package to run

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?

Upvotes: 0

Views: 761

Answers (1)

James Black
James Black

Reputation: 41858

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.

Upvotes: 1

Related Questions