Solved

Trying to open multiple CMD.EXE's to run simultaneously in my DTS Package

Posted on 2004-08-24
11
523 Views
Last Modified: 2012-06-27
I have a SQL DTS job and at one point, I call five concurrent DOS processes in an attempt to spawn 5 file copy processes simultaneously.

Each of the 5 concurrent DTS steps runs a batch file that copies a file from a remote server to the local machine.  I am calling the batch file like:

start c:\Batches\FileCopy.bat

In the batch file, I have

copy MyFile c:\Files\
exit

I thought that by using start and exit, my 5 DTS steps would cause 5 CMD.EXE's to be opened simultaneously, but when I watch Task Manager, I see one CMD.EXE, although the Process ID is changing constantly as the files are copied.

Can anyone tell me if this is working normally or how to cause 5 separate CMD.EXE's to be opened simultaneuosly?
0
Comment
Question by:ABaruh
11 Comments
 
LVL 23

Expert Comment

by:adilkhan
ID: 11889217
Why Dont you Create a JOB and Then Run each BAT file for Each STEP?
0
 
LVL 7

Author Comment

by:ABaruh
ID: 11889276
There's a lot more that is happening in the SQL that calls the BAT
0
 
LVL 19

Expert Comment

by:Melih SARICA
ID: 11889304
Yes its normal to see only one CMD o process list.

It does'nt run any process till a command runs. and every command creates a process on OS.


0
 
LVL 7

Author Comment

by:ABaruh
ID: 11889382
non_zero, are you saying that I don't need to be concerned about seeing one CMD.EXE in Task Manager and that it is still running the various processes simultaneously?  Please clarify.

Nevertheless, why is it that if I open multiple command windows manually (by typing cmd in my Run dialog box) I will see a separate CMD.EXE for each of those windows?
0
 
LVL 11

Expert Comment

by:ram2098
ID: 11889389
I don't think you can call 5 cmd.exe's in one DTS package with 5 steps.

Not sure what was logic inside this ...

But, you can create 5 DTS package and run them simulataneously. This might work.
0
Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

 
LVL 8

Expert Comment

by:bukko
ID: 11890148
I don't think you are ever going to guarantee simultaneous copying.
If this is absolutley necessary you might want to consider creating a multi-threaded component in VB which creates 5 child objects, each of which wait on separate threads for an exact moment when they start copying together.
Even then, there may be some lag between copies.
0
 
LVL 7

Author Comment

by:ABaruh
ID: 11892448
You guys are getting away from the point.  I'm pretty sure this can be done as I can multi-copy manually if I open 5 dos windows and perform file copies simultaneously in each of them.  Let's focus on why I'm not seeing 5 CMD.EXE's launching.
0
 
LVL 7

Author Comment

by:ABaruh
ID: 11893597
I figured it out:

I had to create 5 separate SQL Server connections inside my DTS Package, and each of the 5 concurrent DTS steps were given their own SQL connection (each of the 5 DTS steps runs a stored proc that executes xp_cmdshell).
0
 
LVL 34

Expert Comment

by:arbert
ID: 11895195
Close the question...
0
 

Accepted Solution

by:
ee_ai_construct earned 0 total points
ID: 11934733
Closed, 500 points refunded.
ee_ai_construct (replacement part #xm34)
Community Support Moderator
0

Featured Post

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Backing up an SQL Transaction Log 11 39
check the deletion of SQL job on who delete/disable it 12 29
TSQL - IF ELSE? 3 28
SSRS troubles 4 14
Introduction In my previous article (http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SSIS/A_9150-Loading-XML-Using-SSIS.html) I showed you how the XML Source component can be used to load XML files into a SQL Server database, us…
Everyone has problem when going to load data into Data warehouse (EDW). They all need to confirm that data quality is good but they don't no how to proceed. Microsoft has provided new task within SSIS 2008 called "Data Profiler Task". It solve th…
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now