Wrox Programmer Forums
Go Back   Wrox Programmer Forums > SQL Server > SQL Server 2008 > BOOK: Microsoft SQL Server 2008 Integration Services Problem-Design-Solution
|
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 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 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?
 
Old January 23rd, 2011, 03:05 AM
Authorized User
 
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
 
Old December 23rd, 2011, 03:02 PM
Registered User
 
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
 
Old January 27th, 2012, 02:19 AM
Authorized User
 
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
 
Old February 1st, 2012, 12:44 PM
Registered User
 
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
 
Old February 20th, 2012, 12:50 AM
Authorized User
 
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





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





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