Executing DTS Package from Stored Procedure

  • When trying to run a DTS Package from a stored proc using the sp_OA ... extended stored procedures, I can successfully call sp_OACREATE, sp_OAMETHOD with 'LoadFromSQLServer'.

    However, using sp_OAMethod with 'Execute' to actually run the package, Query Analyser keeps 'executing' for ever. I eventually cancel the query and it takes another age for it to stop.

    Any ideas, anyone???

  • Does the package run successfully if you run it via other methods? ie: EM or DTSRUNUI?

    Thanks

    Phill Carter

    --------------------
    Colt 45 - the original point and click interface

  • Hi, Thanks for taking the interest.

    Yes - running interactively through EM, the package runs perfectly.

    I have also tries to run the package from a stored proc using the xp_cmdshell with DTSRun - same problem, the world just keeps spinning ....

  • Do you have any prompts or parameters that need to be entered? The package could be awaiting input.

    What about the login used to execute the sp_OA procedures. Does it have access to the database?

    Thanks

    Phill Carter

    --------------------
    Colt 45 - the original point and click interface

  • Can you post the details of how you are running it? Could be something simple that you just overlooked.

    Also, when running do you have it set up to log information (under Packages Properties when in design view)? If not, then set it up to see where it is hanging.

    Edited by - antares686 on 12/07/2002 9:50:00 PM

  • Make sure you clean the objectc at the end before start using again.

    Check this example

    http://www.databasejournal.com/img/spExecutePKG.sql

    Johnny...

  • a

Viewing 7 posts - 1 through 6 (of 6 total)

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