How to tell if database is growing

I currently have a query running that typically takes about 5 minutes but it has been running for about 3 hours. I am assuming that the database has run out of space and is growing. We have it set to autogrow. Is there a way to tell if it is growing and how fast?


more ▼

asked Jun 07, 2011 at 02:37 PM in Default

avatar image

158 19 21 25

It is a simple insert statement. We are running on a SAN and sharing the SQL 2005 DB with about 10 other people. Thx

Jun 09, 2011 at 09:02 AM redder
(comments are locked)
10|1200 characters needed characters left

2 answers: sort voted first

sp_spaceused will give you the numbers and stats you are looking for. The larger issue is why your query that typically takes 5 minutes has been running for hours. You should run sp_who2 and see if any blocking is going on. If your query is not blocked and is actively running what is it doing? Inserts, updates, deletes? Depending on the action we can direct you in what to look for such as out of date statistics. There are other things too that could be affecting you such as memory and cpu pressure. If you are on a SAN or share the database server with other systems such as a consolidated server or a shared app/sql server. Give us more details please.

more ▼

answered Jun 07, 2011 at 02:41 PM

avatar image

40.9k 39 94 168

(comments are locked)
10|1200 characters needed characters left

You might also want to keep an eye on `sys.dm_db_file_space_usage`

more ▼

answered Jun 07, 2011 at 02:51 PM

avatar image

ThomasRushton ♦♦
42.3k 20 57 53

  • Well that is assuming he is working on a SQL database platform that came out in the past 7 years. :) Lets hope so anyway.

Jun 07, 2011 at 02:52 PM Tim

Seeing as the question is tagged "sql-server-2005" I figured that was a reasonable guess. :-)

Jun 07, 2011 at 02:55 PM ThomasRushton ♦♦
(comments are locked)
10|1200 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

SQL Server Central

Need long-form SQL discussion? SQLserverCentral.com is the place.



asked: Jun 07, 2011 at 02:37 PM

Seen: 942 times

Last Updated: Jun 07, 2011 at 02:37 PM

Copyright 2018 Redgate Software. Privacy Policy