|
Home > Archive > MS SQL Server > October 2005 > Re: DBCC Shrinkdatabase /shrinkfile not shrinking my database
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 |
Re: DBCC Shrinkdatabase /shrinkfile not shrinking my database
|
|
| doller 2005-10-20, 8:23 pm |
| Hi Joriz,
If u want to shrink the mdf file then ui have to run srink database
command.
But in most cases that doesnt work.
The process u are following works in ldf files.
If u want to optimise ur logfile on disk.
u have to run this command
backup log database name with truncate_only
dbcc shrinkfile(logical name , size)
HTH
from
Doller
Jerry Spivey wrote:[color=darkred
]
> Joriz,
>
> Just to clarify, this is the .mdf file and not the .ldf file that you're
> trying to shrink correct? What are you specifying for the targetpercent in
> the DBCC SHRINKFILE statement? Do you have exclusive access to the database
> right now?
>
> HTH
>
> Jerry
> <google@joriz.is-a-geek.net> wrote in message
> news:1129585565.049054.249070@g44g2000cwa.googlegroups.com...
| |
| Steen Persson (DK) 2005-10-20, 8:23 pm |
| doller wrote:
> Hi Joriz,
>
> If u want to shrink the mdf file then ui have to run srink database
> command.
> But in most cases that doesnt work.
> The process u are following works in ldf files.
> If u want to optimise ur logfile on disk.
> u have to run this command
> backup log database name with truncate_only
> dbcc shrinkfile(logical name , size)
>
> HTH
> from
> Doller
>
>
> Jerry Spivey wrote:
>
Shrinking the database file doesn't require a SHRINK DATABASE - that can
be done with the DBCC SHRINKFILE command as well.
When you want to shrink your database file (.mdf) you can use the syntax
below :
USE YourDatabaseName
DBCC SHRINKFILE (LogicalDataFileName
, TargetSize)
You can look up the command in Books On Line. If you need to get the
logical file names of your database, you can use sp_helpdb.
HTH
Regards
Steen
|
|
|
|
|