user1668795
user1668795

Reputation: 57

Same SSIS package parallely executing with different parameters through batch file

I have a SSIS package with a Data Flow Task containing an OLEDB source and OLEDB Destination. Again I have a Batch file(.bat file) to execute the SSIS package, using dtexec command. In the batch file I am setting the ConnectionString property of the oledb destination's connection manager. I need the SSIS package to get executed parallely with different values for the Destination ConnectionString since I have to populate multiple Destination tables simulatneously.

How can I change the batch file commands so that I can execute the same SSIS package parallely at the same time, setting different values for the Destination connection Manager's Connection string

Upvotes: 0

Views: 2458

Answers (2)

Andy Leonard
Andy Leonard

Reputation: 624

dbenham is correct. Use the Start command in your batch file (using your example):

start "Instance 1" dtexec /FILE "C:\Users\Desktop\SSIS\PKG.dtsx" /MAXCONCURRENT " 2 " /SET "\Package.Connections[Destination].Properties[ConnectionString]";\""Data Source=datasrc1;Initial Catalog=db1;User ID=usrid;Password =pswd;Provider=SQLOLEDB.1;"\"

start "Instance 2" dtexec /FILE "C:\Users\Desktop\SSIS\PKG.dtsx" /MAXCONCURRENT " 2 " /SET "\Package.Connections[Destination].Properties[ConnectionString]";\""Data Source=datasrc2;Initial Catalog=dbn2;User ID=usrid;Password =pswd;Provider=SQLOLEDB.1;"\"

These will execute in parallel with different Destination ConnectionString values.

Upvotes: 1

dbenham
dbenham

Reputation: 130919

You should use the START command To run console applications in parallel. Don't forget to add a title as the first parameter. You can use empty quotes as the first parameter for an empty title.

start "" yourProgram.exe parameter1 parameter2 ...

Each command you start will run in its own console window. Type start /? or help start from a command prompt to get more information.

Upvotes: 2

Related Questions