all groups > sql server programming > february 2005 >
You're in the

sql server programming

group:

How to Truncate The Transaction Log ?


RE: How to Truncate The Transaction Log ? Ana Mihalj
2/12/2005 4:03:01 AM
sql server programming:
Hi Imran,
you can use (this will not reduce the size of the physical log file) ,
backup Log database_name with truncate_only
or
backup Log database_name with no_log

After you had truncated the log file you can shrink the file by
DBCC SHRINKFILE. Look in BOL

Ana

[quoted text, click to view]
Re: How to Truncate The Transaction Log ? Dan Guzman
2/12/2005 9:03:13 AM
To add to Ana's response, you can should set the database recovery model to
SIMPLE if you don't perform periodic log backups as part of your recovery
plan. This will automatically remove committed transactions from the log:

ALTER DATABASE MyTestDatabase
SET RECOVERY SIMPLE

--
Hope this helps.

Dan Guzman
SQL Server MVP

[quoted text, click to view]

How to Truncate The Transaction Log ? IMRAN SAROIA
2/12/2005 4:58:53 PM
Hi !

I want to truncate one of the transaction logs of my test database.
Please advise !

Re: How to Truncate The Transaction Log ? Itzik Ben-Gan
2/12/2005 8:47:38 PM
Imran, here's a KB article with info on shrinking the log:

http://support.microsoft.com/default.aspx?scid=kb;en-us;272318

--
BG, SQL Server MVP
www.SolidQualityLearning.com


[quoted text, click to view]

AddThis Social Bookmark Button