473,767 Members | 1,996 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Shrinking SQL2000 Database w 20 datafiles.

Hello,
I am trying to clean up a database I inherited.

I have an 80GB SQL 2000 database with 20 datafiles each 4096 in size. I
have been able to remove unneeded data and am now trying to clean up.

If I do a Shrink on each datafile would able to recover on average 2gb
out of 4g, however I would prefer to have 10 full datafiles and 10
empty. (or better yet 5 full 8GB datafiles and 15 empty)

Can someone point me in the right direction on how to move the data
around so that dont have 20 partially filled datafiles?

I have noticed that I can shrink a single file and use the "empty the
file option (and move data to other files in the group)." option. I
have already done this to the last 2 datafiles as a test but not sure
how to do this on a large scale. I have also set the 1st 10 datafiles
to be able to grow to 8 GB.

For lack of a better way to say this, Is there a way to defrag or
reorganize the data\tables so everything "moves to the front".

BTW, I have already run a maintenance plan to reorganize the data and
index pages.

Jul 23 '05 #1
2 1755
Marc C (mc****@allosou rce.org) writes:
I have an 80GB SQL 2000 database with 20 datafiles each 4096 in size. I
have been able to remove unneeded data and am now trying to clean up.

If I do a Shrink on each datafile would able to recover on average 2gb
out of 4g, however I would prefer to have 10 full datafiles and 10
empty. (or better yet 5 full 8GB datafiles and 15 empty)

Can someone point me in the right direction on how to move the data
around so that dont have 20 partially filled datafiles?

I have noticed that I can shrink a single file and use the "empty the
file option (and move data to other files in the group)." option. I
have already done this to the last 2 datafiles as a test but not sure
how to do this on a large scale. I have also set the 1st 10 datafiles
to be able to grow to 8 GB.


I would then proceed to use ALTER DATABASE REMOVE FILE on those
empty files, and continue to remove files in this way, unril the
number of files is more managable.

For what is a manageable number, well, 80 GB is not a frightening
size for a database, so my target number would be 1...

--
Erland Sommarskog, SQL Server MVP, es****@sommarsk og.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp
Jul 23 '05 #2
I would recommend revisiting your strategy. Having more than one file
indicates you are trying to spread your IO out across more disk. MS also
recommends having at least one file per processor although I don't know how
much effect that really has. SQL Server uses a proportional fill strategy
which means if you have full files and empty files of the same size,,new
data will fill the empty files at an equal rate. This generally causes hot
spots in the IO. Depending on your disk layout or SAN layout either spread
all your IO evenly across all disks or split the filegroups between
functions like data and index.

Preallocate all the space your system will need for as long as you can.
Avoid autogrow. Having it on is a nice safety measure but monitor filegroup
space and ensure that in never is actually needed.

"Marc C" <mc****@allosou rce.org> wrote in message
news:11******** ************@o1 3g2000cwo.googl egroups.com...
Hello,
I am trying to clean up a database I inherited.

I have an 80GB SQL 2000 database with 20 datafiles each 4096 in size. I
have been able to remove unneeded data and am now trying to clean up.

If I do a Shrink on each datafile would able to recover on average 2gb
out of 4g, however I would prefer to have 10 full datafiles and 10
empty. (or better yet 5 full 8GB datafiles and 15 empty)

Can someone point me in the right direction on how to move the data
around so that dont have 20 partially filled datafiles?

I have noticed that I can shrink a single file and use the "empty the
file option (and move data to other files in the group)." option. I
have already done this to the last 2 datafiles as a test but not sure
how to do this on a large scale. I have also set the 1st 10 datafiles
to be able to grow to 8 GB.

For lack of a better way to say this, Is there a way to defrag or
reorganize the data\tables so everything "moves to the front".

BTW, I have already run a maintenance plan to reorganize the data and
index pages.

Jul 23 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
3925
by: Cherrish Vaidiyan | last post by:
hello, Thanx for the suggestions on my Listener query. Now i am performing a simple work.. STANDBY DATABASE creation. I have followed the instraction from Oracle 9i Release 1 documentation but have some doubts. here are the basic stpes i followed. 1 Either make a new backup of the primary database datafiles or access
0
3340
by: Cherrish Vaidiyan | last post by:
sir, The following are the steps that i followed in setting up standby database on Red hat Linux 9. i am using Oracle 9i. i have followed the steps in this site : http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96653/create_ps.htm#66206 Still i give the steps i followed. Preparing the Primary Database for Standby Database Creation
1
3345
by: LizP | last post by:
Hi, guys - looking for a bit of help/advice on moving a database from SQL 7 to SQL 2000. We've a third party application which currently uses a SQL7 database. This database has a number of views which are owned by user INFORMATION_SCHEMA and are set as system tables. This user doesn't actually have a login on the SQL server. We've tried the following to recreate the database on SQL2000, but whatever we try, the views owned by...
2
2225
by: Jaeger | last post by:
Hi all. I'm having trouble shrinking a database. In short, using the SQL Query Analyzer, I enter the following commands: DBCC SHRINKDATABASE (database, 80) GO The command returns the expected 'DBCC execution completed.' response, but
6
3096
by: Jens | last post by:
I have a database file LEAR_Index(yes, it hold index data) from a have have recently removed a bunch of data. It is about 120 Gb, 100Gb of which is not used. I wan´t to shrink the file to lean 30-40Gb. I´ve been trying this: dbcc shrinkfile('LEAR_Index',40000) But to no apparent avail; the file did not shrink.
1
1635
by: jeffreyv | last post by:
Hi! I'm studying to have my MCSE 70-228 certification and I'm trying some things with backing up transaction logs and shrinking it. Here's what I do: There is no activity in the database by the way. I have a transaction log of 1792 kb...
6
2146
by: David Waz... | last post by:
Moved an app from W/2000 Asp V1.0 to W/2003, VS/2003, ASPV 1.1 Page runs a long job, uploading 2 large fixed length files (300,000 rows) into SQL database. A process is run against the data, and altered flat-files produced. The job aborts at EXACTLY 105 seconds (1 min, 45 seconds) regardless of WHERE in the process we are - could be DB read, DB write, string manipulation - whatever.
2
1567
by: William | last post by:
I've been tasked with taking over the support for a client's SQL Server database. I'm not a DBA by profession, I'm a software developer who uses SQL Server as a database designer. The clients have reported that the server is running out of disk space and examination shows that the log files for several of the databases are at 5Gb or more. After reading around the subject I suggested the following sequence of operations:
5
2207
by: lyealain | last post by:
waht should i do to recover the database after i reinstall the mysql .. i did not export the previous database table out... GOD... i still have the ibdata1 which is more than 800MB in my Mysql Datafiles ... there is 1 folders in mysql/data which contains the database... i had put that previous data from mysql/data into my current installed mysql/data... but i find no way to put that ibdata1 from MYSQL/datafiles back to the current...
0
9571
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9405
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10169
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9960
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8838
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7383
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6655
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
3930
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3533
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.