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


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

Re: Help with shrinking a database

From Erland Sommarskog <esquel@sommarskog.se>
Newsgroups comp.databases.ms-sqlserver
Subject Re: Help with shrinking a database
Date 2013-01-11 23:28 +0100
Organization Erland Sommarskog
Message-ID <XnsA145EECF46682Yazorman@127.0.0.1> (permalink)
References <6918100a-d4c7-4714-8f16-20e7334ff1ab@d4g2000vbw.googlegroups.com> <XnsA144D565E90DEYazorman@127.0.0.1> <4c1077a1-7473-4de3-9cfd-d0891270d498@googlegroups.com> <XnsA144ED85EA74CYazorman@127.0.0.1> <09eb6a17-cfbd-4c1a-ad7e-ee5ed25f062e@googlegroups.com>

Show all headers | View raw


Query Builder (querybuilder@gmail.com) writes:
> database_name     database_size     unallocated space
> A_DB              411324.00 MB     196982.09 MB
> 
> reserved     data              index_size     unused
> 215290792 KB     192933232 KB     14584032 KB     7773528 KB

So of a total database size of 215 GB, you have 7 GB of unused space.
This database does not need to shrink - it needs to grow. Exactly
how much depends how data you add to if of course. But the key is
that, while there is an autogrow function, it is nothing you should
rely on, but the database show be pre-grown in a controlled fashion.

Out of the blue, I would suggest adding 50 GB of breathing space.
 
> The issue I am facing is that one of the Data file (A_DATA) is sitting
> on a drive which is 90% filled and We cleared a log table that was
> holding about 90GB space out of this file. I want to release the space
> to that drive. This particular data file is set to not grow. 
 
Well, you might have deleted 90 GB of data, but that does not show in 
the numbers above. Is that log table by chance a heap?

-- 
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 | 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