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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Shrinking db/datafile

Status
Not open for further replies.

Tomi

Programmer
Nov 19, 2001
57
US
I have a database which has a datafile of 81 gb of which 42 gb has been used and 38 gig is free.
The log file is only 18mb .How do I shrink the datafile/db so that its size would be at 42gb (to regain the free space)?

Thanks
Tomi
 
You use DBCC SHRINKFILE to remove the free space from the file. Be sure to leave enough space for the system to function correctly. I'd also check the growth settings of the data file so that it grows at the correct rate based on your applications needs.

Denny
MCSA (2003) / MCDBA (SQL 2000)

--Anything is possible. All it takes is a little research. (Me)
[noevil]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top