[dba-SQLServer] Shrinking log file

Eric Barro ebarro at verizon.net
Fri Feb 10 15:59:50 CST 2006


Yes you can do that as well. Go into EM and then right click the database
and then select Shrink Database. When the dialog comes up click Files and
select the transaction log file and keep repeating the shrink operation
until it no longer shrinks. If this is the first time you will probably need
to backup the tlog file. Create a backup device and back up the tlog file
first and then go the shrink operation. 

-----Original Message-----
From: dba-sqlserver-bounces at databaseadvisors.com
[mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of
Mark.Whittinghill at protective.com
Sent: Friday, February 10, 2006 11:40 AM
To: dba-sqlserver at databaseadvisors.com
Subject: Re: [dba-SQLServer] Shrinking log file

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.
_______________________________________________
dba-SQLServer mailing list
dba-SQLServer at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-sqlserver
http://www.databaseadvisors.com




More information about the dba-SQLServer mailing list