Click here to monitor SSC
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
Grasshopper
Grasshopper (20 reputation)Grasshopper (20 reputation)Grasshopper (20 reputation)Grasshopper (20 reputation)Grasshopper (20 reputation)Grasshopper (20 reputation)Grasshopper (20 reputation)Grasshopper (20 reputation)

Group: General Forum Members
Points: 20 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
Forum Newbie
Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)

Group: General Forum Members
Points: 4 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
Old Hand
Old Hand (337 reputation)Old Hand (337 reputation)Old Hand (337 reputation)Old Hand (337 reputation)Old Hand (337 reputation)Old Hand (337 reputation)Old Hand (337 reputation)Old Hand (337 reputation)

Group: General Forum Members
Points: 337 Visits: 1195
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

My PC Quick Reference Guide
Manie Verster
Manie Verster
UDP Broadcaster
UDP Broadcaster (1.4K reputation)UDP Broadcaster (1.4K reputation)UDP Broadcaster (1.4K reputation)UDP Broadcaster (1.4K reputation)UDP Broadcaster (1.4K reputation)UDP Broadcaster (1.4K reputation)UDP Broadcaster (1.4K reputation)UDP Broadcaster (1.4K reputation)

Group: General Forum Members
Points: 1445 Visits: 1022
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
SSC Journeyman
SSC Journeyman (83 reputation)SSC Journeyman (83 reputation)SSC Journeyman (83 reputation)SSC Journeyman (83 reputation)SSC Journeyman (83 reputation)SSC Journeyman (83 reputation)SSC Journeyman (83 reputation)SSC Journeyman (83 reputation)

Group: General Forum Members
Points: 83 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
SSC-Enthusiastic
SSC-Enthusiastic (174 reputation)SSC-Enthusiastic (174 reputation)SSC-Enthusiastic (174 reputation)SSC-Enthusiastic (174 reputation)SSC-Enthusiastic (174 reputation)SSC-Enthusiastic (174 reputation)SSC-Enthusiastic (174 reputation)SSC-Enthusiastic (174 reputation)

Group: General Forum Members
Points: 174 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
SSC Eights!
SSC Eights! (973 reputation)SSC Eights! (973 reputation)SSC Eights! (973 reputation)SSC Eights! (973 reputation)SSC Eights! (973 reputation)SSC Eights! (973 reputation)SSC Eights! (973 reputation)SSC Eights! (973 reputation)

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



madyson3
madyson3
Grasshopper
Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)

Group: General Forum Members
Points: 11 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
Old Hand
Old Hand (308 reputation)Old Hand (308 reputation)Old Hand (308 reputation)Old Hand (308 reputation)Old Hand (308 reputation)Old Hand (308 reputation)Old Hand (308 reputation)Old Hand (308 reputation)

Group: General Forum Members
Points: 308 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
Old Hand
Old Hand (308 reputation)Old Hand (308 reputation)Old Hand (308 reputation)Old Hand (308 reputation)Old Hand (308 reputation)Old Hand (308 reputation)Old Hand (308 reputation)Old Hand (308 reputation)

Group: General Forum Members
Points: 308 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