Home > Archive > MS SQL Server > October 2006 > DBCC ShrinkFile not shrinking my file









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author DBCC ShrinkFile not shrinking my file
jhoge123@yahoo.com

2006-10-24, 6:28 pm

I have a lot of unused space in my data file for my Sql Server 2005
database, but if I try to get rid of it the mdb file does not get any
smaller.

I tried to use dbcc shrinkdatabase (dbname) and dbcc
shrinkfile(datfilena
me) and had no luck

Thanks,
John

Hari Prasad

2006-10-24, 6:28 pm

Hi,

There should be some open transactions. Execute DBCC OPENTRAN(DBID) and see
if there is any open
transaction to that database. If yes, either wait or kill the process id and
then try to SHRINK the file using
DBCC SHRINKFILE command.

Thanks
Hari
SQL Server MVP

<jhoge123@yahoo.com> wrote in message
news:1158351718.424446.320350@h48g2000cwc.googlegroups.com...
>I have a lot of unused space in my data file for my Sql Server 2005
> database, but if I try to get rid of it the mdb file does not get any
> smaller.
>
> I tried to use dbcc shrinkdatabase (dbname) and dbcc
> shrinkfile(datfilena
me) and had no luck
>
> Thanks,
> John
>



Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2009 droptable.com