I don't know is it stupid or not. But for some reasons, after I shrink the database, the database has 0.00MB in the Space Available. Can anyone help me how to increase the space available?
Here's some info in a nutshell... (it obviously is much deeper than just this)
SQLServer allocates chunks of areas called pages to hold the database information. When a database is defined, the system defaults to setting up 10% freespace. That's 10% of freespace within each new page setup for data. What that does is allow SQLServer to insert data to 90% of the individual data page chunks. That allows subsequent insertions to be attempted right within the given page where the [new] data is most appropriate.
When there is not enough freespace to satisfy a given insertion requirement, a new 'page' is allocated and the new entry is added within that page. Just like operating system file allocations, this can lead to significant fragmentation of what would otherwise be contiguous data.
So, some freespace is suggested. And a DBA will make calculatinos, based on the purpose of a database as to what that value should be.
As a rule, the 10% default is probably sufficient to start with. Later on you can do analyses to decide if other values could be more effective.
Make sure that you specify that the database can 'grow' automatically. (The default on SQL2000 and I think 7 as well). Then SQLServer will always 'grow' your database to the limitations of your disk (by simply adding more pages as required). So its not like you have to worry that it will 'run out' of freespace.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.