I'm using SQL Compare to sync two databases in SQL SERVER 2000. It's working fine, but I'm having a performance issue with one of my tables. The sync script is adding and deleting some columns, and as the order changes, it's trying to rebuild the table. But when it is trying to run the DBCC CHECKIDENT Reseed instruction on the temp table, the script keeps working, I left it running for almost 20 hours but nothing changes. The table has more than 2000000 records, I think that is the problem.
Is there a way to skip that instruction?
The code that is getting issues is this:
- Code: Select all
DECLARE @idVal BIGINT
SELECT @idVal = IDENT_CURRENT(N'[dbo].[TocItems]')
IF @idVal IS NOT NULL
DBCC CHECKIDENT(N'[dbo].[tmp_rg_xx_TocItems]', RESEED, @idVal)