Solved

mdf size after upgrade from mssql2000

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Dataset not reading table data 12 46
Need some help wiht :CAST AS Double 11 44
How to query LOCK_ESCALATION 4 40
how to eliminate duplicates in a string variable in t-sql? 30 63
In this article I will describe the Backup & Restore 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.
Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …

920 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

14 Experts available now in Live!

Get 1:1 Help Now