December 10, 2004 at 2:45 am
Hi All.
Can someone please tell me how to empty the transaction log without doing a backup - restore - shrink or a transaction log backup.
I want to empty it as it is a test DB and I am not interested in restoring if there is a problem with it.
Thanks.
CCB
December 10, 2004 at 3:02 am
To clear the transaction log without backing it up:
Backup log MyDatabase with truncate_only
You may find that the physical file is still large, so you can force it to be shrunk using
dbcc shrinkfile (MyDatabase_Log)
Also, if you set the database recovery mode to simple (in the database properties box, options tab) and tick autoshrink, it should stop the log growing too large.
December 10, 2004 at 3:25 am
Perfect. Thanks.
CCB
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply