How to minimize size of SqlServer database files

Sometimes my development databases use to much space that is not required. Most of my dev sqlserver databaeses are not used – kep for future reference only. Thre is way to keep their size to minimum:

backup log MyDbName with truncate_only
dbcc shrinkfile(MyDbName_log,2)

Second sql statement uses database transaction log filename, it may have different name. You can check it’s name on database properties dialog -> Files.

Reference

Leave a Reply

Back to Top