Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Database size
Message
From
16/09/2002 18:14:58
 
 
To
16/09/2002 13:34:45
General information
Forum:
Microsoft SQL Server
Category:
Database management
Title:
Miscellaneous
Thread ID:
00700882
Message ID:
00701013
Views:
23
DBCC SHRINKDATABASE() and DBCC SHRINKFILE() are the correct tools to use. Are you getting somekind of message?

-Mike

>I have several databases that have a lot of «Unused Space».
>I can't figure out why nor how to free that space.
>Here is the situation:
>
>I have several tables in the database that report the following kind of values from sp_spaceused:
>
>Reserved: 300000 KB
>Data: 38000 KB
>index_size: 2500 KB
>Unused: 258000 KB
>
>But I can't in any way recover this space. Not using dbcc shrinkdatabase nor using dbcc shrinkfile.
>
>The only way I can free the space is to bulk copy the data out of each table and then back in.
>If in the table where I issued the sp_spaceused before (the example above) i do:
>
>select * into newtable from oldtable
>drop oldtable
>
>and recreate the primary keys, indexes, etc. on the new table, when i do a sp_spaceused on this new table i get something like:
>
>Reserved: 21000 KB
>Data: 20000 KB
>index_size: 500 KB
>Unused: 80 KB
>
>
>Can anyone help me please ? How do I recover the space without bulk copying every table out and in ?
Michael Levy
MCSD, MCDBA
ma_levy@hotmail.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform