Log in
::
Register
::
Not logged in
Home
Tags
Articles
Editorials
Stairways
Forums
Scripts
Videos
Blogs
QotD
Books
Ask SSC
SQL Jobs
Training
Authors
About us
Contact us
Newsletters
Write for us
Recent Posts
Recent Posts
Popular Topics
Popular Topics
Home
Search
Members
Calendar
Who's On
Home
»
SQL Server 2008
»
SQL Server 2008 - General
»
Export wizard failed?
Export wizard failed?
Rate Topic
Display Mode
Topic Options
Author
Message
ananda.murugesan
ananda.murugesan
Posted Monday, December 31, 2012 2:02 AM
SSC Eights!
Group: General Forum Members
Last Login: Today @ 3:01 AM
Points: 820,
Visits: 2,399
Hi,
pl. suggestion me, what could be on issues during export to another new database by export wizard? how to resolve it?
- Copying to [dbo].[BC_ConfigInstance] (Error)
Messages
Information 0x402090e0: Data Flow Task 2: The final commit for the data insertion in "component "Destination 9 - BC_ContainerAttribute" (358)" has ended.
(SQL Server Import and Export Wizard)
Error 0xc0202009: Data Flow Task 2: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80004005.
An OLE DB record is available. Source: "Microsoft OLE DB Provider for SQL Server" Hresult: 0x80004005 Description: "The statement has been terminated.".
An OLE DB record is available. Source: "Microsoft OLE DB Provider for SQL Server" Hresult: 0x80004005 Description: "The INSERT statement conflicted with the FOREIGN KEY constraint "FK_BC_Container_BC_Owner". The conflict occurred in database "BaseComponents", table "dbo.BC_Owner", column 'OwnerID'.".
(SQL Server Import and Export Wizard)
rgds
ananda
Post #1401317
vinu512
vinu512
Posted Monday, December 31, 2012 2:16 AM
Ten Centuries
Group: General Forum Members
Last Login: Yesterday @ 12:37 AM
Points: 1,047,
Visits: 1,439
The table you are trying to insert data into has a Foreign Key Constraint. Which means that it is referencing another table for values in the Foreign Key column. It can only have values which are present in the table it is referencing.
In short, you are trying to insert an external value into the table which is not present in the table that it references.
Vinu Vijayan
For better and faster solutions please check...
"How to post data/code on a forum to get the best help" - Jeff Moden
Post #1401319
ananda.murugesan
ananda.murugesan
Posted Monday, December 31, 2012 2:26 AM
SSC Eights!
Group: General Forum Members
Last Login: Today @ 3:01 AM
Points: 820,
Visits: 2,399
Source database - data is available for all tables...
Generate Script source database and create newdatabase with another name and all other structure and PK, FK ,Identity every thing same as existing source database.
During export to new database base through export wizard -
One error was resolved(meta data validation) -> enable Identity insert,
Second error - above one(which is posted first), For the resolve this issues need to disable FK on table?
Post #1401322
vinu512
vinu512
Posted Wednesday, January 02, 2013 1:49 AM
Ten Centuries
Group: General Forum Members
Last Login: Yesterday @ 12:37 AM
Points: 1,047,
Visits: 1,439
ananda.murugesan (12/31/2012)
Source database - data is available for all tables...
Generate Script source database and create newdatabase with another name and all other structure and PK, FK ,Identity every thing same as existing source database.
During export to new database base through export wizard -
One error was resolved(meta data validation) -> enable Identity insert,
Second error - above one(which is posted first), For the resolve this issues need to disable FK on table?
Yes you can Drop the FK constraint an do it. But, since the table had an FK, I am assuming that there was some parent child relationship between the PK Table and the FK Table. Since some foreign data would be inserted into the FK Table which is not present in the PK Table, if you drop the FK Constraint, then you might not be able to recreate the FK Constraint.
Instead of dropping the constraint and inserting the data I would rather find out the items that are causing the error on insertion.
Vinu Vijayan
For better and faster solutions please check...
"How to post data/code on a forum to get the best help" - Jeff Moden
Post #1401689
ananda.murugesan
ananda.murugesan
Posted Wednesday, January 02, 2013 1:56 AM
SSC Eights!
Group: General Forum Members
Last Login: Today @ 3:01 AM
Points: 820,
Visits: 2,399
After exporting data into all tables then we can not recreate FK relationship to the table.
Instead drop and recreate FKs, I did disable all the constraints then export data to all the tables. Afte that enable all constraints and checking everything ok.
Post #1401692
vinu512
vinu512
Posted Wednesday, January 02, 2013 8:54 PM
Ten Centuries
Group: General Forum Members
Last Login: Yesterday @ 12:37 AM
Points: 1,047,
Visits: 1,439
All the tables.....do you mean including the parent table which is being referenced by the Child Table??.....If that is so then the Foreign Key Constraint can be created as the new data in both tables would be in sync.........
Good that you got it working
Vinu Vijayan
For better and faster solutions please check...
"How to post data/code on a forum to get the best help" - Jeff Moden
Post #1402159
ananda.murugesan
ananda.murugesan
Posted Wednesday, January 02, 2013 9:01 PM
SSC Eights!
Group: General Forum Members
Last Login: Today @ 3:01 AM
Points: 820,
Visits: 2,399
Pl. Let me know, In export wizard FK, PK and constraints does not come to destinaton database..Is it correct?
Post #1402160
vinu512
vinu512
Posted Friday, January 04, 2013 9:47 PM
Ten Centuries
Group: General Forum Members
Last Login: Yesterday @ 12:37 AM
Points: 1,047,
Visits: 1,439
Yes it is correct.....if the Destination Table is created by the Import/Export Wizard....
Is it still not working??.....I thought you had got it working.....Please post the detailed Error message.
Vinu Vijayan
For better and faster solutions please check...
"How to post data/code on a forum to get the best help" - Jeff Moden
Post #1403191
« Prev Topic
|
Next Topic »
Permissions
You
cannot
post new topics.
You
cannot
post topic replies.
You
cannot
post new polls.
You
cannot
post replies to polls.
You
cannot
edit your own topics.
You
cannot
delete your own topics.
You
cannot
edit other topics.
You
cannot
delete other topics.
You
cannot
edit your own posts.
You
cannot
edit other posts.
You
cannot
delete your own posts.
You
cannot
delete other posts.
You
cannot
post events.
You
cannot
edit your own events.
You
cannot
edit other events.
You
cannot
delete your own events.
You
cannot
delete other events.
You
cannot
send private messages.
You
cannot
send emails.
You
may
read topics.
You
cannot
rate topics.
You
cannot
vote within polls.
You
cannot
upload attachments.
You
may
download attachments.
You
cannot
post HTML code.
You
cannot
edit HTML code.
You
cannot
post IFCode.
You
cannot
post JavaScript.
You
cannot
post EmotIcons.
You
cannot
post or upload images.
Copyright © 2002-2013 Simple Talk Publishing. All Rights Reserved.
Privacy Policy.
Terms of Use.
Report Abuse.