Database Growth History

  • Comments posted to this topic are about the item Database Growth History

  • Question about this script, what is the "DataGrowth" value? I would assume that it's how much the database has "grown" since (when)? I have a database that is 400GB that I know 2 years ago was around 200GB, but the "DataGrowth" value only says 24.5GB.

    Any help would be great! By the way, I do really like the script and I will find a use for it.

    Thanks for the sharing...

  • Nevermind, guess I should actually look at the script and analyze it then I could answer the question myself....(NoSampleDays....). Woops!

  • Hmm, that is interesting. What is the value of the SampleDays column?

    I am glad that you found some use for it... 😉

    edit:

    Ah, I see you are a bit ahead of me there.

  • This is great information and easy to understand.

    I have used it on over 100 of the 2000 dbs that I review

  • A little tidbit that I found out about this script (and others that I run daily). This script appears to track data from when the SQL Server instance was installed, whereas, my other scripts that track index information get reset after each SQL Server reboot/recycle.

    I was unfortunate enough to get to find that out today...

    Thanks again for the script.

  • Hello,

    I am a beginner but this code is quite helpful, thanks a bunch.

  • I'm good, thanks again for the script.

  • Hello, when running this script am getting an 'Incorrect syntax near '-' error message. Any ideas?

  • Thanks for the script! Might want to adapt it to use the sp_MSForeachDB for simplicity. Thanks again!

  • Thanks for the script. Found a slight problem though: with database names that have funky characters in them, especially a period, this will throw an error (as wakanni found). I placed brackets around the @vcDatabaseName in the EXEC statement:

    EXEC ('

    INSERT INTO ##tbl_DataSize

    SELECT CAST((SUM(size)) as DECIMAL(20,3)) FROM ['+@vcDatabaseName+'].dbo.sysfiles'

    )

    No more errors for me.

    ----------------------------------------------------------------------------
    Sacramento SQL Server users group - http://sac.sqlpass.org
    Follow me on Twitter - @SQLDCH
    ----------------------------------------------------------------------------

    Yeah, well...The Dude abides.
  • Hi,

    I ran the script and it was giving desired results but in some of the servres it threw the below error:

    Msg 207, Level 16, State 1, Line 89

    Invalid column name 'size'.

    Any idea how to get rid of this?

  • rituchaudhary.work (11/7/2012)


    Hi,

    I ran the script and it was giving desired results but in some of the servres it threw the below error:

    Msg 207, Level 16, State 1, Line 89

    Invalid column name 'size'.

    Any idea how to get rid of this?

    Without doing any testing, I'm assuming the fix for this would be to throw brackets around your column name, since "size" is probably a reserved word in SQL Server.

  • Hi,

    thanks for the prompt reply but no good..I ran the query after adding the brackets but still got the same error..while the query is running fine on another server of the same version and edition. I am unable to make out where the fault is..

  • rituchaudhary.work (11/8/2012)


    Hi,

    thanks for the prompt reply but no good..I ran the query after adding the brackets but still got the same error..while the query is running fine on another server of the same version and edition. I am unable to make out where the fault is..

    What version of SQL Server are you running?

Viewing 15 posts - 1 through 15 (of 27 total)

You must be logged in to reply to this topic. Login to reply