ksfok
asked on
SQL Server msdb
A SQL Server article says:
"Frequently you'll want to know how fast your database has been growing. Ideally, you'll have historical size information on all the databases that you work on. In the real world, however, this is not necessarily the case.
What we have most often is the backup history. Luckily, we can get a rough outline of the growth of your database, over time, from the msdb..backupset table. This query will give the size of the backup, every time that a backup was done. From this you can get a pretty good idea of how fast your database is growing."
The above statement is followed by the following T-SQL query:
select
BackupDate = convert(varchar(10),backup _start_dat e, 111)
,SizeInGigs=floor( backup_size/1024000000)
from msdb..backupset
where
database_name = 'DatabaseName'
and type = 'd'
order by
backup_start_date desc
Please advise how to interpret the result. Thanks.
"Frequently you'll want to know how fast your database has been growing. Ideally, you'll have historical size information on all the databases that you work on. In the real world, however, this is not necessarily the case.
What we have most often is the backup history. Luckily, we can get a rough outline of the growth of your database, over time, from the msdb..backupset table. This query will give the size of the backup, every time that a backup was done. From this you can get a pretty good idea of how fast your database is growing."
The above statement is followed by the following T-SQL query:
select
BackupDate = convert(varchar(10),backup
,SizeInGigs=floor( backup_size/1024000000)
from msdb..backupset
where
database_name = 'DatabaseName'
and type = 'd'
order by
backup_start_date desc
Please advise how to interpret the result. Thanks.
ASKER
But excuse me. What does the number list exactly mean? How can it be applied?
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
The backup_size/1024000000 converts the size from bytes to gigabytes.
So for eg I ran it on one of our dbs:
2008/06/10 0
2008/06/10 13
2008/06/10 0
2008/06/09 2
2008/06/09 52
2008/06/09 11
2008/06/09 0
2008/06/09 0
2008/06/09 14