Click here to Skip to main content
Click here to Skip to main content
Alternative Tip

Tagged as

How to Shrink SQL Server database log files?

, 8 Feb 2010
Rate this:
Please Sign up or sign in to vote.
DUMP TRANSACTION FooDB WITH NO_LOGBACKUP LOG FooDB WITH NO_LOGDBCC SHRINKDATABASE(FooDB)EXEC sp_dboption 'FooDB', 'autoshrink', 'TRUE'
DUMP  TRANSACTION  FooDB  WITH  NO_LOG
BACKUP LOG FooDB WITH NO_LOG
DBCC SHRINKDATABASE(FooDB)
EXEC sp_dboption 'FooDB', 'autoshrink', 'TRUE'

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Huisheng Chen
Technical Lead www.xnlab.com
Australia Australia
I was born in the south of China, started to write GWBASIC code since 1993 when I was 13 years old, with professional .net(c#) and vb, founder of www.xnlab.com
 
Now I am living in Sydney, Australia.
Follow on   Twitter   LinkedIn

Comments and Discussions

 
Generaldump functionality has been removed with SQL Server 2008 PinmemberSimon_Whale18-Oct-10 1:13 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Mobile
Web02 | 2.8.140814.1 | Last Updated 8 Feb 2010
Article Copyright 2010 by Huisheng Chen
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid