Click here to monitor SSC
SQLServerCentral is supported by Redgate
Log in  ::  Register  ::  Not logged in

Get your favorite SSC scripts directly in SSMS with the free SQL Scripts addin. Search for scripts directly from SSMS, and instantly access any saved scripts in your SSC briefcase from the favorites tab.
Download now (direct download link)

Avoid Transaction Logs volume from filling

By Daniel Marques,

When you have the recovey model's of your databases in Full you always have to make backups of your transaction logs in order to truncate them and release space inside the logs.

When you have a lot of databases with many transactions and a not so big volume for logs it's common to have a full drive. So you have to make that annoying log backup and shrink to release some space in the drive and have your databases back on track.

Since i have this problem in a regular basis, i decided to make a simple script to minimize this problem.

How to use:

- Create the folder defined on the script

- Set the limit of free space you want on the script in MB

- Just run or put the script on a job

Important note:

To have a successfull backup of your ts log you first need a full backup of your database. The script doesnt make a full backup of the db, assuming that you have a job for that.

Use and abuse, report bugs, make some tweaks...Enjoy!

Total article views: 3418 | Views in the last 30 days: 3
Related Articles

Powershell Database Backup Script

Learn how to write a script for regular database backups using Powershell and SMO.


Daily Database Backup Scripts

Execute these stored procedures to backup all your database daily and your transaction logs several ...


xmla script for automate ssas database backup

xmla script for automate ssas database backup


Script to Check the Database Backup duration

Script to Check the Database Backup duration of entire instances


Backup & Restoration Script

This script provides very useful information about database backup and restoration.

full drive    
transaction log