Running a package as a job from Asp.net page

  • Hi All,

    I have an Asp.net application which allows the user to upload data into the sql table using ssis.

    On Upload button click I should be able to run the packge that is deployed in another server.

    I need to pass few variables to the package like folderpath and filename. I deployed the packge to SQL server (not file system or dts). Im pretty much confused with the whole concept of calling the ssis package (existing in the db server) from the web server. Can anyone please suggest me a way to achieve this....?

    I tried running the package from sp using dtexec passing variables with /set. the package is running but it is only taking the values that i gave in BIDS not the values that i pass from the sp. If i give blank values for the variables in BIDS and pass the variables from sp the package is errored out.

    Please help me.....i may be very confusing here (my head is bouncing as the deadline is nearing and im not yet done with the upload part), please do ask me if u need little more clarification on my post.

    With Regards,
    Anu..;-):hehe:

  • Can you show us the code that you're using to execute dtexec?

    To pass variables along with dtexec it should be something like this:

    DTExec /SQL "\PkgTest" /SERVER "(local)" /SET "\Package.Variables[User::varFile].Value";"File_001.xls" /MAXCONCURRENT " -1 " /CHECKPOINTING OFF /REPORTING E

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

  • the statement iam using is

    dtexec /SQL "\BPCSBudget" /Server "IN-HRPORTAL\SQL2005"

    /SET \Package.Variables[User::FolderPath].Properties[Value];"D:\Inbox\Sivaraj\BPCSUpdatedPackages\BPCSBudget.xls"

    The package is working fine but iam not able to pass the variable values iam giving in the above stmt.

    I tried enclosing \Package.Variables[User::FolderPath].Properties[Value] in quotes i/e/. "\Package.Variables[User::FolderPath].Properties[Value]" but iam getting the same results.

    With Regards,
    Anu..;-):hehe:

  • As I read the description of dtexec at BOL, the statement should take the following form:

    dtexec /f mypackage.dtsx /set \package.variables[myvariable].Value;myvalue

    This without the Properties.

    Can you try that?

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

  • I tried giving it the way u said without properties. but still it is not taking the values.

    With Regards,
    Anu..;-):hehe:

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply