Results 1 to 8 of 8

Thread: Executing DTS packages

  1. #1

    Thread Starter
    Frenzied Member ober0330's Avatar
    Join Date
    Dec 2001
    Location
    OH, USA
    Posts
    1,945

    Executing DTS packages

    Does anyone know how to execute a DTS package from PHP? I'm using SQL Server 2K with PHP 4.3.8.

    I've tried a few simple things in the query analyzer with no luck.

    Any help/suggestions would be appreciated.

    And in case you are wondering, I do have the package scheduled to go off every morning at 3AM, but I want to allow the user to run the update whenever they want.
    format your code!! - [vbcode] [/vbcode]

    ANSWERS CAN BE FOUND HERE!!

    my personal company

  2. #2
    PowerPoster Dave Sell's Avatar
    Join Date
    Mar 2004
    Location
    /dev/null
    Posts
    2,961
    Is it possible to launch a DTS from a SP?

  3. #3

    Thread Starter
    Frenzied Member ober0330's Avatar
    Join Date
    Dec 2001
    Location
    OH, USA
    Posts
    1,945
    From what I've read, it is. And I know how to run a SP, but I can't find the code on how to execute a DTS package from a SP.
    format your code!! - [vbcode] [/vbcode]

    ANSWERS CAN BE FOUND HERE!!

    my personal company

  4. #4
    Lively Member
    Join Date
    Sep 2004
    Posts
    96
    I found an article some time ago on how to call COM objects from PHP. I have no idea where it was I saw it, and it doesn't look like I bookmarked it. I imagine that's the route you will need to go. Try googling "calling COM objects from PHP" and see what comes up.

  5. #5
    Fanatic Member vb_dba's Avatar
    Join Date
    Jun 2001
    Location
    Somewhere aloft between the real world and insanity
    Posts
    1,016
    You could use the xp_cmdshell procedure to run the command line utility DTSRun. Look up DTSRun in books online for syntax questions and give it a go.
    Chris

    Master Of My Domain
    Got A Question? Look Here First

  6. #6

    Thread Starter
    Frenzied Member ober0330's Avatar
    Join Date
    Dec 2001
    Location
    OH, USA
    Posts
    1,945
    I did try using that without luck. I couldn't find specific syntax on the BOL.

    I tried "EXEC xp_cmdshell(dtsrun(nameofmydtspackage))"

    But that didn't do it.
    format your code!! - [vbcode] [/vbcode]

    ANSWERS CAN BE FOUND HERE!!

    my personal company

  7. #7
    Fanatic Member vb_dba's Avatar
    Join Date
    Jun 2001
    Location
    Somewhere aloft between the real world and insanity
    Posts
    1,016
    Try this:
    Code:
    xp_cmdshell 'dtsrun /SServerName /UUserID /PPassword /N"Package Name"'
    Or you can go to sqldts.com and look at the FAQ on Execution for some tips.
    Chris

    Master Of My Domain
    Got A Question? Look Here First

  8. #8

    Thread Starter
    Frenzied Member ober0330's Avatar
    Join Date
    Dec 2001
    Location
    OH, USA
    Posts
    1,945
    Thanks a lot. I'll look into that.
    format your code!! - [vbcode] [/vbcode]

    ANSWERS CAN BE FOUND HERE!!

    my personal company

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width