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.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 DB growth

Author  Topic 

jstormoen
Starting Member

30 Posts

Posted - 2006-04-06 : 16:59:21
We have a server with about 100 DB's on it all set to autogrow at 20% - I would like to know if there is a way for me to write a script to see the last growth date fro each of these DB's.

I did notice when looking at the .mdf's on the drive that the change date may show me but this but I am unsure.

Any help is appreciated.

jen
Master Smack Fu Yak Hacker

4110 Posts

Posted - 2006-04-07 : 00:02:15
not sure, check if you can set up an alert in mssql otherwise you need to retrieve the values periodically and compare and alerts you when the value is n% higher than previous



--------------------
keeping it simple...
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2006-04-07 : 06:49:32
If any of your DBs are big then 20% is likely to be a killer. SQL Server pre-initialises the extended space, when it acquires it, and that in turn slows down the response time to queries that are in progress at that time - which means more concurrent queries arrive and stuff starts to time out. At least in my experience!

We now only set our DBs to a fixed size for expansion, rather than a percentage, to safeguard against this.

Obviously if your DBs are small (at least for now!) then you won't have this problem.

Kristen
Go to Top of Page

jstormoen
Starting Member

30 Posts

Posted - 2006-04-07 : 09:07:08
Setting up the alert or the comparisons is something that I am looking into but I am trying to identify a growth problem on this server and whether the growth seen is "normal" or not.

I have run a test and it appears that the "Last Modified" date shown within windows explorer would correlate to the create date or the last time the database performed a growth. I am looking for confirmation on this though
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2006-04-07 : 12:23:17
You may find that stop/re-starting SQL Server (or rebooting the server) will redate the files, but I'm not 100% sure

Kriten
Go to Top of Page

jstormoen
Starting Member

30 Posts

Posted - 2006-04-07 : 12:37:40
Also if Auto Shrink is enabled that would date those files as well.

Thanks for your responses
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2006-04-07 : 12:52:15
I can't think of a good reason to have Auto Shrink enabled:

http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=55210&SearchTerms=shrinking,shrink

but I can see that that would re-date the files!

Kristen
Go to Top of Page
   

- Advertisement -