Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Export wizard failed? Expand / Collapse
Author
Message
Posted Monday, December 31, 2012 2:02 AM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Today @ 3:48 AM
Points: 1,058, Visits: 2,993
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
Posted Monday, December 31, 2012 2:16 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: 2 days ago @ 11:52 PM
Points: 1,126, Visits: 1,590
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
Posted Monday, December 31, 2012 2:26 AM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Today @ 3:48 AM
Points: 1,058, Visits: 2,993

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
Posted Wednesday, January 2, 2013 1:49 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: 2 days ago @ 11:52 PM
Points: 1,126, Visits: 1,590
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
Posted Wednesday, January 2, 2013 1:56 AM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Today @ 3:48 AM
Points: 1,058, Visits: 2,993
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
Posted Wednesday, January 2, 2013 8:54 PM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: 2 days ago @ 11:52 PM
Points: 1,126, Visits: 1,590
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
Posted Wednesday, January 2, 2013 9:01 PM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Today @ 3:48 AM
Points: 1,058, Visits: 2,993

Pl. Let me know, In export wizard FK, PK and constraints does not come to destinaton database..Is it correct?
Post #1402160
Posted Friday, January 4, 2013 9:47 PM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: 2 days ago @ 11:52 PM
Points: 1,126, Visits: 1,590
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 »

Add to briefcase

Permissions Expand / Collapse