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.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Adding Identity Field to a Large Table

Author  Topic 

ucal
Yak Posting Veteran

72 Posts

Posted - 2008-12-10 : 21:08:37
I have a table with about 10 millon records and will like to add an indentity field to this table using systax below;

Syntax:

Alter Table TableX ADD ID INT IDENTITY (1,1)

My question is :

What is the best way to do it without maxing out my log files.

Thanks.

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-12-10 : 21:40:39
whats the recovery model used?
Go to Top of Page

ucal
Yak Posting Veteran

72 Posts

Posted - 2008-12-11 : 20:53:08
The recovry model if FULL
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-12-11 : 23:24:38
then make it simple if you want to minimise logging
Go to Top of Page

ucal
Yak Posting Veteran

72 Posts

Posted - 2008-12-12 : 20:11:10
Thanks ! visakh16
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-12-13 : 00:30:00
welcome
Go to Top of Page
   

- Advertisement -