Friday, February 24, 2012

Drive out of space

Hello,
The drive my DB is on only has 10 % space available. Would the Shrink
option free up some space for this DB?
Thanks
Hi,
Check the usage of database using
use dbname
go
sp_spaceused @.updateusage='true'
For LDF file see
dbcc sqlperf(logspace)
If either of MDF or LDF have space you can backup the database and shrink
the file
If LDF can be shrunk then:-
1. Backup the transaction log or truncate the transaction log
2. dbcc shrinkfile
Thanks
Hari
MCDBA
"Craig Alexander" <craig@.itas.net> wrote in message
news:2582929c.0407090906.4da4e71e@.posting.google.c om...
> Hello,
> The drive my DB is on only has 10 % space available. Would the Shrink
> option free up some space for this DB?
>
> Thanks
|||Beware that using the updateusage=true option will run DBCC UPDATEUSAGE on
all the tables using table S locks, effectively making them read-only during
the operation.
Paul Randal
Dev Lead, Microsoft SQL Server Storage Engine
This posting is provided "AS IS" with no warranties, and confers no rights.
"Hari Prasad" <hari_prasad_k@.hotmail.com> wrote in message
news:eVYPLfdZEHA.2844@.TK2MSFTNGP12.phx.gbl...
> Hi,
> Check the usage of database using
> use dbname
> go
> sp_spaceused @.updateusage='true'
> For LDF file see
> dbcc sqlperf(logspace)
> If either of MDF or LDF have space you can backup the database and shrink
> the file
> If LDF can be shrunk then:-
> 1. Backup the transaction log or truncate the transaction log
> 2. dbcc shrinkfile
> Thanks
> Hari
> MCDBA
> "Craig Alexander" <craig@.itas.net> wrote in message
> news:2582929c.0407090906.4da4e71e@.posting.google.c om...
>

No comments:

Post a Comment