Could not be compared

Compares and synchronizes SQL database content.

Could not be compared

Postby staggerlee011 » Fri Feb 14, 2014 4:31 pm

Hi all,

I had a table that was corrupt, and a backup with a non-corrupt version. I thought i would be able to use Data Compare to fix the issue doing a compare data and then re-syncing. but when i do a compare pre and post DBCC CHECKDB REPAIR_ALLOW_DATA_LOSS, the results are

"Tables or views could not be compared."

The table that im interested in has a create statement off:

CREATE TABLE [dbo].[NotificationItems](
[NotificationID] [uniqueidentifier] NOT NULL,
[Title] [nvarchar](4000) NOT NULL,
[Description] [nvarchar](max) NULL,
[CreatedAt] [datetime] NOT NULL,
[Ignored] [bit] NOT NULL,
[NotificationTypeID] [uniqueidentifier] NOT NULL,
[Url] [varchar](511) NULL,
[AcknowledgedAt] [datetime] NULL,
[AcknowledgedBy] [nvarchar](100) NULL


ALTER TABLE [dbo].[NotificationItems] ADD DEFAULT ((0)) FOR [Ignored]
Posts: 9
Joined: Tue Jan 17, 2012 5:59 pm

Postby Manfred.Castro » Fri Feb 14, 2014 5:53 pm

Objects with rows that can not be matched automatically are shown in the Tables or views that could not be compared group. To match rows in the two data sources, SQL Data Compare requires:
•a comparison key for each table or view
•mappings between objects in the data sources

In some cases, SQL Data Compare is unable to map objects and select comparison keys automatically. ... +compared#

You may need to set a custom comparison key or manually map the object. ... arisonkeys ... g+objects#
Manfred Castro
Product Support
Red Gate Software
Posts: 209
Joined: Mon Apr 23, 2012 2:49 pm

Postby staggerlee011 » Mon Feb 17, 2014 12:31 pm

thanks that resolved the problem!
Posts: 9
Joined: Tue Jan 17, 2012 5:59 pm

Return to SQL Data Compare Previous Versions

Who is online

Users browsing this forum: No registered users and 0 guests