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 |
pir8d
Starting Member
10 Posts |
Posted - 2007-07-19 : 02:23:48
|
Good Afternoon All,I am running a query on a fairly large table (4.8 million rows) to add an extra column (identity) to the table.When I do this, it blows up the transaction log. Is there a way I can run this query without logging the transactions as they are not required? I'd like to do this without having to put the whole database in Simple mode if possible.The code goes a little something like this:ALTER TABLE mytableADD rowid int NOT NULL IDENTITY (1, 1) ALTER TABLE mytableADD CONSTRAINT PK_mytablePRIMARY KEY NONCLUSTERED (rowid) |
|
rmiao
Master Smack Fu Yak Hacker
7266 Posts |
Posted - 2007-07-19 : 11:12:03
|
No you can't, try set the db to bulk-logged recovery mode. |
 |
|
indy2005
Starting Member
12 Posts |
Posted - 2007-07-19 : 16:29:42
|
I didnt event know DDL statements could be involved in a transaction... |
 |
|
|
|
|