Loading

«

»

May
13

Shrink SQL Server Data and Log files

The below syntax will allow you to shrink a SQL Server Database Data File and Transaction Log File


-- Truncate the log
BACKUP LOG biztalkdtadb WITH TRUNCATE_ONLY
-- Shrink Log File
dbcc shrinkdatabase (BizTalkDTADb, 10)
- Shrink Data File
dbcc shrinkdatabase (BizTalkDTADb_log, 10)

Permanent link to this article: http://www.tsls.co.uk/index.php/2009/05/13/shrink-sql-server-data-and-log-files/

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>