SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


An easy way to track the growth of your database


An easy way to track the growth of your database

Author
Message
Sylvia Moestl Vasilik
Sylvia Moestl Vasilik
SSC Veteran
SSC Veteran (286 reputation)SSC Veteran (286 reputation)SSC Veteran (286 reputation)SSC Veteran (286 reputation)SSC Veteran (286 reputation)SSC Veteran (286 reputation)SSC Veteran (286 reputation)SSC Veteran (286 reputation)

Group: General Forum Members
Points: 286 Visits: 393
Comments posted to this topic are about the item An easy way to track the growth of your database
viv-488863
viv-488863
SSC Rookie
SSC Rookie (26 reputation)SSC Rookie (26 reputation)SSC Rookie (26 reputation)SSC Rookie (26 reputation)SSC Rookie (26 reputation)SSC Rookie (26 reputation)SSC Rookie (26 reputation)SSC Rookie (26 reputation)

Group: General Forum Members
Points: 26 Visits: 106
hi,

I've just implented the script and think the result output is awesome.
However i was wondering if there was any way within the script that it would include all databases on the server instead of one at at time, and to have a history on the size since it was first created. Also is there any way it could be executed as a job, if so what do you reckon the command will be, to run this in SQL AGENT agent
ie something similar to
exec sp_track_db_growth "northwind" s an example

Like i said the script was and is fantabulous!!!!!!!!!!!!!!!.

CIAO
vivcolliBigGrin
David Bird
David Bird
Hall of Fame
Hall of Fame (3.6K reputation)Hall of Fame (3.6K reputation)Hall of Fame (3.6K reputation)Hall of Fame (3.6K reputation)Hall of Fame (3.6K reputation)Hall of Fame (3.6K reputation)Hall of Fame (3.6K reputation)Hall of Fame (3.6K reputation)

Group: General Forum Members
Points: 3553 Visits: 1363
Nice script, except to convert bytes to gigabytes you need to divide it by 1073741824 Bytes

See http://www.123marbella.net/en/free-bandwith-calculator.html

David Bird
Manie Verster
Manie Verster
SSCertifiable
SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)

Group: General Forum Members
Points: 5693 Visits: 1064
Good article. I just found that using the floor function gave the size as 1 right through because the db that I work on is 1.6 gb so I rather used the round function and it came up tops. Thanks for a good article.
Below is an example of what I did.

select BackupDate = convert(varchar(10),backup_start_date, 111), SizeInGigs=round(backup_size/1024000000,4)
from msdb..backupset
where database_name = 'OrisysSql' and type = 'd'
order by backup_start_date desc

:-PManie Verster
Developer
Johannesburg
South Africa

I can do all things through Christ who strengthens me. - Holy Bible
I am a man of fixed and unbending principles, the first of which is to be flexible at all times. - Everett Mckinley Dirkson (Well, I am trying. - Manie Verster)
kodracon
kodracon
Say Hey Kid
Say Hey Kid (689 reputation)Say Hey Kid (689 reputation)Say Hey Kid (689 reputation)Say Hey Kid (689 reputation)Say Hey Kid (689 reputation)Say Hey Kid (689 reputation)Say Hey Kid (689 reputation)Say Hey Kid (689 reputation)

Group: General Forum Members
Points: 689 Visits: 162
to apply this script to every database on the server try using this and modify the script as appropriate:

http://www.sqlservercentral.com/scripts/Metadata/65453/
Joseph-465703
Joseph-465703
SSCommitted
SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)

Group: General Forum Members
Points: 1746 Visits: 465
what about the databases which are backed up with compression method like litespeed, let say today backup is taken with native method and tommorrow backup is taken with litespeed, how do we know whther databae size is increased or not.

thanks
Joseph
Jpotucek
Jpotucek
SSCoach
SSCoach (15K reputation)SSCoach (15K reputation)SSCoach (15K reputation)SSCoach (15K reputation)SSCoach (15K reputation)SSCoach (15K reputation)SSCoach (15K reputation)SSCoach (15K reputation)

Group: General Forum Members
Points: 15578 Visits: 1680
How would I modify this script to show the results in MB instead of GB?



madyson3
madyson3
SSC-Enthusiastic
SSC-Enthusiastic (147 reputation)SSC-Enthusiastic (147 reputation)SSC-Enthusiastic (147 reputation)SSC-Enthusiastic (147 reputation)SSC-Enthusiastic (147 reputation)SSC-Enthusiastic (147 reputation)SSC-Enthusiastic (147 reputation)SSC-Enthusiastic (147 reputation)

Group: General Forum Members
Points: 147 Visits: 191
use the figure 1048576 instead of 1024000000 or 1073741824.

KB = 1024
MB = 1024^2
GB = 1024^3
so on and so forth.
kbotha80
kbotha80
SSC-Addicted
SSC-Addicted (434 reputation)SSC-Addicted (434 reputation)SSC-Addicted (434 reputation)SSC-Addicted (434 reputation)SSC-Addicted (434 reputation)SSC-Addicted (434 reputation)SSC-Addicted (434 reputation)SSC-Addicted (434 reputation)

Group: General Forum Members
Points: 434 Visits: 57
Greate Script. Usually peopel would like to see percentage growth which is easily calulate using this script of yours. Providing the Db always gorwos in size thsi will work. - Script great Idee Cool


Select ((MAX(SizeInGigs) - MIN(SizeInGigs))/ MAX(SizeInGigs))*100 from (
select BackupDate = convert(varchar(10),backup_start_date, 111)
,SizeInGigs=floor(backup_size)
from msdb..backupset
where
database_name = 'CES'
and type = 'd'
)TB
kbotha80
kbotha80
SSC-Addicted
SSC-Addicted (434 reputation)SSC-Addicted (434 reputation)SSC-Addicted (434 reputation)SSC-Addicted (434 reputation)SSC-Addicted (434 reputation)SSC-Addicted (434 reputation)SSC-Addicted (434 reputation)SSC-Addicted (434 reputation)

Group: General Forum Members
Points: 434 Visits: 57
""""
what about the databases which are backed up with compression method like litespeed, let say today backup is taken with native method and tommorrow backup is taken with litespeed, how do we know """"

If you use percentage growth - over the time periods not compressed and compressed periods it should be more or less the same
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum








































































































































































SQLServerCentral


Search