Solved

mdf size after upgrade from mssql2000

Posted on 2007-12-05
6
242 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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

I've encountered valid database schemas that do not have a primary key.  For example, I use LogParser from Microsoft to push IIS logs into a SQL database table for processing and analysis.  However, occasionally due to user error or a scheduled taskā€¦
In this article I will describe the Copy Database Wizard method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

758 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

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now