November 28, 2005 at 1:26 pm
I copied a database and for some reason, they some primary keys were not reproduced. What is the best way to rebuild primary keys on a table or entire database?
November 29, 2005 at 6:14 am
You should take Database backup - Complete
to resolve your problem.
November 29, 2005 at 5:06 pm
How did you "copy" it? Using DTS, database backup, detach/attach?
November 30, 2005 at 5:55 am
I detached the database created copied of the database files and them re-attached.
November 30, 2005 at 7:21 am
Hmm... Maybe better check your original db..? I can't see how any objects can disappear when doing a detach-attach. Make sure that the PKs you miss really is there in the original database.
/Kenneth
November 30, 2005 at 9:31 am
I did check and verified that some of the primary keys were lost, or I think I had problems re-attaching at that time. So, to restore the original primary keys on a select group of tables, what would be the best approach?
December 1, 2005 at 3:46 am
I think you should recopy the database - if you have somhow mysteriously lost primary keys, you have probably lost other things as well and are lucky it is not marked as suspect in SQL.
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply