0

We have a vcenter database on an AG setup. The log file keeps growing sometime due to metrics which are enabled on the application end. They will be moving this soon to another db vendor to probably mitigate the situation, but when I try to run tlog backup by myself it is taking hours to finish(this is not the case when I setup a scheduled tlog backup via sql agent) Also, when I try to shrink the log file after the backup, it is not getting shrunk. Is there another way to shrink the logs? Please let me know

buddinggeek
  • 625
  • 4
  • 21
  • Can you compare the size of the backup file when taken manually with the size of the ones taken by the scheduled job? And: before deciding to shrink the transaction log file, you need to determine for certain if its growth is truly atypical. Shrinking the file only to have it grow back to the same size or larger is at best useless, and at worst hazardous (processes fail because the log can't grow back to the former size; takes time to grow file, impacting performance; etc.). If it needs to be the current size regularly, just leave it at that size. – RDFozz Mar 08 '17 at 20:17
  • Also: how are you trying to shrink the log? Shrinking the log can fail for multiple reasons: other file-level jobs running (shrinks, grows, backups); trying to shrink the file smaller than the current minimum; errors in SQL commands. In addition, the log may not shrink, or may shrink less than you expect, because of its internal structure. The log file is subdivided into multiple virtual log files (VLFs); if the log file is 2 GB, and you try to shrink it to 1.9 GB, and the last VLF in the file is 1.5 GB, then it can't shrink. – RDFozz Mar 08 '17 at 20:21
  • Is the database in SIMPLE recovery model? – Hannah Vernon Mar 08 '17 at 21:52
  • I am taking a log backup first before trying to shrink the log. To shrink the log, I am selecting the shrink option-> files-> free unused space->shrink from ssms on the particular database. The database is in full recovery model – buddinggeek Mar 09 '17 at 01:23

0 Answers0