Home > Archive > MS SQL Server > September 2005 > Shrink to 0MB Free Space in Data File









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Shrink to 0MB Free Space in Data File
Jim

2005-09-28, 11:23 am

Below are the steps I have taken to shrink a database.
The data file now shows 0MB free.
The log file now shows 0.7MB free.

That all seems good. The database will be set to read-only. So 0MB free
space in the data file should not create any issues, correct?

I've never shrunken a database to this state before, so I'm just concerned
about any unforseen issues.

Thanks,
Jim


-------------------------------------------------------
1. select "Shrink Database".
2. Click on the "Files..." button.
3. Shrink the Data file.
a. Select the data file.
b. Select "Shrink file to : <minimum>".
c. Click "OK".
4. Shrink the Log file.
a. Select the log file.
b. Select "Shrink file to : <minimum>".
c. Click "OK".


Jerry Spivey

2005-09-28, 11:23 am

Jim,

I'm not aware of any issues. Before putting the db in ro you might want to
update all of the statistics for the db. Also, understand putting the db in
ro means that no new users/permissions can be added to the db while in ro.

HTH

Jerry
"Jim" <please.reply@group> wrote in message
news:u5lDNsDxFHA.2072@TK2MSFTNGP14.phx.gbl...
> Below are the steps I have taken to shrink a database.
> The data file now shows 0MB free.
> The log file now shows 0.7MB free.
>
> That all seems good. The database will be set to read-only. So 0MB free
> space in the data file should not create any issues, correct?
>
> I've never shrunken a database to this state before, so I'm just concerned
> about any unforseen issues.
>
> Thanks,
> Jim
>
>
> -------------------------------------------------------
> 1. select "Shrink Database".
> 2. Click on the "Files..." button.
> 3. Shrink the Data file.
> a. Select the data file.
> b. Select "Shrink file to : <minimum>".
> c. Click "OK".
> 4. Shrink the Log file.
> a. Select the log file.
> b. Select "Shrink file to : <minimum>".
> c. Click "OK".
>
>



Jim

2005-09-28, 11:23 am

Thanks for the feedback, Jerry!

I'll update all of the statistics.

Jim

"Jerry Spivey" <jspivey@vestas-awt.com> wrote in message
news:%235tEHMExFHA.596@TK2MSFTNGP12.phx.gbl...
> Jim,
>
> I'm not aware of any issues. Before putting the db in ro you might want
> to update all of the statistics for the db. Also, understand putting the
> db in ro means that no new users/permissions can be added to the db while
> in ro.
>
> HTH
>
> Jerry
> "Jim" <please.reply@group> wrote in message
> news:u5lDNsDxFHA.2072@TK2MSFTNGP14.phx.gbl...
>
>



Hari Prasad

2005-09-28, 8:23 pm

Hi Jim,

Execute the below command when there is less transaction happening

Use dbname
go
sp_spaceused @updateusage = 'TRUE'


The above command will correct the inconsistencies in sysindexes and will
give the right db space usage. AFter this verify the space usage.

Thanks
Hari
SQL Server MVP

"Jim" <please.reply@group> wrote in message
news:u5lDNsDxFHA.2072@TK2MSFTNGP14.phx.gbl...
> Below are the steps I have taken to shrink a database.
> The data file now shows 0MB free.
> The log file now shows 0.7MB free.
>
> That all seems good. The database will be set to read-only. So 0MB free
> space in the data file should not create any issues, correct?
>
> I've never shrunken a database to this state before, so I'm just concerned
> about any unforseen issues.
>
> Thanks,
> Jim
>
>
> -------------------------------------------------------
> 1. select "Shrink Database".
> 2. Click on the "Files..." button.
> 3. Shrink the Data file.
> a. Select the data file.
> b. Select "Shrink file to : <minimum>".
> c. Click "OK".
> 4. Shrink the Log file.
> a. Select the log file.
> b. Select "Shrink file to : <minimum>".
> c. Click "OK".
>
>



Jim

2005-09-29, 11:23 am

Thanks for the tip, Hari!

Jim


"Hari Prasad" < hari_prasad_k@hotmai
l.com> wrote in message
news:uM4C97FxFHA.3312@TK2MSFTNGP09.phx.gbl...
> Hi Jim,
>
> Execute the below command when there is less transaction happening
>
> Use dbname
> go
> sp_spaceused @updateusage = 'TRUE'
>
>
> The above command will correct the inconsistencies in sysindexes and will
> give the right db space usage. AFter this verify the space usage.
>
> Thanks
> Hari
> SQL Server MVP
>
> "Jim" <please.reply@group> wrote in message
> news:u5lDNsDxFHA.2072@TK2MSFTNGP14.phx.gbl...
>
>



Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com