Results 1 to 2 of 2
  1. #1
    Join Date
    May 2002
    Posts
    2

    Unanswered: SQL7 an d DTS reset identity

    I am running a DTS every day to refresh a database to be available on the web from a mainframe file. It has quite a large number of records, and I want to reset the identity to 1 everytime I reload it. Can anyone tell me what instruction I need to put in the DTS function that does the transformations to re-initialize the identity column to 1 each time. Thanks

  2. #2
    Join Date
    May 2002
    Posts
    25
    look into DBCC RESEED. I think its available for sql 7 (for sure for sql2k)


    USE yourDB
    GO
    DBCC CHECKIDENT (tableName, RESEED, 1)
    GO


    thats after you delete/truncate

Posting Permissions

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