Wednesday, March 21, 2012

how to reduce a file (less then initial size)

Hi,
I have created a database with a 20gb initial size.
but I want to reduce this file
how to do this?
because the shrink command doesn't works.
or maybe I have missed an option?
thanks.
jerome.DBCC SHRINKIFLE(<file id>, <target size> )
... Target size, of course, won't go beyond the size of the data in the fil
e
(although you can set it as low as you want -- it won't give you an error
for going too low).
Adam Machanic
SQL Server MVP
http://www.datamanipulation.net
--
"Jj" <willgart@.AAAhotmailBBB.com> wrote in message
news:uxxcdeToFHA.572@.TK2MSFTNGP15.phx.gbl...
> Hi,
> I have created a database with a 20gb initial size.
> but I want to reduce this file
> how to do this?
> because the shrink command doesn't works.
> or maybe I have missed an option?
>
> thanks.
> jerome.|||I think I have typed to wrong command because now this works fine !!!!
I don't understand why before the shrink has never worked...
"Adam Machanic" <amachanic@.hotmail._removetoemail_.com> wrote in message
news:uEiNdyToFHA.2904@.tk2msftngp13.phx.gbl...
> DBCC SHRINKIFLE(<file id>, <target size> )
> ... Target size, of course, won't go beyond the size of the data in the
> file
> (although you can set it as low as you want -- it won't give you an error
> for going too low).
>
> --
> Adam Machanic
> SQL Server MVP
> http://www.datamanipulation.net
> --
>
> "Jj" <willgart@.AAAhotmailBBB.com> wrote in message
> news:uxxcdeToFHA.572@.TK2MSFTNGP15.phx.gbl...
>

No comments:

Post a Comment