February 17, 2003 at 2:37 pm
Has anyone else had this problem?
In both 7.0 and (now) 2000, when I
use DBCC SHRINKDATABASE, I can shrink the DB itself--but when I set up a
maintenance plan to shrink, say, weekly, for all 150+ DBs in our system, it
uses xp_sqlmaint, which doesn't work.
In my tests, first I try xp_sqlmaint, and it always--ALWAYS--takes just 1 second, even on large DBs. Then I run dbcc shrinkdatabase, and it shrinks.
Even if I tell sqlmaint to leave only 1%
free space for DBs over 1 MB (which should catch everything), it still won't
shrink the DB proper.
I have obtained and used the very nice script to shrink bloated log files, but this is different. If I change the SQL Server Agent job to use DBCC I won't get the benefits of xp_sqlmaint,
like easily telling it which DBs to do (in the maintenance plan), doing more than one operation in the same job, and getting a log file (and automatically deleting old logs).
February 20, 2003 at 8:00 am
This was removed by the editor as SPAM
February 20, 2003 at 9:32 pm
There is a great script for shrinking databases on this website and it works great both for SQL 7.0/2000(some changes need to be done for SQL 2000. I'm not sure where the script is right now but i have downloaded and will post it tomorrow.
February 20, 2003 at 9:40 pm
Below is the link for a script which shrinks log.
http://www.sqlservercentral.com/scripts/contributions/26.asp
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply