Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

BACKUP LOG WITH TRUNCATE_ONLY - question

Status
Not open for further replies.

katbear

Programmer
Mar 14, 2007
270
US
BACKUP LOG myDB
WITH TRUNCATE_ONLY
GO

Regarding the above statement, I can't seem to find any real documentation on what this does.

Does this just remove *inactive* transactions from the log file?

(I know that it's not backing up the log file - that's ok)

(I also know that I need to use shrinkfile to release the space back to the os)

Thanks!
 
From the BOL, using the Index tab and entering BACKUP LOG, then selecting the entry for "Location: Transact-SQL":

BOL said:
NO_LOG | TRUNCATE_ONLY

Removes the inactive part of the log without making a backup copy of it and truncates the log. This option frees space. Specifying a backup device is unnecessary because the log backup is not saved. NO_LOG and TRUNCATE_ONLY are synonyms.

After backing up the log using either NO_LOG or TRUNCATE_ONLY, the changes recorded in the log are not recoverable. For recovery purposes, immediately execute BACKUP DATABASE.

For more details, choose the entry "Truncating the Transaction Log" under the BACKUP LOG entry.

-SQLBill


The following is part of my signature block and is only intended to be informational.
Posting advice: FAQ481-4875
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top