Autogrowth out of control

  • Although I have googled this, I can't seemed to find any real explanation except that it is a know fault and it is fixed with SQL 2005 Service Pack 3.

    I applied SQL SERVER 2003 SP2 and SQL 2005 SP3 over last weekend, however, this morning it ran away again.

    I can get round it, short term, by first restarting the SQL service and then issuing the following command:

    ALTER DATABASE [database name]MODIFY FILE ( NAME = N'[database name]_dat', FILEGROWTH = 100mb)

    This gets round it as I said but after a while, off it goes.

    The database is very large, some 350gb and when the problems occur it takes up all of the 750gb space made available for it.

    Can anyone throw any more light on this please?

    Thanks

  • Is it the database file or the log file that is growing out of control?

    What is the recovery model of the database?

    What is happening in the database when the autogrowth occurs? You may need a server-side trace to find this. You may be able to see it in the default trace if the growth is caused by object creation.

  • Thanks for your reply

    The Recovery Model is simple.

    There is no defined (or we can't catch it) reason why it should go like this. It is part of a cluster with one server active all the time and the second is used for fail over, and has two SAN drives.

    One drive has the database on, currently standing at 384gb with an allocated space of 750gb. The sedond is the QUORUM.

    When it happens it just goes wild. When I restart the SQL service it settles down, but with a second of two off it goes again.

    When I issue the ALTER DATABASE command it does not necessarily work straight away, I may have to issue it several times before it takes.

    Once it is reset, it stays stable for a while, but once again, there does not appear to be any one thing that starts it off.

    I hope this makes sense...

  • As I think you are already aware - there was an issue with the autogrow setting being converted to a very large number. If you have already patched beyond that point, then the only other reason that the autogrow setting could change is if some process is changing it.

    Also, be aware that a database will only grow when it has run out of space and it needs more space. If your database is growing, then you must have a process running that needs additional space available - causing the autogrow event to occur.

    What I do is make sure the autogrow setting is a much higher value than 100mb. With instant initialization available and a 380GB database, I would set my autogrow to at least 5000MB - then I would manually grow the file to maintain at least 20% (or 6 months, whichever is larger) of data space available in the data file. I then monitor the database on a regular basis and schedule time to manually grow the file as needed.

    Jeffrey Williams
    “We are all faced with a series of great opportunities brilliantly disguised as impossible situations.”

    ― Charles R. Swindoll

    How to post questions to get better answers faster
    Managing Transaction Logs

  • Before you set autogrow to anything, you need to find out what is causing the autogrowth. Like you've said, you've probably patched beyond the point of the fault. Now, you need to trap what is causing the autogrowth. Setup a profile trace to check for autogrowth and find out which stored procedure or SQL that's causing the growth. Dollars to donuts it's some stored proc or GUI generated script being used for reporting and it either has an accidental cross join or some many-to-many join in it which is just as bad.

    For goodness sake, don't ever set outgrowth to 5000 MB.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • Thanks for all the replies. I will take note of all suggestions and will keep you up to date as to what happens.

    Just one more thging, this Autogrowth to 12800% seems to have been around for a while, has no one else hrdard of this occurrence?

    Thanks once again and have a Merry Xmas (for those who ecelebraete) and a great 2010

Viewing 6 posts - 1 through 5 (of 5 total)

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