Sunday, March 25, 2012

Can't shrink DB

Hi,

The DB size (MDF) is getting too big, sp_spaceused returns:

reserved data index unused

1418656 KB 250168 KB 1408 KB 1167080 KB

I've tried both SHRINKFILE and SHRINKDATABASE with all types of options.

The DB designed on SQL 2000 and ported to SQL 2005 EXPRESS, I've laso used DBCC UPDATEUSAGE.

Any ideas?

Thanks,

YP

Hi,

if the size is the initial size of the database file, you won′t be able to shrink it any further. WHats is the initial size ?


Jens K. Suessmeyer.


http://www.sqlserver2005.de

|||

Hi,

The initail size was 120MB.

Thanks,

YP

|||

BTW...... what the command u give to shrinkfil and what the error u gets ..... if any

Madhu

|||

I've tried it with all options:

DBCC SHRINKFILE (FILE_NAME)

also I've tried to set target size, with both notruncate/truncateonly.

I didn't get error

YP

|||

Finally managed to shrink the DB,

I've noticed that every DBCC SHRINKFILE command shrinked the DB in about 4-5%,

so I just executed the command few 10s of time and it shrank to ~200MB.

Thanks,

YP

No comments:

Post a Comment