Log in
::
Register
::
Not logged in
Home
Tags
Articles
Editorials
Stairways
Forums
Scripts
Videos
Blogs
QotD
Books
Ask SSC
SQL Jobs
Training
Authors
About us
Contact us
Newsletters
Write for us
Recent Posts
Recent Posts
Popular Topics
Popular Topics
Home
Search
Members
Calendar
Who's On
Home
»
SQL Server 2008
»
SQL Server 2008 Administration
»
Actual Size of my database?
Actual Size of my database?
Rate Topic
Display Mode
Topic Options
Author
Message
Mitesh Chauhan
Mitesh Chauhan
Posted Wednesday, October 24, 2012 4:40 AM
Grasshopper
Group: General Forum Members
Last Login: Friday, April 26, 2013 12:02 PM
Points: 11,
Visits: 89
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
Adi Cohn-120898
Adi Cohn-120898
Posted Wednesday, October 24, 2012 4:55 AM
SSCrazy
Group: General Forum Members
Last Login: Today @ 2:32 AM
Points: 2,018,
Visits: 4,914
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
Grant Fritchey
Grant Fritchey
Posted Wednesday, October 24, 2012 6:31 AM
SSChampion
Group: General Forum Members
Last Login: Today @ 8:46 AM
Points: 13,371,
Visits: 25,147
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 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 »
Permissions
You
cannot
post new topics.
You
cannot
post topic replies.
You
cannot
post new polls.
You
cannot
post replies to polls.
You
cannot
edit your own topics.
You
cannot
delete your own topics.
You
cannot
edit other topics.
You
cannot
delete other topics.
You
cannot
edit your own posts.
You
cannot
edit other posts.
You
cannot
delete your own posts.
You
cannot
delete other posts.
You
cannot
post events.
You
cannot
edit your own events.
You
cannot
edit other events.
You
cannot
delete your own events.
You
cannot
delete other events.
You
cannot
send private messages.
You
cannot
send emails.
You
may
read topics.
You
cannot
rate topics.
You
cannot
vote within polls.
You
cannot
upload attachments.
You
may
download attachments.
You
cannot
post HTML code.
You
cannot
edit HTML code.
You
cannot
post IFCode.
You
cannot
post JavaScript.
You
cannot
post EmotIcons.
You
cannot
post or upload images.
Copyright © 2002-2013 Simple Talk Publishing. All Rights Reserved.
Privacy Policy.
Terms of Use.
Report Abuse.