AspdotnetCodes.com
US and UK Data Centers – DiscountASP.NET
 
Articles Subscribe for our Articles Updates
Books
Resources
Downloads
Free Tech Magazines
Archives
Softwares
Newsletter
Suggest Us
Link to Us
 Syntax for Shrinking SQL Server database mdf and log file
Posted by Moderator1 on  12/26/2007 8:26:24 AM 630 Views
 
Try the following code through your Query Analyser to shrink the database.

backup log <database_name> with truncate_only
use <database_name>
dbcc SHRINKFILE (<database_name_Log>,2)
dbcc ShrinkDatabase (<database_name>, 2)


Post New Tips/Tricks View all Tips/Tricks

Sponsored by