Wrox Programmer Forums
|
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 February 11th, 2011, 02:02 PM
Registered User
 
Join Date: Feb 2011
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Framework error

I have followed the instructions for setting up the framework in Chapter 2, but I am now getting the follow error messages...

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

[Execute SQL Task] Error: 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.

Any guidance on resolving the problem would be greatly appreciated.

Thanks,
Stuart
 
Old February 11th, 2011, 02:28 PM
Registered User
 
Join Date: Feb 2011
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Please disregard this post. I found the error - the name of the LogPackageStart task was spelled incorrectly.
Thanks,
Stuart
 
Old May 6th, 2011, 05:04 AM
Registered User
 
Join Date: May 2011
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Stuart

I am getting the same error as you were but I don't understand your solution.

Can you please elaborate?

Thanks in advance
 
Old May 6th, 2011, 09:21 AM
Registered User
 
Join Date: May 2011
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I have managed to debug the problem:

In the OnPreExecute event handler, the value of the variable PackageLogID is 0 whereas in the SQL Server Profiler, I can see that a new record was inserted into the table PackageLog and that a new primary key (PackageLogID) was returned.

In summary, the variable does't have the primary key which is why the insert into PackageTaskLog errors with referential integrity error.

Is there a setting that I have missed? How can I ensure the variable has a value before the stored procedure is called?

Thanks in advance.
 
Old May 6th, 2011, 09:51 AM
Registered User
 
Join Date: May 2011
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Fixed!

My problem was that I had put the SQL LogPackageStart task inside a Sequence. The Sequence was casing the OnPreExecute event to fire which of course didn't have the primary key because the SQL LogPackageStart hadn't yet run.

Moved the SQL LogPackageStart outside of the sequence and now the error is gone.
 
Old November 1st, 2011, 09:32 AM
Registered User
 
Join Date: Nov 2011
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Thumbs up Error in LogTaskPreExecute

Thanks stuartward

I had renamed the SQL execute tasks to meet our naming standard and you post led me to reviewing the associated SP which is hard coded with the templated task names.

I corrected the sp to match the updated name and the issue resolved.






Similar Threads
Thread Thread Starter Forum Replies Last Post
changing host server framework 2.0 from framework jay_vijesh ASP.NET 1.x and 2.0 Application Design 1 September 11th, 2006 02:18 PM
Urgent help -- error raised with framework 2.0 Vinjamuri BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 1 May 30th, 2006 01:28 PM
Compact Framework Error spawning ". ????? drb2k2 General .NET 0 March 9th, 2005 02:13 PM
.NET Framework 1.1 upgrade: Remoting error agarwalmk General .NET 0 March 11th, 2004 02:42 PM





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