error message while migrating from access to sql (access 2010 upsize tool) (1 Viewer)

DevAccess

Registered User.
Local time
Today, 13:35
Joined
Jun 27, 2016
Messages
321
Hello I am getting below error while I am using access 2010 upsizing functionality for migrating ms access 2010 tables to sql server database.
1st error:
Relationship or Constraint Failed to Upsize: Server Error 8136: [ODBC Driver 11 for SQL Server][SQL Server]Duplicate columns specified in FOREIGN KEY constraint key list, table 'tblHoldInvPrinter'. Server Error 8139: [ODBC Driver 11 for SQL Server][SQL Server]Number of referencing columns in foreign key differs from number of referenced columns, table 'tblHoldInvPrinter'.

2nd error:
Relationship or Constraint Failed to Upsize: Server Error 1776: [ODBC Driver 11 for SQL Server][SQL Server]There are no primary or candidate keys in the referenced table 'tblOrderDetailsInfo' that match the referencing column list in the foreign key 'tblHoldInvVendBH_FK00'. Server Error 1750: [ODBC Driver 11 for SQL Server][SQL Server]Could not create constraint or index. See previous errors.



Could anybody help on this ? this happens for several tables.
 

jleach

Registered User.
Local time
Today, 16:35
Joined
Jan 4, 2012
Messages
308
It may be easier to ignore all of the relationships that are currently set up in Access, and re-apply them manually after the migration is complete.

Aside from the issue you're seeing here, SQL Server is more strict about circular relationships than Access is, so in many cases a "matured" Access database will have to have a number of FK constraints dropped to be valid for MSSQL anyway.
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 16:35
Joined
Feb 19, 2002
Messages
43,266
Read the error messages and try to understand what they are telling you. It is hard for us without the actual database. If you're recall, I told you in a different thread to clean up ALL your indexes. If you made the mistake of leaving the autoindexing "feature" turned on, Access would create unnecessary, and duplicate indexes.

Once you delete the duplicate indexes, compact the data base and try the conversion again. Remember, Access doesn't actually delete stuff until you compact. It simply flags things for delete. The compact doesn't copy flagged items to the fresh copy of the database.

The other message is pretty clear to me.
 

Users who are viewing this thread

Top Bottom