Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > SQL Server > SQL Server 2008 > BOOK: Microsoft SQL Server 2008 Integration Services Problem-Design-Solution
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Microsoft SQL Server 2008 Integration Services Problem-Design-Solution
This is the forum to discuss the Wrox book Microsoft SQL Server 2008 Integration Services Problem-Design-Solution by Erik Veerman, Jessica M. Moss, Brian Knight, Jay Hackney ; ISBN: 978-0-470-52576-0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Microsoft SQL Server 2008 Integration Services Problem-Design-Solution 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 September 22nd, 2010, 09:54 AM
Registered User
 
Join Date: Sep 2010
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Unhappy Foreign Key issues with framework when starting several packages from a master.

We have a master package that runs several other packages all using the framework from this book. I think we've set something up wrong because we're gettting the following error every tme the job runs from SQL Server Agent:

The INSERT statement conflicted with the FOREIGN KEY constraint "FK_PackageTaskLog_PackageLog". The conflict occurred in database "ETL_TBL", table "dbo.PackageLog", column 'PackageLogID'. End Error Error: 2010-09-22 03:30:01.53 Code: 0xC002F210 Source: SQL LogTaskPreExecute Execute SQL Task Description: Executing the query "exec dbo.LogTaskPreExecute @PackageLogID = ? ,@Sou..." failed with the following error: "The statement has been terminated.". Possible failure reasons: Problems with the query,

Has anyone else experienced this error when running subpackages in parallel?
Reply With Quote
  #2 (permalink)  
Old January 23rd, 2011, 02:05 AM
Authorized User
Points: 84, Level: 1
Points: 84, Level: 1 Points: 84, Level: 1 Points: 84, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Dec 2009
Posts: 28
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi cmarcum,

Are you getting the same error if you run a single (non-parallel) package? I wonder if the foreign keys have gotten out of sync. If possible, try truncating all framework tables in a test environment and see if that works for you.

HTH,
Jessica
Reply With Quote
  #3 (permalink)  
Old December 23rd, 2011, 02:02 PM
Registered User
Points: 11, Level: 1
Points: 11, Level: 1 Points: 11, Level: 1 Points: 11, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Dec 2011
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Child package error on pre execute proc

Hello all,

I am new to the frame work and I am seeing the same error but in a slightly different circumstance.

When I execute a child package as a stand-alone then the package executes without error and all log entries are complete.

When I execute the child package from an execute package task in the parent I get these errors in the package error log:

The INSERT statement conflicted with the FOREIGN KEY constraint "FK_PackageTaskLog_PackageLog". The conflict occurred in database "SSIS_Config", table "dbo.PackageLog", column 'PackageLogID'.

Executing the query "exec dbo.LogTaskPreExecute @PackageLogId = ? ,@Sou..." failed with the following error: "The statement has been terminated.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.

I've triple checked the variable mapping and the result sets and do not see an error. What I am really struggling with is why it works on its own but not as a child package.

I have a package template that I use for both child and master and when I am using it as a master I just remove the configuration setting for parent package batch id. The execute package tasks are in the sequence container of the parent package.

I could really us a clue...

Take care,

John
Reply With Quote
  #4 (permalink)  
Old January 27th, 2012, 01:19 AM
Authorized User
Points: 84, Level: 1
Points: 84, Level: 1 Points: 84, Level: 1 Points: 84, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Dec 2009
Posts: 28
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi John,

I believe your last statement is the root of your problem. You need to store the batch id in the parent package to be able to pass it to your child package. Add that variable back in, make sure to set it to 0, and you should be good to go!

Jessica
Reply With Quote
  #5 (permalink)  
Old February 1st, 2012, 11:44 AM
Registered User
Points: 11, Level: 1
Points: 11, Level: 1 Points: 11, Level: 1 Points: 11, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Dec 2011
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Thanks for the input.

Hi Jessica,

I have the variable in the parent package and it is set to zero. What I removed from the parent is the package configuration line 4 that looks for the parent id from a parent package. With that back in I get a warning that it is missing.

Even with it in I am getting the errors on the pre-execute event and the doubled entries in the log. What seems to be happening is that both the parent and child preexecute events attempt to log all child tasks.

I have been getting along without the logging but I know I am going to need it as this project grows.

Since I suspect I am missing something obvious and don't want to waste your time I would appreciate a link to a paper that goes into more detail than the book on getting package tasks and logging to play nicely.

Thanks again for a wonderful book and for your help.

John
Reply With Quote
  #6 (permalink)  
Old February 19th, 2012, 11:50 PM
Authorized User
Points: 84, Level: 1
Points: 84, Level: 1 Points: 84, Level: 1 Points: 84, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Dec 2009
Posts: 28
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi John,

The best option to get into the nitty-gritty details of package execution and logging would be Books Online/TechNet.

Best of luck,
Jessica
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
Foreign key not updating with Primary key xavier1945 BOOK: Access 2003 VBA Programmer's Reference 2 July 4th, 2007 09:48 PM
Composite Foreign Key bijgupt SQL Server 2005 6 May 4th, 2007 08:46 AM
FOREIGN KEY and PRIMARY KEY Constraints junemo Oracle 10 June 15th, 2004 01:00 AM
Foreign Key Problem re_anu SQL Server 2000 1 September 26th, 2003 10:58 AM



All times are GMT -4. The time now is 12:44 PM.


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