Database Data Size confusion?
essamughal
Posts: 35
Hi;
I have a database on production total size is 10 GB approx, MDF = 7 GB and LDF = 3 GB, when red-gate takes backup it sends email as
10/18/2006 1:36:49 AM: Backup data size : 2.076 GB
10/18/2006 1:36:49 AM: Compressed data size: 472.404 MB
10/18/2006 1:36:49 AM: Compression rate : 77.77%
Now, I am confused since I was thinking my database is 2.076 reading these emails, but originally it is taking 10 GB on production and I was misinterpreted by the email.
What is the original size of my Database?
One event I want to mention, there was some un-used table approximately 4 GB before two weekd and I deleted them on production before that the email from red-gate was like that:
10/4/2006 1:40:50 AM: Backup data size : 6.481 GB
10/4/2006 1:40:50 AM: Compressed data size: 1.271 GB
10/4/2006 1:40:50 AM: Compression rate : 80.38%
After doing that I was happy I reduced the size of the database by 4 GB, but the original size of the database is still 10 GB.
Please, can anyone explain to me? It is very important for me?
Thanks
I have a database on production total size is 10 GB approx, MDF = 7 GB and LDF = 3 GB, when red-gate takes backup it sends email as
10/18/2006 1:36:49 AM: Backup data size : 2.076 GB
10/18/2006 1:36:49 AM: Compressed data size: 472.404 MB
10/18/2006 1:36:49 AM: Compression rate : 77.77%
Now, I am confused since I was thinking my database is 2.076 reading these emails, but originally it is taking 10 GB on production and I was misinterpreted by the email.
What is the original size of my Database?
One event I want to mention, there was some un-used table approximately 4 GB before two weekd and I deleted them on production before that the email from red-gate was like that:
10/4/2006 1:40:50 AM: Backup data size : 6.481 GB
10/4/2006 1:40:50 AM: Compressed data size: 1.271 GB
10/4/2006 1:40:50 AM: Compression rate : 80.38%
After doing that I was happy I reduced the size of the database by 4 GB, but the original size of the database is still 10 GB.
Please, can anyone explain to me? It is very important for me?
Thanks
Comments
Notice the difference in the number of pages that are backed up, although the database size has not changed (look at the results of sp_helpdb). Thus, when SQL Backup reports the 'backup data size', it is reporting the amount of data that was actually backed up i.e. the number of pages x 8 KB. That would also have been the size of a native backup i.e. if you performed a normal backup using SQL Server, the backup file would be ~2 GB, and not anywhere near 10 GB.
The compression rate is also calculated using this number. Some tools might calculate the rate using 10 GB as the denominator, thus giving a compression rate of 95%. It's open to interpretation, I suppose.
SQL Backup Consultant Developer
Associate, Yohz Software
Beyond compression - SQL Backup goodies under the hood, updated for version 8
Thanks for explaining me that in details.
1- Now, my question is that now is the data size in the database is 2 GB then where the 8 GB is used in my case. I can see 3 GB would be in Log but where the 5 GB is used.
2- How can I reduce that size of the database which seems useless since I have only 2 GB data in my database.
Thanks
2 - See DBCC SHRINKFILE, DBCC SHRINKDATABASE, but also see http://www.karaszi.com/SQLServer/info_dont_shrink.asp
SQL Backup Consultant Developer
Associate, Yohz Software
Beyond compression - SQL Backup goodies under the hood, updated for version 8