all groups > sql server dts > may 2004 >
You're in the

sql server dts

group:

Cannot execute package with dtsRun utility


Cannot execute package with dtsRun utility Sheldon Penner
5/28/2004 2:06:02 PM
sql server dts:
I have written a DTS package that executes perfectly when I run it from the Enterprise Manager and also executes perfectly when I run it from dtsRunUI. However, when I attempt to run it from the command line using

dtsrun /S"SHELDON" /E /N"CessnaImport

it displays the message

DTSRun OnStart: DTSStep_DTSActiveScriptTask_

And then it apparently freezes. I have left it as long as 10 minutes before hitting Control-C to terminate, and it has never progressed beyond this first message. (Typically, the package takes about 2 minutes to execute.

Re: Cannot execute package with dtsRun utility Narayana Vyas Kondreddi
6/1/2004 7:48:58 AM
What happens if you take that VBScript code, save it to a .VBS file and
invoke from command line?
--
HTH,
Vyas, MVP (SQL Server)
http://vyaskn.tripod.com/
Is .NET important for a database professional?
http://vyaskn.tripod.com/poll.htm


[quoted text, click to view]
I have written a DTS package that executes perfectly when I run it from the
Enterprise Manager and also executes perfectly when I run it from dtsRunUI.
However, when I attempt to run it from the command line using

dtsrun /S"SHELDON" /E /N"CessnaImport"

it displays the message:

DTSRun OnStart: DTSStep_DTSActiveScriptTask_1

And then it apparently freezes. I have left it as long as 10 minutes before
hitting Control-C to terminate, and it has never progressed beyond this
first message. (Typically, the package takes about 2 minutes to execute.)

The first step of the CessnaImport package executes a vbscript that in turn
accesses a com object. Could this be an issue? (As I mentioned, it doesn't
prevent the package from executing in Enterprise Manager or dtsRunUI.)

Re: Cannot execute package with dtsRun utility Sheldon Penner
6/1/2004 9:16:11 PM
Thanks for your note. I tried what you suggested, and the script ran with no problems. It is quite short, so here it is in its entirety

Dim bca
Set bcas = CreateObject("bcas_util.airplane"
bcas.airplaneParse "e:\source.txt", "C:\\airplane\Import.txt
Set bcas = Nothin
Main = DTSTaskExecResult_Succes

Re: Cannot execute package with dtsRun utility Darren Green
6/2/2004 2:30:58 PM
Inside the package, set the execute on main tread option for teh ActiveX
Script Task. Right-click the task, Workflow - Properties - Options.


--
Darren Green
http://www.sqldts.com


[quoted text, click to view]
creates import.txt, which is what actually gets imported to SQL. It seems
to always work except when invoked through dtsRun with the command line code
I indicated in my previous message.

Re: Cannot execute package with dtsRun utility Sheldon Penner
6/2/2004 6:01:04 PM
That did the trick, Darren. Thank you

Re: Cannot execute package with dtsRun utility Darren Green
6/3/2004 8:08:48 AM
The main reason to use it is so that the task runs on the main package
thread. A package can spawn multiple threads for each task, to help
performance, but your code must be capable of supporting this, and
communicating back to the main thread. That is my simplified understanding
of it.

The main cause of problems revolves around the us of VB authored tasks or
components, since VB just can't handle this.

Some KBs related to this overall problem-

318819 - PRB: A DTS Package Raises Exceptions or Stops Responding When You
Run It as a Scheduled Job
(http://support.microsoft.com/default.aspx?scid=kb;en-us;318819&Product=sql2
k)

290077 - FIX: DTS Scheduled Job Does Not Complete After First Run
(http://support.microsoft.com/default.aspx?scid=kb;en-us;290077&Product=sql2
k)

296533 - INF: Analysis Services Processing Task May Not Execute Correctly
(http://support.microsoft.com/default.aspx?scid=kb;en-us;296533&Product=sql2
k)

282966 - DTS Package Fails with Dynamic Properties Task and OLAP Processing
Task
(http://support.microsoft.com/default.aspx?kbid=282966)

--
Darren Green
http://www.sqldts.com

[quoted text, click to view]
thread" option means nor why it solved my problem.

AddThis Social Bookmark Button