Sql-server – SQL Server 2008 R2 Express size

database-sizesql-server-2008-r2sql-server-express

I have what I believe is SQL Server 2008 R2 Express installed on a production server. When I connect to it with SQL Server Management Studio it shows up as SQL Server 10.50.1600.

If it is in fact SQL Server 2008 R2 Express, my understanding is that the database size limit is 10 GB. However, something is just bugging me because I am close to 1 GB in size and there is a message on the properties screen that is scaring me. The database is running in a production environment. There were a lot of rows in it and I deleted a lot, but it has not changed the message. When I go to the properties for the database it says "Size 1005.75 MB" and right below it says "Space Available 0.03 MB".

I tried to use "Shrink" but it just flashes and goes away. Is my production server about to crash because the database is too big? Why would that happen at 1 GB when I thought the server should allow 10 GB? How can I reduce it? Deleting records for inactive clients has done nothing.

Best Answer

The "Database Size" on the properties page is showing the size of the data file. This will be the size of your data, with some empty space for new data. You can configure the rate at which this empty space is allocated in the database properties.

It says space available 0.03Mb because you've shrunk the data file down - it will grow by itself to allow for new records - this is normal and intended behaviour. This "Available Space" is what's left in the current data file, NOT the difference between your current database size and the licensed limit of 10GB.

You can verify the edition that is installed by checking the General page in the Server properties under Product. In the management studio header it only shows the general version, not the product edition.

When you delete a lot of records, you will end up with free space left in the file. This will not be automatically shrunk unless you set up a maintenance task for it.