Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > SQL Server > SQL Server 2012 > BOOK: Professional Microsoft SQL Server 2012 Integration Services
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old August 18th, 2015, 01:50 PM
Authorized User
Points: 157, Level: 3
Points: 157, Level: 3 Points: 157, Level: 3 Points: 157, Level: 3
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
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.
Reply With Quote
  #2 (permalink)  
Old August 18th, 2015, 06:32 PM
Authorized User
Points: 157, Level: 3
Points: 157, Level: 3 Points: 157, Level: 3 Points: 157, Level: 3
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
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.
Reply With Quote
  #3 (permalink)  
Old August 20th, 2015, 12:44 PM
Authorized User
Points: 157, Level: 3
Points: 157, Level: 3 Points: 157, Level: 3 Points: 157, Level: 3
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
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.
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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

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 05: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 02:59 PM



All times are GMT -4. The time now is 04:38 PM.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.