Click here to Skip to main content
12,070,351 members (75,848 online)
Click here to Skip to main content
Add your own
alternative version

Tagged as

Stats

4.1K views
5 bookmarked
Posted

How to Shrink SQL Server database log files?

, 8 Feb 2010 CPOL
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
Product Manager 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.

You may also be interested in...

Comments and Discussions

 
Generaldump functionality has been removed with SQL Server 2008 Pin
Simon_Whale18-Oct-10 2:13
memberSimon_Whale18-Oct-10 2:13 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    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 | Terms of Use | Mobile
Web04 | 2.8.160208.1 | Last Updated 8 Feb 2010
Article Copyright 2010 by Huisheng Chen
Everything else Copyright © CodeProject, 1999-2016
Layout: fixed | fluid