dbTalk Databases Forums  

Running a single DTS task?

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Running a single DTS task? in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Ur Pal Al
 
Posts: n/a

Default Running a single DTS task? - 11-27-2006 , 05:00 PM






Is there a way to execute a single DTS task using VBScript in SQL 2000?

TIA,
Alex


Reply With Quote
  #2  
Old   
Arnie Rowland
 
Posts: n/a

Default Re: Running a single DTS task? - 11-27-2006 , 05:29 PM






Look up using DTSRUN -in Books Online.

--
Arnie Rowland, Ph.D.
Westwood Consulting, Inc

Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous

You can't help someone get up a hill without getting a little closer to the
top yourself.
- H. Norman Schwarzkopf


"Ur Pal Al" <alexdavis (AT) cybercom-intl (DOT) com> wrote

Quote:
Is there a way to execute a single DTS task using VBScript in SQL 2000?

TIA,
Alex




Reply With Quote
  #3  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: Running a single DTS task? - 11-28-2006 , 12:17 AM



Hello Arnie,

That won't allow you to execute a single task contained within a package
from ActiveX Script

There are Execute methods on both the Task and the Step objects

The task one is really for internal use only as it sits underneath the Step
and not what you look at when you look at designer.

The Step method can be used this way I believe but again I think it should
be used only internally by the package.


Regards

Allan Mitchell
Konesans Ltd
T +44 7966 476 572
F +44 2071 008 479
http://www.konesans.com

Quote:
Look up using DTSRUN -in Books Online.

Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
You can't help someone get up a hill without getting a little closer
to the
top yourself.
- H. Norman Schwarzkopf
"Ur Pal Al" <alexdavis (AT) cybercom-intl (DOT) com> wrote in message
news:1164668411.487449.188660 (AT) 45g2000cws (DOT) googlegroups.com...

Is there a way to execute a single DTS task using VBScript in SQL
2000?

TIA,
Alex



Reply With Quote
  #4  
Old   
Ur Pal Al
 
Posts: n/a

Default Re: Running a single DTS task? - 11-28-2006 , 08:14 AM



Allan,
That did the trick!

Code snipplet:
Set oPkg = CreateObject("DTS.Package2")
oPkg.LoadFromSQLServer "(local)", , ,
DTSSQLStgFlag_UseTrustedConnection, , , , "Test DTS pkg"

For Each oStep in oPkg.Steps
If oStep.Description = "test task" Then
oStep.Execute
Exit For
End If
Next

oPkg.UnInitialize

Allan Mitchell wrote:
Quote:
Hello Arnie,

That won't allow you to execute a single task contained within a package
from ActiveX Script

There are Execute methods on both the Task and the Step objects

The task one is really for internal use only as it sits underneath the Step
and not what you look at when you look at designer.

The Step method can be used this way I believe but again I think it should
be used only internally by the package.


Regards

Allan Mitchell
Konesans Ltd
T +44 7966 476 572
F +44 2071 008 479
http://www.konesans.com

Look up using DTSRUN -in Books Online.

Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
You can't help someone get up a hill without getting a little closer
to the
top yourself.
- H. Norman Schwarzkopf
"Ur Pal Al" <alexdavis (AT) cybercom-intl (DOT) com> wrote in message
news:1164668411.487449.188660 (AT) 45g2000cws (DOT) googlegroups.com...

Is there a way to execute a single DTS task using VBScript in SQL
2000?

TIA,
Alex


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.