1

I am using the SQL script on Select SQL Server database size in order to monitor how much my database file usage increased. I am particularly inspecting the "data_used_size" and "log_used_size" fields. But I notice that while the data file usage consistently increases after a set of activities, log file usage sometimes increases and sometimes decreases, thus always staying at a certain level. Why is this?

jarlh
  • 42,561
  • 8
  • 45
  • 63
John L.
  • 1,825
  • 5
  • 18
  • 45

1 Answers1

4

This is documented in MSDN article about Transaction Log

  1. If the DB is using simple recovery model, after a checkpoint
  2. If full recovery model or bulk-logged recovery model is used, then after a log backup.
Martheen
  • 5,198
  • 4
  • 32
  • 55
  • But I am using the full recovery model and not doing any backups in the meanwhile. – John L. Feb 12 '18 at 02:12
  • Is there a size restriction set in DB properties? Maybe there's a scheduled job to auto backup/ – Martheen Feb 12 '18 at 02:20
  • Sorry, I was mistaken when I said it is in full recovery mode. I checked it again and it is in simple recovery mode. I will accept your answer. – John L. Feb 12 '18 at 02:37