Sunday, December 28, 2008

Increasing the DB Size in SQl Server 2005

Hi again, I am going to write a small post on one of the common issues related with databases. I am talking about SQL Server 2005 databases. This is of course not a bug and is only related to tweaking server and application's performance.
By default during the time of database creation a default size of the database is associated. But this db size is not sufficient to hold the data long enough onto it. As you see things working good at the business end, you will experience data growth in your databases. By default, all db's are set with an auto growth property which avoids any data loss or application failure.

But this is not enough!!

In my personal experience, the db size growed enough and continued growing on extra 1MB automatically after reaching maximum default size. It affected my application's performance badly and made my portal slower than anything! During my investigation I checked the Db size and increased it to some good level manually.

This is what I actually did:

1. Opened the SQL management studio 2005
2. Right Clicked the database name - ex. Mx_Content_DB
3. Selected Properties.
4. On the Files menu I increased the initial size of the database
by 1GB and set the auto growth to increase by 10%.

After the database server restart, things stared looking fine and performance level increased considerably.

Please note that when you are using multiple db's in your application, you may have to do the same with other Db's also if
the same issue happens with them.

Tomorrow I will update the same post with the some screenshots which will help you further on your database management activities.

No comments: