.mdf is full how to add more disk space to it

  • One of the database that I monitoring is showing the .mdf file full.

    Recovery model of that database is simple.

    what is the best way to handle it?

    Am I supposed to add more space to the Disk where it is on? Right now in the Options of database-> .mdf file has --> Autogrowth increase by 10% unlimited set to it.

    I still have space on my Drive where this file is on.

  • If your database is full, you need to add more space. Rather than making it a manual process, simply enable the autogrowth setting to something "reasonable" (and get rid of the percentage setting), or even better pre-size the data file to a size that you think it might grow to in months, etc.

    Example:USE [master]

    GO

    ALTER DATABASE [YourDatabase] MODIFY FILE ( NAME = N'YourDatabaseName', SIZE = 1048576KB , FILEGROWTH = 524288KB )

    GO

    ______________________________________________________________________________Never argue with an idiot; Theyll drag you down to their level and beat you with experience

  • SmilingLily (3/18/2015)


    One of the database that I monitoring is showing the .mdf file full.

    Recovery model of that database is simple.

    what is the best way to handle it?

    Am I supposed to add more space to the Disk where it is on? Right now in the Options of database-> .mdf file has --> Autogrowth increase by 10% unlimited set to it.

    I still have space on my Drive where this file is on.

    Since the database file is set to autogrow, it will add space when needed. However, you need to check if the growth size is restricted. You may have hit the restricted size. In that case, you'll need to change it to unrestricted or increase the restriction. Also, a good suggestion is to change the autogrow from a percentage to MB. I don't know how much your data file normally needs to grow by, so I can't recommend a setting....but try to determine an initial size to grow by and see if that minimizes the times it has to grow.

    -SQLBill

  • Thank you Jessie.

    I tried below -- my REC.mdf is full and it is growing 10% when needed. It became 2500MB and showing me 1% space available.

    REC is the Logincal name of the REC.mdf

    Alter Database Rec

    Modify File (Name = REC, SIze = 3000 MB)

  • Awesome! Please be sure to set the autogrowth setting to "In Megabytes", and not "In Percent", and as SQLBill mentioned, ensure the "Maximum File Size" is set to a value much higher than the current data file size.

    ______________________________________________________________________________Never argue with an idiot; Theyll drag you down to their level and beat you with experience

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

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