Using Java to run DTS

  • hi,

    i've a DTS package in a .DTS file format

    Is it possible to initiate a DTS package remotely from java, maybe using JDBC? Any examples would be greatly appreciated.

     

  • Can Java bind to and use COM objects? If so then you can load, execute, change or even build DTS packages from Java.

    In VB.NET or C# I would add a project reference to the Microsoft DTS Package Object Libraray. DTS. is the ProgID prefix for all objects.

    Alternatively you can use the dtsrun.exe command line utility to run the DTS package.

    As, this runs asynchronously you cannot trap the success and failure.

    I would suggest the first option.

    Thanks,

    Ganesh

  • Since you are not likely to distribute the DTS COM DLLs with your Java code, I would suggest referencing the below:

    http://www.sqldts.com/?210

     

    And call the package from TSQL via JDBC.

    Thanks.

     

     

    Trey Johnson | Chief Business Intelligence Architect | Cizer Software (www.cizer.com)

    Who? - Cizer - http://www.cizer.com/about.htm - Blog - http://www.sqlserverbi.com/
    What? - Products enhancing Microsoft Business Intelligence - http://www.cizer.com/products.htm
    Wow! - Empower your Developers.... NEW Drop In Reporting - http://www.cizer.com/cnr-drop-in-reporting.htm
    How? - BI Training - http://www.cizer.com/training.htm - Cizer Solutions - http://www.cizer.com/solutions.htm

  • Yup, that's the way to do it...JDBC to TSQL.  The article referenced says to use xp_cmdShell.  Personally, I schedule the DTS package, then use "sp_start_job" proc.

    cl 

    Signature is NULL

Viewing 4 posts - 1 through 3 (of 3 total)

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