Developping for the translation industry RSS 2.0

 Thursday, October 16, 2008

As a DBA, you may want to know the evolution, in time, of your databases size. To do so, you just need to execute the following script, after having changed ‘databaseName’ with your database’s name.  This script won’t look for the actual database size but for the backup size, which is a very good indicator. It’s good to note that only full backups are logged in this table, so, if you have a full backup every night and 4 differential scattered through the day, only the full backup will be logged.

        Select backup_start_date, SizeInMegs=floor(backup_size/1024000)
        from msdb..backupset
        where database_name = 'DatabaseName' and type = 'd'

        order by backup_start_date asc


Other interesting SQL posts :

SQL Server indexing best practices and guidelines

How to insert a file in an image column in SQL Server 2005

How to remove leading zeros within an SQL query

Other popular posts

How To: Create an Outlook 2003 addin using VSTO SE and Visual Studio 2005

Thursday, October 16, 2008 9:00:37 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0] -
Code Snippet | SQL
Comments are closed.

About the author/Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

© Copyright 2019
Stanislas Biron
Sign In
Total Posts: 135
This Year: 0
This Month: 0
This Week: 0
Comments: 1
All Content © 2019, Stanislas Biron