|
Home > Archive > microsoft.public.sqlserver.server > June 2002 > shrink log 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]
|
|
| Richard Siddaway 2002-06-28, 6:25 am |
| you need to use
BACKUP LOG marketing_leads WITH TRUNCATE_ONLY before you
try to shrink the log file
>-----Original Message-----
>I have a redundant database that has a large log file
that is virtually
>empty. I would like to keep the database online but want
to maximise the
>disk useage. When I run the following command the log
file size does not
>reduce below 620mb even though there is only 15mb of data
in the log file.
>Is this because the 620mb is the default log file size,
if so how do I
>change it ?
>
>use marketing_leads
>dbcc shrinkdatabase (marketing_leads)
>dbcc shrinkfile (marketing_leads_log)
>
>
>.
>
| |
| Paul Farnell 2002-06-28, 6:25 am |
| Ok I ran that and it has worked perfectly. Where is the backup though ?
"Richard Siddaway" <rsiddaw@hotmail.com> wrote in message
news:1138b01c21e99$63bbd940$37
ef2ecf@TKMSFTNGXA13...
> you need to use
>
> BACKUP LOG marketing_leads WITH TRUNCATE_ONLY before you
> try to shrink the log file
>
>
> >-----Original Message-----
> >I have a redundant database that has a large log file
> that is virtually
> >empty. I would like to keep the database online but want
> to maximise the
> >disk useage. When I run the following command the log
> file size does not
> >reduce below 620mb even though there is only 15mb of data
> in the log file.
> >Is this because the 620mb is the default log file size,
> if so how do I
> >change it ?
> >
> >use marketing_leads
> >dbcc shrinkdatabase (marketing_leads)
> >dbcc shrinkfile (marketing_leads_log)
> >
> >
> >.
> >
| |
| Richard Siddaway 2002-06-28, 7:25 am |
| if you want to backup the log files you should run a full
backup or a specific log backup - see the backup article
in books on line for the syntax
It doesn't actually produce a backup file just marks the
parts of the log file holding completed transactions so
that they can be removed.
The article - Truncating the Tranaction log in books on
line explains the log file structure and what actually
happens when you truncate the log file and then shrink it.
>-----Original Message-----
>Ok I ran that and it has worked perfectly. Where is the
backup though ?
>
>"Richard Siddaway" <rsiddaw@hotmail.com> wrote in message
> news:1138b01c21e99$63bbd940$37
ef2ecf@TKMSFTNGXA13...
>> you need to use
>>
>> BACKUP LOG marketing_leads WITH TRUNCATE_ONLY before you
>> try to shrink the log file
>>
>>
>> >-----Original Message-----
>> >I have a redundant database that has a large log file
>> that is virtually
>> >empty. I would like to keep the database online but
want
>> to maximise the
>> >disk useage. When I run the following command the log
>> file size does not
>> >reduce below 620mb even though there is only 15mb of
data
>> in the log file.
>> >Is this because the 620mb is the default log file size,
>> if so how do I
>> >change it ?
>> >
>> >use marketing_leads
>> >dbcc shrinkdatabase (marketing_leads)
>> >dbcc shrinkfile (marketing_leads_log)
>> >
>> >
>> >.
>> >
>
>
>.
>
|
|
|
|
|