Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase 12»»

An easy way to track the growth of your database Expand / Collapse
Author
Message
Posted Tuesday, March 11, 2008 4:57 PM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Tuesday, June 3, 2014 4:24 PM
Points: 14, Visits: 364
Comments posted to this topic are about the item An easy way to track the growth of your database
Post #467818
Posted Wednesday, April 16, 2008 4:47 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, July 1, 2010 8:11 AM
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
vivcolli:D
Post #485541
Posted Wednesday, May 7, 2008 5:42 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Wednesday, June 11, 2014 7:43 AM
Points: 184, Visits: 1,007
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
Post #496212
Posted Wednesday, May 7, 2008 7:39 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Friday, July 25, 2014 5:21 AM
Points: 1,205, Visits: 923
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


Manie 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)
Post #496318
Posted Tuesday, January 6, 2009 11:16 PM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Thursday, July 17, 2014 6:57 AM
Points: 55, Visits: 159
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/
Post #631207
Posted Sunday, February 8, 2009 11:07 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Tuesday, November 6, 2012 10:04 AM
Points: 144, Visits: 455
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
Post #652430
Posted Friday, February 20, 2009 1:15 PM
Right there with Babe

Right there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with Babe

Group: General Forum Members
Last Login: Wednesday, July 9, 2014 8:50 AM
Points: 743, Visits: 1,542

How would I modify this script to show the results in MB instead of GB?



Post #661680
Posted Friday, March 27, 2009 11:40 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Tuesday, July 8, 2014 10:24 AM
Points: 7, Visits: 152
use the figure 1048576 instead of 1024000000 or 1073741824.

KB = 1024
MB = 1024^2
GB = 1024^3
so on and so forth.
Post #685264
Posted Tuesday, April 21, 2009 10:29 PM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Wednesday, August 31, 2011 11:35 PM
Points: 298, 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


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



Post #702040
Posted Tuesday, April 21, 2009 10:32 PM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Wednesday, August 31, 2011 11:35 PM
Points: 298, 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
Post #702041
« Prev Topic | Next Topic »

Add to briefcase 12»»

Permissions Expand / Collapse