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

Spread the love

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


Spread the love
Soyeluddin Biswas, SQL Server DBA. Mostly involved in Data center migration. He has rich experience in SQL server design and database migration.

Leave a Reply

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