How can we help you today? How can we help you today?
redeye
To reproduce the problem, please do the following: 1) Create a table on the source database: CREATE TABLE [dbo].[SeedError]( [ID] [int] IDENTITY(1,1) NOT NULL, [Data] [nvarchar](50) NOT NULL, CONSTRAINT [PK_SeedError] PRIMARY KEY CLUSTERED ( [ID] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] ) ON [PRIMARY] 2) Use SQL compare and have the same table created on the destination databse 3) On the source database, execute the following: INSERT INTO [SeedError] ( [Data] ) VALUES ( 'Row 1' ) INSERT INTO [SeedError] ( [Data] ) VALUES ( 'Row 2' ) 4) Use SQL Data Compare to synch up the contents of this table 5) On the DESTINATION database, execute the following: INSERT INTO [SeedError] ( [Data] ) VALUES ( 'Row 3' ) INSERT INTO [SeedError] ( [Data] ) VALUES ( 'Row 4' ) 6) In SQL Data Compare, switch direction of the synchronisation, and run the wizard for this table. Look at the SQl that is generated. You will see: -- Reseed identity on [dbo].[SeedError] DBCC CHECKIDENT('[dbo].[SeedError]', RESEED, 0) GO That is incorrect. If you run the synchronisation and then try and insert a row on the source database, you will get a primary key vioaltion error. Regards Paul / comments
To reproduce the problem, please do the following: 1) Create a table on the source database: CREATE TABLE [dbo].[SeedError]( [ID] [int] IDENTITY(1,1) NOT NULL, [Data] [nvarchar](50) NOT NULL, CONST...
0 votes