By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,924 Members | 1,354 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,924 IT Pros & Developers. It's quick & easy.

firing a dts package's execution

P: n/a
Hi all,
I am using Sql Server 2000. I need to create a very simple app which when
clicked would fire the execution of a dts package on the sql server. The app
itself would sit on the client machine. Is this possible? If so, how?

Thanks in advance.
Jun 20 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a
someone wrote:
Hi all,
I am using Sql Server 2000. I need to create a very simple app which when
clicked would fire the execution of a dts package on the sql server. The app
itself would sit on the client machine. Is this possible? If so, how?


I tried this a month back. There are a number of solutions but I found
that there were alot of security/permissions issues that prevented me
from triggering a DTS package from an application. The most promising
solution I thought was the triggering of a job from within a stored
procedure using sp_start_job. I finally got the permissions worked out
to execute the job but then the job wouldn't execute the DTS.

Ultimately I gave up and went to a scheduled job solution that ran every
10 minutes. I'm sure it's possible to trigger a DTS but my
organization's security policies (which are there for a reason) made
that difficult to accomplish.

Anyway, google for sp_start_job, you should get alot of information that
will help you out.

--
gorf
Jun 20 '06 #2

P: n/a
someone wrote:
Hi all,
I am using Sql Server 2000. I need to create a very simple app which when
clicked would fire the execution of a dts package on the sql server. The app
itself would sit on the client machine. Is this possible? If so, how?

Thanks in advance.


Some combination of xp_cmdshell and DTSRUN would probably do it. Both
are documented in BOL.
Jun 20 '06 #3

P: n/a
someone wrote:
Hi all,
I am using Sql Server 2000. I need to create a very simple app which when
clicked would fire the execution of a dts package on the sql server. The app
itself would sit on the client machine. Is this possible? If so, how?

Thanks in advance.


I've just added something to my VB.Net app something that should also
work from VB 6, and anything that can use COM. Add a reference to the
Microsoft DTSPackage Object Library. Then it's a couple of lines like:

Dim pkg As New DTS.Package2
pkg.LoadFromSQLServer("SERVERNAME", "", "",
DTS.DTSSQLServerStorageFlags.DTSSQLStgFlag_UseTrus tedConnection, "",
"", "", "PACKAGENAME", "")
AddHandler pkg.OnError, AddressOf RecordExtractError
pkg.Execute()

If you need more/something else, it might help if you tell us what the
app is being developed in (incidentally I think the above can also be
written as a script file)

Jun 21 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.