Wrox Programmer Forums
|
BOOK: Professional Microsoft SQL Server 2012 Integration Services
This is the forum to discuss the Wrox book Professional Microsoft SQL Server 2012 Integration Services by Brian Knight, Erik Veerman, Jessica M. Moss, Mike Davis, Chris Rock; ISBN: 978-1-1181-0112-4
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional Microsoft SQL Server 2012 Integration Services section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 18th, 2015, 01:50 PM
Authorized User
 
Join Date: Apr 2015
Posts: 33
Thanks: 0
Thanked 0 Times in 0 Posts
Default Ch 14 ParallelDemo executing the batch file

In ch 14, I executed the batch file, correcting the path to and name of the package. A window popped up asking me with what application I would like to open the DTSX file. I selected Execute Package Utility and immediately knew I had made the wrong choice. Of course the selected application popped up, with ParallelDemo.dtsx filled in, and I clicked Execute.

What application for processing the package was I supposed to select?

Upon clicking Execute, the package executed and completed the loop; all the ctlTaskQueue records were updated. All the loop iterations were executed with the same thread. I think that this is not what we wanted.

I closed the Execute Package Utility, and the command window displayed a new output line indicating a second thread has been spawned. With all the records in table ctlTaskQueue updated, there was now nothing to do in this new thread.

Accepting that Execute Package Utility was the wrong application to be executing, it seems that in order for each iteration of the package loop to be in a separate thread, the execution of ctl_UseTask - containing SELECT and UPDATE statements - must complete before the batch file iterates to the next thread spawn and begins execution of the next SELECT from ctlTaskQueue. It is not OBVIOUS that ctl_UseTask will be faster than a single iteration in the batch file loop, but I suppose that this could be the case.
 
Old August 18th, 2015, 06:32 PM
Authorized User
 
Join Date: Apr 2015
Posts: 33
Thanks: 0
Thanked 0 Times in 0 Posts
Default bad parallelBatch.cmd in download

I started with the batch file that came with the download. That was my problem. In the download file, the START statement does not contain the path and file name of the project to be repeatedly executed. That path and file name are actually on the next line, which you might not notice unless you maximize the window, which I didn't do. I mistakenly thought the START statement was wrapping around, putting the path & file on the next line. So my original batch file had a line that only contained the path to my paralleldemo.dtsx package, and Windows queried me for a application to handle it.

When I arranged for the START statement to also contain the package path & name, the Execute Package Utility stopped popping up.
 
Old August 20th, 2015, 12:44 PM
Authorized User
 
Join Date: Apr 2015
Posts: 33
Thanks: 0
Thanked 0 Times in 0 Posts
Default Are threads actually executing tasks?

Just because the batch is spawning new spreads does not mean a every thread is doing some actual work.

I added a field, ID, to table ctlTaskQueue for the purpose of containing some identifier of the package execution underway when Start and Complete fields were updated. Updating this with the System::StartTime was not effective as that date is only good to the nearest second. I added a SCRIPT TASK prior to the loop and the\at script set a new variable with a GUID value. I modified the UPDATE CTL TASK to update field ID to this variable value.

Results of a couple of batch file executions showed that first thread executed multiple iterations of its loop (1st, 2nd and 4th iterations in one case, 1st and 3rd iterations in another case.) Other iterations executed just one iteration each. Your results may vary. My AdventureWorks2014 db has 5 years of sales data.

The text doesn't go into the relation between the loop in the package and the loop in the batch file. The relation varies.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Ch 14 ParallelDemo.dtsx ... parallelism get inc BOOK: Professional Microsoft SQL Server 2012 Integration Services 0 August 17th, 2015 07:26 PM
File Upload error / Ch. 14 wassim84 BOOK: Beginning ASP.NET 4.5 : in C# and VB 9 February 1st, 2015 06:08 PM
ch.14 - admin_transact is not correct file? student998 BOOK: Beginning PHP 6, Apache, MySQL 6 Web Development ISBN: 9780470391143 0 March 18th, 2011 11:17 AM
executing vb batch file pat933 VB How-To 0 May 14th, 2006 12:22 AM
ch.14 file errors caseyc BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 10 February 28th, 2006 03:59 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.