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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

truncate transaction log programatically

Status
Not open for further replies.

dky1e

Programmer
May 4, 2002
293
US
I am performing a large insert followed by a large delete. I want to truncate the transaction log right after.

How to backup transaction log programatically (I believe this will truncate)?

Are dbcc shrinkfile and dbcc shrinkdatabase my only options?

I don't want to use shrink file, becuse the location of the file might (and will) change.

Shrink db is too much.
 
Err...

I found what I was looking for right after I posted.

BACKUP LOG database_name WITH TRUNCATE_ONLY
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top