Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
magmo
Aged Yak Warrior
558 Posts |
Posted - 2008-09-17 : 04:23:02
|
| HiI have a huge table that contains over a million records, I need to set a primary key on a bigint column, but when i do that in the designer I get a timout error, how should I proceed in order to get this to work? |
|
|
sodeep
Master Smack Fu Yak Hacker
7174 Posts |
Posted - 2008-09-17 : 09:06:06
|
| Yes, it will lock the table because it has to sort million rows. Make sure that column has unique value and do it in Offline hours. |
 |
|
|
magmo
Aged Yak Warrior
558 Posts |
Posted - 2008-09-17 : 10:33:35
|
| It is already a identity field so it is unique values. But I don't think it will work if I do it during offline hours, I have tryed this on a database that isn't used but it still fail. and I have timeout set to 0 so there shouldn't be any timeout at all..... |
 |
|
|
YellowBug
Aged Yak Warrior
616 Posts |
Posted - 2008-09-17 : 10:41:23
|
| Run the CREATE INDEX sql statement, instead of using the GUI.You can use the GUI to get the SQL statement. |
 |
|
|
magmo
Aged Yak Warrior
558 Posts |
Posted - 2008-09-21 : 13:31:17
|
| HiThat worked out just fine, Thanks a lot! |
 |
|
|
|
|
|