Could not be compared
staggerlee011
Posts: 19 Bronze 1
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,
[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
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,
[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
Comments
•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/displ ... +compared#
You may need to set a custom comparison key or manually map the object.
http://documentation.red-gate.com/displ ... arisonkeys
http://documentation.red-gate.com/displ ... g+objects#
Product Support
Red Gate Software