|
-
Nov 1st, 2004, 01:57 PM
#1
Thread Starter
Frenzied Member
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.
-
Nov 1st, 2004, 05:20 PM
#2
Is it possible to launch a DTS from a SP?
-
Nov 3rd, 2004, 07:46 AM
#3
Thread Starter
Frenzied Member
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.
-
Nov 3rd, 2004, 09:38 AM
#4
Lively Member
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.
-
Nov 3rd, 2004, 10:46 PM
#5
Fanatic Member
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
-
Nov 4th, 2004, 07:58 AM
#6
Thread Starter
Frenzied Member
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.
-
Nov 4th, 2004, 02:05 PM
#7
Fanatic Member
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
-
Nov 4th, 2004, 09:04 PM
#8
Thread Starter
Frenzied Member
Thanks a lot. I'll look into that.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|