Find the database file growth for all the databases in SQL Server

Introduction

Find the database file growth for all the databases. It is not a good practice to keep your database file growth limited. In that case, you may get an error like “The Transaction log for database XXXXX is full.

Script

Result

SQL Database File Growth

Also, you clear the transaction log by taking backup which will allow you to perform further transactions. Run the below script to see if there is any log backup pending. If you find “LOG_BACKUP” in log_reuse_wait_desc column then you can take backup else you will need to set the file auto-growth unlimited and extend the storage if you have less storage.

Script

Result

log_reuse-wait_desc

Facebook Comments Box
Please like or share this post if you found it helpful, thank you.
Share on Facebook
Facebook
0Tweet about this on Twitter
Twitter
Share on LinkedIn
Linkedin
Email this to someone
email
Print this page
Print

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *