Truncate databases:
SQL
-Sort by Size (check C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA)
-Backup transaction log to backup location (C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\Backup\...) & name accordingly
-Verify truncate option is already set (should be by default)
-Right click on database > Tasks > Shrink > Database > check ‘Reorganize files before releasing unused space…’ option > OK
-Verify mdf/ldf files are significantly smaller
NOTE: May have to complete steps multiple times to see a significant difference in size.
-Delete backup files from C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\Backup\
***SQL Maintenance Plan- for truncating dbs*** Found not good to automate this kind of action. Also lots of blogs about truncating ldf & mdf creates data fragmentation.
Comments
0 comments
Please sign in to leave a comment.