Restrict Autogrowth size( File Growth ) of a Database to 10 percent :)

  • I wish to restrict Autogrowth size ( File Growth ) of all the data files and log files of the Users Database to 10 percent.

    I know how to do it through GUI ( Manually ) , but i am looking for an SQL script with which i can do it at once ( for all the mdf and ldf files of a database - as they are more in numbers )

    Please provide your inputs / scripts ....

    Please cc to my id also : abhishek.dwivedi798@gmail.com.

    Thanks

  • If you do it via to GUI but dont hit OK, instead at the top, there should be a script button, hit the arrow then select where you will want to script it to.

    You will need to modify the script to do each individual file within a database you want to change.

    Also are you sure you want to grow in percent? My personal preference is a pre-determined size.

    Also you should size your MDF / NDF / LDF's accoridngly to prevent fragmentation, granted you can only quess at how much to size it but auto growth has a performance issue everytime the file grows.

    If you wanted to you could be cleaver and use the undocumented sp_MSForEachDB procedure and issue sp_helpfile and build up your T-SQL statements that way.

  • stop cross posting. it's lame.

    answers at the following link please.

    http://www.sqlservercentral.com/Forums/Topic1128079-149-1.aspx

    ______________________________________________________________________________________________
    Forum posting etiquette.[/url] Get your answers faster.

Viewing 3 posts - 1 through 2 (of 2 total)

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