Hello,
I recently noticed that the ALTER TABLE ALTER COLUMN SYNC IDENTITY command is no longer functioning as expected.
I have an IDENTITY column on my table:
D_Category_SID BIGINT GENERATED BY DEFAULT AS IDENTITY (START WITH 1 INCREMENT BY 1)
Previously, to reset the IDENTITY counter, I used the following steps:
TRUNCATE TABLE dw_cbi_dev.dbo.D_Category
INSERT INTO dw_cbi_dev.dbo.D_Category (D_Category_SID) SELECT 1 AS D_Category_SID
ALTER TABLE dw_cbi_dev.dbo.D_Category ALTER COLUMN D_Category_SID SYNC IDENTITY
TRUNCATE TABLE dw_cbi_dev.dbo.D_Category
This process used to reset the counter, so the next value started from 2. However, now the identity column continues from the last used value instead of resetting.
Can you clarify what has changed and suggest a solution? I’d prefer not to recreate the table, as that would result in losing existing permissions.