Add Primary Key (Clustered Index) while database is online MSSQL

Hi Experts!

I would like to ask if is it possible to add primary key to a database that is online and used by production? I haven't tried yet, I'm scared having the database crash.

By the way, I'm using SQL Server 2005 Standard Edition.

Cheers!
MediaBancAsked:
Who is Participating?
 
vivekkumarSharmaConnect With a Mentor Commented:
It completely depend on the volume of data into your table you want to add primary Key.

Try to do this during off peak hours.
It will not affect too much, Just a slowdown may be noticed.

Go Ahead, Don't worry. DB will not crash.
0
 
Racim BOUDJAKDJIConnect With a Mentor Database Architect - Dba - Data ScientistCommented:
I haven't tried yet, I'm scared having the database crash.
Don't worry it won't.  You will simply have a slowdown during the index creation.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.