Solved

mdf size after upgrade from mssql2000

Posted on 2007-12-05
6
247 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
spx for moving values to new table 5 75
Sql Data via Excel--performance issues 2 57
SQL Server - Set Field Values ito Zero Based on Related Table 4 44
SQL Error - Query 6 50
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 …
Introduction: When running hybrid database environments, you often need to query some data from a remote db of any type, while being connected to your MS SQL Server database. Problems start when you try to combine that with some "user input" pass…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

730 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