Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 Log file shrink

Author  Topic 

ravilobo
Master Smack Fu Yak Hacker

1184 Posts

Posted - 2008-04-30 : 17:16:56
I have noticed many times, even after log backup, shrink file (SSMS) is not reducing the file size. Even though there is free space shown in SSMS.

Subsequently I change the recovery type to SIMPLE and shrink – that does the trick for me.

Does anyone know why does this happen? Is there a better solution?


------------------------
I think, therefore I am - Rene Descartes

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2008-04-30 : 17:34:01

The better solution is to take frequently log backups like 15-30 min which will keep your log in control.
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2008-04-30 : 17:50:42
Log backup will not change the file size of the tlog. It will change the free space in the file.

By changing the recovery model to SIMPLE, you are breaking the transaction log chain and therefore your ability to restore to a point in time. Hopefully you are performing an immediate full backup after you switch back to FULL so that the chain starts up again.


Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Database maintenance routines:
http://weblogs.sqlteam.com/tarad/archive/2004/07/02/1705.aspx
Go to Top of Page
   

- Advertisement -