Resetting the identity increments

  • Guys,

    I am trying to setup merge replication between two 600 table database, is there a generic script to reset the identity increment on one database to have even numbers and another to have odd number.

    Any suggestions/inputs would help

    Thanks

  • I have not seen a generic script, but you could use DBCC CHECKIDENT and Creating and Modifying Identifier Columns to achieve this.



    Ole Kristian Velstadbråten Bangås - Virinco - Facebook - Twitter

    Concatenating Row Values in Transact-SQL[/url]

  • This was removed by the editor as SPAM

  • am-244616 (10/11/2011)


    Guys,

    I am trying to setup merge replication between two 600 table database, is there a generic script to reset the identity increment on one database to have even numbers and another to have odd number.

    Any suggestions/inputs would help

    Thanks

    You need to create another column with identity and swap values before dropping that column. Thanks the only solution.

    ______________________________________________________________________

    Ankit
    MCITP Database developer SQL 2008,MCTS Database Administration SQL 2008
    "Remembering that you are going to die is the best way I know to avoid the trap of thinking you have something to lose.
    You are already naked. There is no reason not to follow your heart.”

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply