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 Development (2000)
 How to regain database space

Author  Topic 

sarikondak
Starting Member

7 Posts

Posted - 2009-01-29 : 05:15:35
Hi,

I have a table that is occupying 30GB ( 2 billion rows) database. With some code changes I could reduce the rows drastically to 200,000 rows only. If program deletes all rows and inserts 200,000 rows, how recover back the database that has been allocated.

Thanks in advance.

Regards
Raju

RickD
Slow But Sure Yak Herding Master

3608 Posts

Posted - 2009-01-29 : 05:59:10
Look up DBCC SHRINKFILE
Go to Top of Page

sarikondak
Starting Member

7 Posts

Posted - 2009-01-29 : 06:28:28
Thank you sir, I will go through the topic.
Go to Top of Page

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2009-01-29 : 10:41:55
Run sp_spaceused
Go to Top of Page

tosscrosby
Aged Yak Warrior

676 Posts

Posted - 2009-01-29 : 14:47:58
quote:
Originally posted by RickD

Look up DBCC SHRINKFILE



If you do a shrink against the data file, be sure to reindex afterwards as it will totally kill the indexes and performance will be lousy at best.

Terry

-- Procrastinate now!
Go to Top of Page
   

- Advertisement -