Solved

mdf size after upgrade from mssql2000

Posted on 2007-12-05
6
245 Views
Last Modified: 2010-03-19
Hi experts,

Since I have updagrade from sql2000 to sql2005. My main database mdf has jump from 640 Mo to 12600Mo.

What should I do? Because when I backup now, it makes a 6 G file that is not easy to store.

Thanks
0
Comment
Question by:cabou
  • 2
6 Comments
 
LVL 25

Accepted Solution

by:
imitchie earned 250 total points
ID: 20409858
You may need to shrink it. Search for DBCC SHRINKFILE in Books Online.
It may have allocated more space then required.

try
select dpages*8,* from mydbname.dbo.sysfiles      and check that against the 12G.  If it's a lot smaller, then shrinking will work fine
0
 
LVL 35

Assisted Solution

by:David Todd
David Todd earned 250 total points
ID: 20409921
Hi,

If the backup is 6GB then it is unlikely that the database will be smaller than 6.5 - 7GB at best.

What I'm saying is that just shrinking the database wont have any effect on the size of the backup file. I once had a 100MB backup that had come from a 12GB database - 12GB log file and 100MB data file.

To reduce the size you will need to inspect the structure, and make sure that you don't have rows that are too wide, and check to make sure that all the tables are needed, the indexes are needed, and that the rows in the tables are needed - that is that you don't have old data from Adam so to speak, that could easily be deleted.

Those are the ways to reduce the size of the full backup, which comes down to reducing the amount of data in the database.

The size of the database is always above and beyond the amount of data. Remember that indexes can (collectively) take up a fair amount of space. I have seen a database where the indexes were about one third of the size of the database.

HTH
  David
0
 
LVL 19

Expert Comment

by:Rimvis
ID: 20409951
0
 
LVL 19

Expert Comment

by:Rimvis
ID: 22486773
I think it should be divided to all participants: imitchie, dtodd and me.
0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Recently, when I was asked to create a new SQL 2005 cluster, Microsoft released a new service pack for MS SQL 2005 what is Service Pack 3. When I finished the installation of MS SQL 2005 I found myself troubled why the installation of SP3 failed …
So every once in a while at work I am asked to export data from one table and insert it into another on a different server.  I hate doing this.  There's so many different tables and data types.  Some column data needs quoted and some doesn't.  What …
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question