Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Database Shrink

Status
Not open for further replies.

shultz

Programmer
Oct 28, 2001
42
HK
I've got a serious problem on my SQL Server. Yesterday I noticed that the Drive where I store my Databases is full and it's not letting me store any more data. I tried to clear of all the unwanted data but still it's the same problem.

I noticed that the tempdb has been grown to 3GB and if I look into the tables it's not using any space at all. I tried to truncate the transaction log and also tried to shrink the database. I even restarted the server but still it has not freed up any space. Could anybody tell me how to release the unused space.

The space allocated is 3GB where as the used space is 0 bytes. Any help please.
 
There is an faq for this forum on shrinking issues:

faq183-1534

Is there any help there?
 
Hello again:
Still thinking that the size of tempdb is your problem, so following method 3 in the MS article mentioned above, I used this script below to shrink the data file of my tempdb database from 8 MB to 3 MB.

use tempdb
go
dbcc shrinkfile (tempdev, 3)

Worked fine for me.
(But no warranty implied! Read the article first.)

hope this is on the right track,
bp
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top