dbTalk Databases Forums  

Need DTSRUN Utility to complete before proceeding

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


Discuss Need DTSRUN Utility to complete before proceeding in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Paul Muller
 
Posts: n/a

Default Need DTSRUN Utility to complete before proceeding - 06-09-2004 , 11:44 AM






Want to add DTSRUN command in bat file and have that complete before
proceeding, what is the best way?

Also would like the bat file to fail if the DTSRUN utility fail, what
would the code be for that?

DTSRun.exe -s "<server name>" -e -n "Con_OPR_Adj_Prod"

Other commands.............

Reply With Quote
  #2  
Old   
Darren Green
 
Posts: n/a

Default Re: Need DTSRUN Utility to complete before proceeding - 06-11-2004 , 07:17 AM






DTSRUN doesn't return before the package has completed, or not when I've run
it manually. Assuming there is some factor that causes this, you can use the
start command, start <program> /wait

Darren Green
www.sqldts.com

"Paul Muller" <muller.paul (AT) principal (DOT) com> wrote

Quote:
Want to add DTSRUN command in bat file and have that complete before
proceeding, what is the best way?

Also would like the bat file to fail if the DTSRUN utility fail, what
would the code be for that?

DTSRun.exe -s "<server name>" -e -n "Con_OPR_Adj_Prod"

Other commands.............



Reply With Quote
  #3  
Old   
SqlGuy
 
Posts: n/a

Default Re: Need DTSRUN Utility to complete before proceeding - 09-28-2004 , 11:12 PM



Paul Muller wrote:

Quote:
Want to add DTSRUN command in bat file and have that complete before
proceeding, what is the best way?

Also would like the bat file to fail if the DTSRUN utility fail, what
would the code be for that?

DTSRun.exe -s "<server name>" -e -n "Con_OPR_Adj_Prod"

Other commands.............
If the program fails, it may return a suitable errorlevel, so failure is
discerned at the command line prodessor. In that case it's easy. I
forget the details but it looks something like this in a CMD file:
DTSRun.exe -s "<server name>" -e -n "Con_OPR_Adj_Prod" ||
successcommand && failcommand
the double pipe and double ampersand are commands to execute on failure
and success of the first command. This is from my unreliable memory, so
look it up.
Also, I'll tell you from bitter experience that DTS tasks do NOT run the
same when run in the scheduler as when they're run on the server under
the same user id as the service. This caused many headaches.

One difference noted was that there was a tendency for one task to be
launched before another completely finished, when this was NOT observed
running the task in the Enterprise Manager gui. There are a number of
possible solutions to this. the syntax above is useful, where command
line commands are issued, because the conditional portion essentially
forces the batch to wait for the executable to run to completion, so
that success or failure can be evaluated. Thus, each step is done before
proceeding to the next step. If you write a BAT file, it tends to work
one-at-a-time, but not in a CMD file.

Another major issue I have is that when working on the enterprise
manager on your own desktop, connected to the target server, when you
design tasks that some of the tasks component reference your LOCAL
workstation's environment, rather than being entirely executed on the
server. I can see how this might be a feature rather than a flat-out
bug, but it's truly annoying. For example, the EMAIL tasks depend on the
client of the local machine, where the profiles may not match, and email
addresses may resolve differently (another issue. I always use SMTP
addresses, since they always "work". A valid email address today may
become unresolvable tomorrow, though.)

Another issue is Oracle client connectivity, ODBC connectivity, and
similar issues. I'm writing a process to run on the server as a
scheduled task, under a service, and I DON'T want to have to recreate
the server environment on my desktop. The only way I can accurately
model the scheduler enviroment is in the scheduler itself, where it's
largely "invisible", since it's running on an internal virtual desktop.


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.