Red Gate forums :: View topic - Could not be compared
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
SQL Data Compare 10
SQL Data Compare 10 forum

Could not be compared

Search in SQL Data Compare 10 forum
Post new topic   Reply to topic
Jump to:  
Author Message
staggerlee011



Joined: 17 Jan 2012
Posts: 9

PostPosted: Fri Feb 14, 2014 4:31 pm    Post subject: Could not be compared Reply with quote

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
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]

GO

ALTER TABLE [dbo].[NotificationItems] ADD DEFAULT ((0)) FOR [Ignored]
GO
Back to top
View user's profile Send private message
Manfred.Castro



Joined: 23 Apr 2012
Posts: 209

PostPosted: Fri Feb 14, 2014 5:53 pm    Post subject: Reply with quote

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.
http://documentation.red-gate.com/display/SDC10/Tables+or+views+that+could+not+be+compared#

You may need to set a custom comparison key or manually map the object.
http://documentation.red-gate.com/display/SDC10/Tables+or+views+that+could+not+be+compared#Tablesorviewsthatcouldnotbecompared-Settingcomparisonkeys
http://documentation.red-gate.com/display/SDC10/Mapping+objects#
_________________
Manfred Castro
Product Support
Red Gate Software
Back to top
View user's profile Send private message
staggerlee011



Joined: 17 Jan 2012
Posts: 9

PostPosted: Mon Feb 17, 2014 12:31 pm    Post subject: Reply with quote

thanks that resolved the problem!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group