View Single Post
Old 05-25-2004, 08:25 AM   #1 (permalink)
Stompy
Banned from being Banned
 
Location: Donkey
[SQL Server 2000] Auto shrinking transaction logs?

For some odd reason, SQL Server 2000 doesn't have a "Truncate Log on Checkpoint" option that 7 had... so now all the transaction logs on our new servers are just getting way outta control.

There's a command you can use to shrink it:

Code:
use db
BACKUP LOG db WITH TRUNCATE_ONLY
DBCC SHRINKFILE ('db_Log', 2)
But that's tedious to run it on every individual database.. there's gotta be a way to have SQL do this for you. I can't seem to figure out what it is.

Anyone have any ideas?
__________________
I love lamp.
Stompy is offline  
 

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73