Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Actual Size of my database? Expand / Collapse
Author
Message
Posted Wednesday, October 24, 2012 4:40 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Thursday, June 26, 2014 8:21 AM
Points: 11, Visits: 91
Guys
I am not a DBA but a developer so please bear with me.

The size of my db is 10929.50 MB (10GB), but when I took the backup and compressed it, the size of file was reduced to about 3.5GB.

I detached the db and zipped (.mdf + .ldf) using 7zip and the size of zip file was also around 3.5 GB.

I am wondering why is that and why my db size is showing 10GB. Is my db inflated?
By the way Recovery model is set to Simple.

I would really appreciate if someone can shed some light on this.

Regards

Mitesh






Post #1376404
Posted Wednesday, October 24, 2012 4:55 AM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: 2 days ago @ 10:13 AM
Points: 2,119, Visits: 5,520
When you compress the database, the compressed files should be smaller then the original files. It has nothing to do with how full the database is. This is what compression does. If you want to check how much space is used in the database, you can use sp_spaceused procedure.

Adi


--------------------------------------------------------------
To know how to ask questions and increase the chances of getting asnwers:
http://www.sqlservercentral.com/articles/Best+Practices/61537/

For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
Post #1376407
Posted Wednesday, October 24, 2012 6:31 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Yesterday @ 8:05 PM
Points: 13,925, Visits: 28,318
The database size is allocated size, not data size. SQL Server, by design, maintains empty space within the data and log files in order to allow for growth of your database without having to go to the disk to allocate more space. It's normal. You'll regularly see the backup size different than the storage size. You can get a quick idea about the allocated size, used size and unallocated amounts by querying sys.dm_db_file_space_usage.

----------------------------------------------------
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood..." Theodore Roosevelt
The Scary DBA
Author of: SQL Server Query Performance Tuning
SQL Server 2012 Query Performance Tuning
SQL Server 2008 Query Performance Tuning Distilled
and
SQL Server Execution Plans

Product Evangelist for Red Gate Software
Post #1376436
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse