locked
Execute a SSIS package from CRM custom WorkFlow RRS feed

  • Question

  • Can we execute a ssis package which is on a different database from a custom workflow in crm 2011?
    Tuesday, March 6, 2012 9:33 PM

Answers

  • Hello,

    Yes you can.

    By example, create a custom workflow activity that would run the SSIS package via command line "dtexec ...".

    If you prefer your workflow activity to run the SSIS package asynchronously (e.g. within a Dialog that would only launch the package without waiting for its result), the best is to use another DB.

    The Workflow activity could create a record in a dedicated table, and a trigger or Job would in turn detect the new record and run the SSIS package.

    Be carefull with running SSIS packages within a trigger as the created record is not committed until the trigger is done. This might have an important impact on the DB performance or lead to weird behaviours. I'd recommend relying on Jobs.

    Best Regards,

    Benjamin


    Tuesday, March 6, 2012 10:41 PM
  • It'd be worth checking under which context your workflow runs.

    This login probably doesn't have access to the SSIS package or a required component.

    Tuesday, March 6, 2012 11:12 PM

All replies

  • Hello,

    Have you tried to use search engines for your issue? I tried and I have found a lot of relevant results.


    Microsoft CRM Freelancer

    My blog (english)
    Мой блог (русскоязычный)
    Follow Andriy on Twitter

    Tuesday, March 6, 2012 10:38 PM
    Moderator
  • Hello,

    Yes you can.

    By example, create a custom workflow activity that would run the SSIS package via command line "dtexec ...".

    If you prefer your workflow activity to run the SSIS package asynchronously (e.g. within a Dialog that would only launch the package without waiting for its result), the best is to use another DB.

    The Workflow activity could create a record in a dedicated table, and a trigger or Job would in turn detect the new record and run the SSIS package.

    Be carefull with running SSIS packages within a trigger as the created record is not committed until the trigger is done. This might have an important impact on the DB performance or lead to weird behaviours. I'd recommend relying on Jobs.

    Best Regards,

    Benjamin


    Tuesday, March 6, 2012 10:41 PM
  • I tried doing all the stuff which i know.

    • I tried to execute a ssis package from a console application it works fine, when i put the same code in the custom workflow it gives me the following error

    Failed to open package file due to
    error 0x80070005 "Access is denied.".  This happens when loading
    a package and the file cannot be opened or loaded correctly into the XML
    document. This can be the result of either providing an incorrect file name was
    specified when calling LoadPackage or the XML file was specified and has an incorrect
    format.

    but the same package executes when it is implemented from a console or a web application.

    Tuesday, March 6, 2012 10:44 PM
  • It'd be worth checking under which context your workflow runs.

    This login probably doesn't have access to the SSIS package or a required component.

    Tuesday, March 6, 2012 11:12 PM