Wrox Programmer Forums

Need to download code?

View our list of code downloads.

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
 
 
Thread Tools Display Modes
  #1 (permalink)  
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
  #2 (permalink)  
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
  #3 (permalink)  
Old May 6th, 2011, 06: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
  #4 (permalink)  
Old May 6th, 2011, 10: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.
  #5 (permalink)  
Old May 6th, 2011, 10: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.
  #6 (permalink)  
Old November 1st, 2011, 10:32 AM
Registered User
Points: 3, Level: 1
Points: 3, Level: 1 Points: 3, Level: 1 Points: 3, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
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.

 


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
changing host server framework 2.0 from framework jay_vijesh ASP.NET 1.x and 2.0 Application Design 1 September 11th, 2006 03: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 02: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



All times are GMT -4. The time now is 10:47 PM.


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