November 2, 2010 at 8:27 am
@ sais
As san droid said, backing up the db might affect the shrinking too...
The script which you should run to shrink the mdf files :-
USE dbname
GO
DBCC SHRINKDATABASE(N'dbname', 10, TRUNCATEONLY)
DBCC SHRINKDATABASE(N'dbname', 10)
Regards,
Sushant
Regards
Sushant Kumar
November 2, 2010 at 8:35 am
chris.s.powell (11/2/2010)
As for the rebuild index, it will be recorded in the log file, with a proper backup plan in place, that space will be freed after it is completed.
I'm not having a dig, it was meant as an aside speaking of which.
It will likely grow the data file too, due to the way the indexes are rebuilt. Initially, they are not actually deleted, they are only de allocated.
-----------------------------------------------------------------------------------------------------------
"Ya can't make an omelette without breaking just a few eggs" 😉
November 2, 2010 at 8:38 am
@ chris
Checking integrity and updating stats should be done after the shrinking of the database.
Regards,
Sushant
Regards
Sushant Kumar
Viewing 3 posts - 16 through 18 (of 18 total)
You must be logged in to reply to this topic. Login to reply