Copy Indexes

  • Does anybody have an easy way to copy the indexes from a development server to a production server? We've spent a lot of time tuning and optimizing indexes on the development server and are ready to move them to production. I need a way to easily accomplish this without losing any data in the tables.

  • Generate scripts for those indexes from development server and run them in your production server.

  • That was what I tried, but in order to get the primary key clusted index, I had to drop the table and I lost all my data. I was trying to avoid that.

  • Run sp_helpconstraint to find out primary key constraint name and alter table to drop the constraint. You don't have to drop and recreate the table.

  • Why not do an object copy with DTS?

    Copy the object into a new table (with the indexes) then move all the data from your old table into the new one with the fresh indexes from development...

    Edited by - hanslindgren on 03/03/2003 05:59:45 AM

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

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