Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.databases.ms-sqlserver > #1375

Re: Help with shrinking a database

Path csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!feeder.erje.net!eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail
From Erland Sommarskog <esquel@sommarskog.se>
Newsgroups comp.databases.ms-sqlserver
Subject Re: Help with shrinking a database
Date Thu, 10 Jan 2013 20:58:40 +0100
Organization Erland Sommarskog
Lines 25
Message-ID <XnsA144D565E90DEYazorman@127.0.0.1> (permalink)
References <6918100a-d4c7-4714-8f16-20e7334ff1ab@d4g2000vbw.googlegroups.com>
Mime-Version 1.0
Content-Type text/plain; charset=windows-1252
Content-Transfer-Encoding 8bit
Injection-Info mx04.eternal-september.org; posting-host="102f3b4a812ef50a29978963a1d5bdd7"; logging-data="31052"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+o6cj7ZfgXYCYCEJiOq6Bg"
User-Agent Xnews/2006.08.24 Mime-proxy/2.1.c.0 (Win32)
Cancel-Lock sha1:z3yW1UY6pI+99Txk5MN/9tqx7kc=
Xref csiph.com comp.databases.ms-sqlserver:1375

Show key headers only | View raw


Dom (dolivastro@gmail.com) writes:
> I don't want to kill it, because I think I might lose data.  How do I
> get out of this?

You can kill it; it is transactional.

And there is a very simple way to avoid that this happens again: stop
shrinking your database! Shrinking a database that is going to grow
again is completely pointless. Shrinking is something you should use
only exceptionally. For instance, you take a copy of a production database
for development, but delete most of the data. Or you have had some
accident that inflated the database.

Shrinking introduces lots of defragmentation, so you need to run 
reindexing once shrink has completed (or you have stopped it). And
since reindexing needs free space, the database might grow again...


-- 
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Links for SQL Server Books Online:
SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx
SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx

Back to comp.databases.ms-sqlserver | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Help with shrinking a database Dom <dolivastro@gmail.com> - 2013-01-10 05:15 -0800
  Re: Help with shrinking a database Dom <dolivastro@gmail.com> - 2013-01-10 05:24 -0800
  Re: Help with shrinking a database Erland Sommarskog <esquel@sommarskog.se> - 2013-01-10 20:58 +0100
    Re: Help with shrinking a database Query Builder <querybuilder@gmail.com> - 2013-01-10 13:54 -0800
      Re: Help with shrinking a database Erland Sommarskog <esquel@sommarskog.se> - 2013-01-10 23:20 +0100
        Re: Help with shrinking a database Dom <dolivastro@gmail.com> - 2013-01-11 05:03 -0800
          Re: Help with shrinking a database Erland Sommarskog <esquel@sommarskog.se> - 2013-01-11 14:39 +0100
        Re: Help with shrinking a database Query Builder <querybuilder@gmail.com> - 2013-01-11 13:46 -0800
          Re: Help with shrinking a database Erland Sommarskog <esquel@sommarskog.se> - 2013-01-11 23:28 +0100

csiph-web