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)
 Truncate Transaction Logs

Author  Topic 

adabass
Starting Member

3 Posts

Posted - 2008-12-23 : 15:13:17
Hello,

I recently created a maintenance plan for full database backups for my content DBs. I want to specify truncation of the transaction logs as soon as the DB is backed up, how can I do that?

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2008-12-23 : 15:15:52
Why do you want to do this? What is your database recovery model set to?

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

Subscribe to my blog
Go to Top of Page

adabass
Starting Member

3 Posts

Posted - 2008-12-23 : 15:52:47
The recovery model is set to full and transaction logs end up occupying all the space that we have on the disk, unless we truncate them. We have been doing that manually and want to automate this task right after the backups have been taken.
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2008-12-23 : 15:56:10
Are you backing up the transaction log on a regular basis? We backup ours every 15 minutes. What is your data recovery requirement?

There is no point in using full recovery model with the setup that you just described. Truncating the transaction log invalidates the transaction log chain, which means your transaction log backups (if you have any) are worthless and therefore you have lost the ability to restore to a point in time. Either stop truncating the transaction log or change your recovery model to simple.

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

Subscribe to my blog
Go to Top of Page
   

- Advertisement -