July 16, 2007 at 11:46 am
I HAVE A DATABASE OF 47GB. DISK SPACE UNUSED IS 2.5GB. LOG FILE IS AROUND 1.5GB. DATABASE USED IN SQLSEVER 7.0
WHEN I AM EXECUTIVE DBCC SHRINKDATABASE AS FOLLOWS:
DBCC SHRINKDATABASE (CBR_DATA,2,TRUNCATEONLY)
OUTPUT IS :
DbId FileId CurrentSize MinimumSize UsedPages EstimatedPages
------ ------ ----------- ----------- ----------- --------------
8 2 157208 1280 157208 1280
(1 row(s) affected)
DBCC execution completed. If DBCC printed error messages, contact your system administrator.
WHEN I USED sp_spaceused.. following is the output..
database_name database_size unallocated space
-------------------------------------------------------------------------------------------------------------------------------- ------------------ ------------------
CBR_DATA 47785.56 MB -386604.14 MB
reserved data index_size unused
------------------ ------------------ ------------------ ------------------
444815056 KB 17629688 KB 416824672 KB 10360696 KB
IT IS NOT SHRINKING MAN! CAN ANYBODY HELP ME OUT?
July 16, 2007 at 1:22 pm
Are you sure you want that ?
If the answer is "yes" the just remove the truncateonly part!
DBCC SHRINKDATABASE (CBR_DATA)
* Noel
July 16, 2007 at 2:21 pm
I TRIED THIS ONE TOO...
DBCC SHRINKDATABASE(CBR_DATA)
BUT IT IS NOT SHRINKING..
I WANT AN URGENT HELP...SOS
July 16, 2007 at 2:39 pm
Is the DB Replicated ?
* Noel
July 16, 2007 at 2:39 pm
Ok lets try this:
Show me the output of:
USE CBR_DATA
GO
DBCC SQLPERF(LOGSPACE)
and
DBCC OPENTRAN ( CBR_DATA )
* Noel
July 16, 2007 at 2:48 pm
Hi Noel,
Thanks for your prompt response.
I tried sqlperf(logspace) .. it is showing lot of unused space.
opentran is also showing no records..
-dillip
July 17, 2007 at 12:15 am
use
backup log dbname with truncate_only
go
dbcc shrinkfile(2,targetsize)
this should shrink logfile for you.
Cheers,
Sugeshkumar Rajendran
SQL Server MVP
http://sugeshkr.blogspot.com
Viewing 7 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply