Resizing an existing DB

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Julie (anonymous_at_discussions.microsoft.com)
Date: 05/11/04


Date: Tue, 11 May 2004 01:55:54 -0700

Hi Darren,

Unfortunatly you can't. The smallest size you can shrink
your database to is the size the database was initally set
to when you created it, in this case 20gb.

Although there are lots of ways of doing it, personally I
would save the data, drop the database, recreate it with 1
gb, then copy the database back into it.

J

>-----Original Message-----
>I created a DB with a preallocated size of 20GB and I
need to shink
>this down to a smaller size. If I go into DB properties
and enter a
>new value it says that the size must be greater than the
current size.
>Is there any way to do this? Also when I try and restore
the DB is
>wants 20GB of disk space even though it's only using
about 1GB of
>data. Any help will be muchly appreciated.
>
>Darren.
>.
>



Relevant Pages

  • Re: How do I reduce the physical size of the file?
    ... Switch to the database we are attempting to shrink the logs for. ... DECLARE @LogicalFileName SYSNAME, ... Modified the inner loop so it tested the dx time so long overruns did not ...
    (microsoft.public.sqlserver.server)
  • Re: Transaction log keeps growing
    ... Introduced in SQL Server 7.0 was the ability automatically grow and to ... shrink the physical size of database data and transaction log files. ...
    (comp.databases.ms-sqlserver)
  • Re: How to PURGE a transaction log?
    ... This doesn't shrink the actual file size. ... Make sure you understand backup and restore architecture for 6.5 *really* ... make sure you understand the database architecture regarding database ... doing dummy transactions and DUMP TRANSACTION until the log have moved ...
    (microsoft.public.sqlserver.setup)
  • Re: Shrinking the MDG while Maintaining Indexes
    ... A Reindex or IndexDefrag will essentially rebuild the indexes (or the table ... of data it will probably not grow again unless you shrink it. ... Fragmentation and I will explain all this and more. ... that it seemed like the database grew each night. ...
    (microsoft.public.sqlserver.server)
  • Re: PRIMARY filegroup is full - no its not!
    ... sp_helpdb should report the increased size immediately after the ALTER. ... > auto-shrinking, BUT auto shrink is not turned on. ... > large file size after I expand the file using "ALTER DATABASE DataLoad ... > data files by subtracting the reserved space reported by sp_spaceused ...
    (microsoft.public.sqlserver.server)