[dba-SQLServer] Shrinking log file

Mark.Whittinghill at protective.com Mark.Whittinghill at protective.com
Fri Feb 10 13:40:07 CST 2006


Thanks, but is there a way to decrease the allocated size of an existing 
log?

For example, say my log has 200MB allocated.  Perhaps I can shrink it to 
20MB, but it still has 200 allocated.  I am so far unable to decrease the 
size allocated.

Mark Whittinghill
Sr. Programmer Analyst
Protective - Asset Protection Division
636.536.5720
Mark.Whittinghill at protective.com



"Eric Barro" <ebarro at verizon.net> 
Sent by: dba-sqlserver-bounces at databaseadvisors.com
02/10/2006 01:15 PM
Please respond to
dba-sqlserver at databaseadvisors.com


To
<dba-sqlserver at databaseadvisors.com>
cc

Subject
Re: [dba-SQLServer] Shrinking log file






Mark,

You can do that using EM. Go into the properties and look for the log file
and specify a log file size. You will need to schedule a job that will
shrink the log file periodically because once you set a limit it will
complain when it reaches that limit and all your SQL operations will come 
to
a standstill.

Basically the drill is...

1. Set your tlog filesize to something you are comfortable with.
2. Create a backup job that backs up the tlog.
3. Create a shrink job that shrinks the tlog right after it is backed up.

This will ensure that your tlog is optimized.

Eric 










-----------------------------------------
Confidentiality Notice: This e-mail communication and any
attachments may contain confidential and privileged information for
the use of the designated recipients named above. If you are not
the intended recipient, you are hereby notified that you have
received this communication in error and that any review,
disclosure, dissemination, distribution or copying of it or its
contents is prohibited. If you have received this communication in
error, please notify me immediately by replying to this message and
deleting it from your computer. Thank you.



More information about the dba-SQLServer mailing list