SQL Compare field mapping incorrect
pmoore
Posts: 10
I have found that SQL compare is mismatching fields.
I've recreated tables with the same names and field names. The target (data warehouse has a few extra fields).
In the comparison window SQL compare is mapping fields with completely different names and data types. See screenshot.
I have tried with auto mapping both on and off.
it is also skipping fields with identical names and definitions and treating them as a drop/add.
Source: [RT_LEDG_DISC_COMMENT] [varchar] (max) COLLATE Latin1_General_CI_AS NULL CONSTRAINT [DF_RT_LEDG_DISC_COMMENT] DEFAULT (''),
Target: [RT_LEDG_DISC_COMMENT] [varchar] (max) COLLATE Latin1_General_CI_AS NULL CONSTRAINT [DF_RT_LEDG_DISC_COMMENT] DEFAULT (''),
I'm running version: 12.1.0.3760
I've recreated tables with the same names and field names. The target (data warehouse has a few extra fields).
In the comparison window SQL compare is mapping fields with completely different names and data types. See screenshot.
I have tried with auto mapping both on and off.
it is also skipping fields with identical names and definitions and treating them as a drop/add.
Source: [RT_LEDG_DISC_COMMENT] [varchar] (max) COLLATE Latin1_General_CI_AS NULL CONSTRAINT [DF_RT_LEDG_DISC_COMMENT] DEFAULT (''),
Target: [RT_LEDG_DISC_COMMENT] [varchar] (max) COLLATE Latin1_General_CI_AS NULL CONSTRAINT [DF_RT_LEDG_DISC_COMMENT] DEFAULT (''),
I'm running version: 12.1.0.3760
Comments
First of all, can I confirm that you are using SQL Compare, as indicated by your post and screenshot? (Just checking since this is the Data Compare forum).
It sounds like there's some existing mappings information in your project file; the auto-mappings setting won't be applied if mapping operations have been performed manually, which would explain your observation that it has no effect.
In the middle of the table mapping tab, there should be a link called "Partial" which will open a column mapping dialog. This should allow you to map/unmap individual columns as needed.
The column mapping dialog also has a "restore defaults" button; it would be useful for us to know whether the defaults are sensible in your case, or whether the behaviour you have described persists.
Redgate Software
Please move to appropriate forum.
Did my suggestions help? Do the column mappings have sensible defaults?
Redgate Software
I have also clicked the partial button and clicked restore defaults on that window.
If I select the same table as before and click partial and get a better looking view. as in fields with the same name line up, and fields with different names don't.
However when I click compare, it still mismatches fields.
I have also stopped and restarted SQL Compare, and also my PC.
Automap was showing as being turned back on. I had a look at the table field mappings were it displayed the automap feature and it has the mappings wrong.
I looked at the same table as earlier in this post (which does not display an automap icon) and it had the same incorrect field mapping as show in my screen shots.
So it seems to get it wrong whether automap is turned on or off, and whether it displays it has used automapping for a table or not.
This has taken me several hours..
The tables are empty. So the db's are only a few KB in size.
If it would be of use to you I could send you the db backups and the project file on Monday. (I'm about to leave for the weekend).
Redgate Software