Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2004
    Location
    PAKISTAN
    Posts
    106

    Angry Unanswered: Problem in IDENTITY COLUMNS

    Hi folks! I've a merge replication setup b/w two servers.
    Published tables have columns (INT IDENTITY SEED 1 INCREMENT[NOT FOR REPLICATION]).
    Whenever i apply the SNAPSHOT, i have to run DBCC CHECKIDENT('table' RESEED) for each table at the subscriber twice, for the values in the columns are almost always greater than the ID-Seed value. For example the last Identity value in the column is 999 but whenever i insert a new row; i get error; couldn't insert duplicate value into the table. When i run the dbcc check i see the following message:
    "Checking identity information: current identity value '1', current column value '999'."
    How do i square this away?

  2. #2
    Join Date
    Apr 2004
    Location
    Kansas City, MO
    Posts
    734

    Re: Problem in IDENTITY COLUMNS

    Originally posted by TALAT
    Hi folks! I've a merge replication setup b/w two servers.
    Published tables have columns (INT IDENTITY SEED 1 INCREMENT[NOT FOR REPLICATION]).
    Whenever i apply the SNAPSHOT, i have to run DBCC CHECKIDENT('table' RESEED) for each table at the subscriber twice, for the values in the columns are almost always greater than the ID-Seed value. For example the last Identity value in the column is 999 but whenever i insert a new row; i get error; couldn't insert duplicate value into the table. When i run the dbcc check i see the following message:
    "Checking identity information: current identity value '1', current column value '999'."
    How do i square this away?
    You will have to find the max value and do something like this.

    DBCC CHECKIDENT('table',RESEED,@max_value)
    MeanOldDBA
    derrickleggett@hotmail.com
    When life gives you a lemon, fire the DBA.

  3. #3
    Join Date
    Feb 2004
    Location
    PAKISTAN
    Posts
    106
    Howdy!
    Running: DBCC CHECKIDENT('table', RESEED). when i run it second time for the table; the identity value gets normal, i.e. it gets the same as the last value in the column. But it's rather painful to run it for each table. I never had this problem at the publisher it's only at the subscriber. Is there a permanent solution?

    Thanx for the reply.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •