Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
frank.svs
Constraint Violating Yak Guru
368 Posts |
Posted - 2010-07-14 : 02:18:11
|
Hi,For determining the growth of a database, which method is the good one.1. select 'dbname' as "dbname",SUM(size*8)/1024 "Sizein MB",getdate() as "Date" from dbnamedbo.sysfiles 2. We have daily full backup scheduled, so i would go for SELECT a.database_name,a.type, CASE a.type WHEN 'D' THEN 'FULL BACKUP' WHEN 'I' THEN 'Differential Backup' WHEN 'L' THEN 'Transaction Log bkp' WHEN 'F' THEN 'File or Filegroup bkp' WHEN 'G' then 'Differential File bkp' WHEN 'P' THEN 'Partial bkp' WHEN 'Q' THEN 'Differential partial' END as backupType,a.backup_size/1024/1024 AS backupSizeMB,a.backup_finish_date as last_backupFROM msdb.dbo.backupset ainner join msdb.dbo.backupmediafamily mON a.media_set_id = m.media_set_idWHERE a.database_name = 'dbname' and a.type = 'D'order by a.backup_finish_date I personally beleive going for secondnd method is reasonable. I can clearly observe the change in MB of actual data.I have seen, few are using way1 as well in there environmentsBut, i wana know which is good??Thanks in Advance |
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
|
|