I have some SQL servers that are used only by developers, and the developers (i.e. me) are expected to maintain them. We really don't care much about losing data, so backups are not a priority, but the transaction logs do have a tendency to fill up, slowing everyone down until I can remember how to truncate them.

Does anyone have a sample scheduled task that deals with this situation? Second best: advice on how I should write my own?


Set the database to simple recovery. This way the transaction log is only used during active transactions. Once transaction is committed, the active portion of the log is release and can be reused, thus minimizing log growth. Long running transactions with lot of DML will still cause the log to grow.

  • And after doing above don't forget to at least take full backup of the database once in a day. You may also take differential backup if you need. – Shanky Nov 7 '17 at 7:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.