2

I am now taking log backups daily after a long gap(1.5 years). Now when I run,

DBCC SQLPERF('logspace')

Result,

Database  Log Size (MB)   Log Space Used (%)    Status
master     1.742188     64.09753               0
tempdb     51.17969     33.19341               0
model      0.9921875        48.4252            0
msdb       4.554688     55.6711            0
MyDb       15618.68     0.7029594              0

Should I shrink the log file. If yes then how?

1 Answers1

0

If you're really strapped for disk space, you can of course shrink your database log file.

Switch your recovery model to SIMPLE and then shrink the database file using the DBCC SHRINKFILE('logfilename') command.

If you're running a production system, make sure that you switch your recovery model back to FULL immediately after shrinking the log file, and run a full database backup, in order to get a new point in time recovery point. You can then schedule your log file backups to run every few hours ( depending on your need ).

druzin
  • 2,308
  • 13
  • 15