Tuesday, March 20, 2012

Can I change the AutoGrowth Option?

Hi,

Is it possible to change the Autogrowth option of a database is none is set? I recieved an alert saying that one of the databases has 39.9% of freespace. Having checked the properties of the database, I noticed that the Autogrowth option had not been used.

The database is SQL 2005.

Thanks.

Af.

Hi,

Your model db serves as a template for other dbs....by default the model db data file has unrestricted filegrowth and it grows by 1MB

each......and log file of model is unrestricted file growth and it grows by 10% of the file size...........whatever db you create will automatically be created with the model dbs file options unless you specify that growth pattern explicitly.........yes you can change it by right click your db and go to properties.you'll reach the db properties window.......go to the option files and then you have autogrowth column in the right side....just click the ellipse button and enable the button "enable autogrowth"....thats it

|||

Code Snippet

alter database nightshade

modify file (name = 'Nightshade_Data', filegrowth = 10%)

That should do the trick if you don't fancy using the GUI.

|||using the GUI of SSMS:

Start > Programs > Microsoft SQL Server 2005 > SQL Server Management Studio > Connect to the Instance > Open the database node in the tree > Right click the Database > Select properties > Option Files > Select the file to change the growth properties (changed by individual file) > click the (...) in the autorowth column of the respective file > Change the autogrowth properties.

Jens K. Suessmeyer.

http://www.sqlserver2005.de

No comments:

Post a Comment