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!

Shrink an individual data file WITH REORG

Status
Not open for further replies.

DBAWinnipeg

Programmer
Apr 14, 2004
173
CA
I know through enterprise manager you can shrink the whole db with reorganizing the pages, etc.

Can you do this for an individual datafile?



Thanks in advance!!!

Colin in da 'Peg :)
 
If you click the Files button, you can select the either the db or log file to shrink.
 
ok but once you do that you lose the option to

"Move pages to beginning of file before shrinking"


My problem is that I have a HUGE database and a datafile in that database that has TONNES of free space but I can't shrink it down.

I can't shrink the whole database with Re-org (can't take the performance hit)... but because this datafile has minimal data on it what I would like to do is this

Keep in mind this is my pseudo-code

DBCC SHRINKFILE(Datafile_2, 100) WITH REORG

Is there such an option? REORG?


Thanks in advance!!!

Colin in da 'Peg :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top