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 |
|
somaiyatushar11
Starting Member
1 Post |
Posted - 2004-05-25 : 04:24:44
|
| From batch job when the TEMPDB..TABLE table getting updated , it is running for longer time and the TEMPDB databse is running out of space causing problem to the database. There are around 5,20,000 records in TEMPDB..TABLE.Update statement is as follows:UPDATE tempdb..TABLE SET COLUMN1 = '0', COLUMN2 = '0', COLUMN3 = NULL, COLUMN4 = NULL WHERE COLUMN1 <> '0' OR COLUMN2 <> '0' OR COLUMN3 IS NOT NULL OR COLUMN4 IS NOT NULL |
|
|
Kristen
Test
22859 Posts |
Posted - 2004-05-25 : 05:56:34
|
| Can you use SET ROWCOUNT 10000 [or somesuch low-ish limit], so that the UPDATE only processes 10,000 rows, and then put the code in a LOOP until @@ROWCOUNT=0?(You'll need to put SET ROWCOUNT=0 afterwards so that other statements can process unlimited rows)Kristen |
 |
|
|
|
|
|