Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Export wizard failed?


Export wizard failed?

Author
Message
SQL Galaxy
SQL Galaxy
Ten Centuries
Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)

Group: General Forum Members
Points: 1220 Visits: 3465
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
vinu512
vinu512
Ten Centuries
Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)

Group: General Forum Members
Points: 1155 Visits: 1618
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 ;-)
SQL Galaxy
SQL Galaxy
Ten Centuries
Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)

Group: General Forum Members
Points: 1220 Visits: 3465
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?
vinu512
vinu512
Ten Centuries
Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)

Group: General Forum Members
Points: 1155 Visits: 1618
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 ;-)
SQL Galaxy
SQL Galaxy
Ten Centuries
Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)

Group: General Forum Members
Points: 1220 Visits: 3465
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.
vinu512
vinu512
Ten Centuries
Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)

Group: General Forum Members
Points: 1155 Visits: 1618
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 ;-)
SQL Galaxy
SQL Galaxy
Ten Centuries
Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)

Group: General Forum Members
Points: 1220 Visits: 3465
Pl. Let me know, In export wizard FK, PK and constraints does not come to destinaton database..Is it correct?
vinu512
vinu512
Ten Centuries
Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)

Group: General Forum Members
Points: 1155 Visits: 1618
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 ;-)
oshobukola
oshobukola
Forum Newbie
Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)

Group: General Forum Members
Points: 2 Visits: 215
you may decide to check this link that allows you to disable the constraints on loading and also enable them after loading
EXEC sp_MSforeachtable @command1="ALTER TABLE ? NOCHECK CONSTRAINT ALL"


This will disable all constraints on all tables. Once the data has been loaded constraints can be re-enabled with the following :
EXEC sp_MSforeachtable @command1="ALTER TABLE ? WITH CHECK CHECK CONSTRAINT ALL"


The ‘WITH CHECK’ option specifies that the data is validated against the constraint.


Find more here . . .
http://www.sqlmatters.com/Articles/Common%20Issues%20with%20the%20SQL%20Server%20Import%20and%20Export%20Wizard.aspx
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search