Reindex you database first, then you'll be able to shrink it.
To rebuild all indexes on one table you can use:
DBCC DBREINDEX (table_name, '', 80)
(80 is a fillfactor there, use what you need))
or to reindex everything in you database you can use:
use database_name
EXEC sp_MSforeachtable @command1="print '?' DBCC DBREINDEX ('?')"
Julia
-----Original Message-----
From: Phalgun Jana [mailto:[Email Address Removed] Friday, June 20, 2003 10:26 AM
To: LazyDBA.com Discussion
Subject: Problems with the SHRINK Command
Hello gurus,
My database is currently running on SQL Server 7.0 and
the size of the DB is around 12 GB out of which 3 to 4
GB is free space.
I have tried the SHRINK this database using the
Enterprise Manager as well as T-SQL, but no luck.
Is anybody experienced this problem and any work
around to this problem is highly appreciated?
Thanks
__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com
---------------------------------------------------------------------
TO REPLY TO EVERBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY
To unsubscribe, e-mail: mssqldba-[Email Address Removed] additional commands, e-mail: mssqldba-[Email Address Removed]MS Sql Server LazyDBA home page