SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Unable to shrink Datafile


Unable to shrink Datafile

Author
Message
mahesh.dasoni
mahesh.dasoni
SSC-Enthusiastic
SSC-Enthusiastic (127 reputation)SSC-Enthusiastic (127 reputation)SSC-Enthusiastic (127 reputation)SSC-Enthusiastic (127 reputation)SSC-Enthusiastic (127 reputation)SSC-Enthusiastic (127 reputation)SSC-Enthusiastic (127 reputation)SSC-Enthusiastic (127 reputation)

Group: General Forum Members
Points: 127 Visits: 1025
I had a table which was 100 gb and whole database size was 150 GB.
I have archived that table to another server and dropped the table from the existing server and freed 100 GB space but i am unable to shrink my database as it is giving me the below error:-

File ID 1 of database ID 7 was skipped because the file does not have enough free space to reclaim.
DBCC execution completed. If DBCC printed error messages, contact your system administrator.


sp_spaceused output is as follows::

database_name Database Size unallocated space
test 157449.31 MB 113945.80 MB
matt.newman
matt.newman
Old Hand
Old Hand (338 reputation)Old Hand (338 reputation)Old Hand (338 reputation)Old Hand (338 reputation)Old Hand (338 reputation)Old Hand (338 reputation)Old Hand (338 reputation)Old Hand (338 reputation)

Group: General Forum Members
Points: 338 Visits: 473
Sometimes the file just won't go. Did you check the physical files to make sure that their sizes are as big as the statistics say?

DBCC updateusage

Are you using a TRUNCATE ONLY on the shrinkfile? Did you rebuild all the indexes so table data could be stored at the end of the file?

You are likely to get grilled by a lot of people about to ask why you need to shrink the file to begin with.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search