Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 unused space is too large, how to shirnk it ?

Author  Topic 

hydonlee
Starting Member

3 Posts

Posted - 2003-12-28 : 22:01:26
Dear ALL,

I have some database whose size is very big, up to 3GB. But I know the data and index is not so many.

Run "sp_spaceused " on one of it "MRP_01", I get the return:
	
database_name database_size unallocated space
--------------------------- ------------------ ------------------
MRP_01 2244.94 MB 290.31 MB

reserved data index_size unused
------------- ------------------ ---------------- ------------------
2000256 KB 661352 KB 115088 KB 1223816 KB

so, the unused space "eat" a lot of space of reserved.

I run "DBCC shinkdatabase " and "DBCC shinkfile", but no exciting result.

Then I create a new database named "MRP_Test" with default paramater, and import all the objects & data from "MRP_01".
Run " sp_spaceused " on "MRP_Test", return the result:

database_name database_size unallocated space
---------------- ------------------ ------------------
MRP_Test 736.69 MB 61.30 MB

reserved data index_size unused
------------- ------------------ ------------------ --------
675024 KB 577952 KB 92920 KB 4152 KB

The Database reserved space and database_size tone down.

I want to know:

1.What can grow my database ? and why "unused" is too big?
2.What can I do to keep my database thin?

Thanks.

---------------
Thank ALL for ALL

derrickleggett
Pointy Haired Yak DBA

4184 Posts

Posted - 2003-12-29 : 16:15:10
Run DBCC INDEXDEFRAG on your indexes, then do a DBCC SHRINKDB. This should take care of your problem. FYI, if your transaction log is very big, when you restore, your database will be considerable smaller.

MeanOldDBA
derrickleggett@hotmail.com

When life gives you a lemon, fire the DBA.
Go to Top of Page
   

- Advertisement -