Backup back up the database pages and restores the to the exact location in
database with exactly the same amount of fragmentation it had before.
This posting is provided "AS IS" with no warranties, and confers no rights.
"Andrea Montanari" <andrea.sqlDMO@virgilio.it> wrote in message
news:4v2dmlF1a6iocU1@mid.individual.net...
> hi,
> Lucvdv wrote:
>> On Fri, 22 Dec 2006 11:09:52 +0100, Lucvdv <replace_name@null.net>
>> wrote:
>>
>>> I've got a SQL Express database with, right after running DBCC
>>> SHRINKDATABASE, an MDF file size of 1.59 GB. The log file size is
>>> neglectable, less than 1 MB.
>>>
>>> The database properties say size 1632.50 MB, 159.07 MB available.
>>>
>>> When I look at the properties of all tables individually and add
>>> their data and index sizes, they add up to 590 MB.
>>>
>>> What's it using the other 1GB for?
>>
>> To find out if it could have anything to do with data fragmentation, I
>> backed up that database and restored it under another name, to new
>> mdf and ldf files.
>>
>> No difference: the new version is also 1.59 GB.
>>
>
> actually it can be related with fragmentation.. have a look at
>
http://www.microsoft.com/technet/prodtechnol/sql/2000/maintain/ss2kidbp.mspx > for some hints about it.. it's based on SQL Server 2000 storage engine but
> 2005 implications are relevant...
> just have a look at
http://msdn2.microsoft.com/en-gb/library/ms188917.aspx > for info about sys.dm_db_index_physical_stats instead of DBCC commands...
>
>> I also checked an identical setup at another customer.
>>
>> The database is 547 MB large there, while all tables (data + indexes)
>> add up to 391 MB.
>> So there's a difference there too, but it's much less significant.
>
> again, chances the difference is about fragmentation, as long as
> fillfactor settings and average row size that have to fit the 8060bytes
> boundary...
> --
> Andrea Montanari (Microsoft MVP - SQL Server)
>
http://www.asql.biz http://italy.mvps.org > DbaMgr2k ver 0.20.0 - DbaMgr ver 0.64.0 and further SQL Tools
> --------- remove DMO to reply
>