Drop Table

Support Forum for database administrators and web based access to important newsgroups related to databases
Register on Database Support Forum Edit your profileCalendarFind other Database Support forum membersFrequently Asked QuestionsSearch this forum -> 
For Database admins: Free Database-related Magazines Now Free shipping to Texas


Post New Thread










Thread
Author

Shrink to 0MB Free Space in Data File
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".



Report this thread to moderator Post Follow-up to this message
Old Post
Jim
09-28-05 04:23 PM


Re: Shrink to 0MB Free Space in Data File
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".
>
>



Report this thread to moderator Post Follow-up to this message
Old Post
Jerry Spivey
09-28-05 04:23 PM


Re: Shrink to 0MB Free Space in Data File
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... 
>
>



Report this thread to moderator Post Follow-up to this message
Old Post
Jim
09-28-05 04:23 PM


Re: Shrink to 0MB Free Space in Data File
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".
>
>



Report this thread to moderator Post Follow-up to this message
Old Post
Hari Prasad
09-29-05 01:23 AM


Re: Shrink to 0MB Free Space in Data File
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... 
>
>



Report this thread to moderator Post Follow-up to this message
Old Post
Jim
09-29-05 04:23 PM


Sponsored Links





Last Thread Next Thread
Post New Thread

MS SQL Server archive

Show a Printable Version Email This Page to Someone! Receive updates to this thread
Microsoft SQL Server
Access database support
PostgreSQL Replication
SQL Server ODBC
FoxPro Support
PostgreSQL pgAdmin
SQL Server Clustering
MySQL ODBC
Web Applications with dBASE
SQL Server CE
MySQL++
Sybase Database Support
MS SQL Full Text Search
PostgreSQL Administration
SQL Anywhere support
DB2 UDB Database
Paradox Database Support
Filemaker Database
Berkley DB
SQL 2000/2000i database
ASE Database
Forum Jump:
All times are GMT. The time now is 02:22 PM.

 
Mobile devices forum | Database support forum archive




Copyrights DropTable.com Database Support Forum 2004 - 2006