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 2000 Forums
 SQL Server Administration (2000)
 T-Log size after Full backup

Author  Topic 

CanadaDBA

583 Posts

Posted - 2005-09-19 : 11:16:18
During the day, from 6am to 8pm I have t-logs every hour.
After business hours, I get a Full backup
Then run the Optimization and Integrity maintenance Jobs
And at last, I get another full backup
But the first T-Log at 6am next day is too big. Why?

I thought a full backup truncates the T-Log.


Canada DBA

chen149
Starting Member

19 Posts

Posted - 2005-09-19 : 11:36:15
You have to backup the log file itself
Go to Top of Page

sachinsamuel
Constraint Violating Yak Guru

383 Posts

Posted - 2005-09-19 : 12:08:13
Hi Farhadr,

You absolutely right. I doubt there may be some jobs which are used to defrag the database and causes increase in T-Log?

Regards
Sachin
Go to Top of Page

CanadaDBA

583 Posts

Posted - 2005-09-19 : 12:45:00
Would you please explain more. I backup the log file every hour up to 8pm and next backup is 6am. Do you mean that we have a full backup for logs as well?
quote:
Originally posted by chen149

You have to backup the log file itself



Canada DBA
Go to Top of Page

eyechart
Master Smack Fu Yak Hacker

3575 Posts

Posted - 2005-09-19 : 12:52:46
full backup doesn't truncate the tlogs.

the reason your first tlog backup of the morning is large is because of your optimization job. The optimization job is rebuilding all indexes (including cluster indexes) and all of these operations are logged.




-ec
Go to Top of Page

CanadaDBA

583 Posts

Posted - 2005-09-19 : 12:53:05
Hi Sachin,

Yes, there are optimization jobs on my DB.

I think the fact is that the Full Backup doesn't truncate the TLog and I need to shrink the TLog or DB, AFTER I got the full backup.

Thanks,
quote:
Originally posted by sachinsamuel

Hi Farhadr,

You absolutely right. I doubt there may be some jobs which are used to defrag the database and causes increase in T-Log?

Regards
Sachin




Canada DBA
Go to Top of Page

eyechart
Master Smack Fu Yak Hacker

3575 Posts

Posted - 2005-09-19 : 12:57:53
quote:
Originally posted by farhadr

Hi Sachin,

Yes, there are optimization jobs on my DB.

I think the fact is that the Full Backup doesn't truncate the TLog and I need to shrink the TLog or DB, AFTER I got the full backup.

Thanks,
quote:
Originally posted by sachinsamuel

Hi Farhadr,

You absolutely right. I doubt there may be some jobs which are used to defrag the database and causes increase in T-Log?

Regards
Sachin




Canada DBA




I think it is because of your nightly optimization job.



-ec
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2005-09-19 : 13:36:50
"I need to shrink the TLog or DB, AFTER I got the full backup"

No, do not shrink them!!!!. They will just grow back again the following night when the optimisation runs. And the new LDF file will be more fragmented, and will take "effort" to create.

If the size of the LDF is bothering you ether disable TLogging during Optimisation or make TLog backups MORE frequently during optimisation.

If the size of the LDF is <= 120% of the MDF, and you are not desperate for disk space, then just leave it alone!

Kristen
Go to Top of Page

Thrasymachus
Constraint Violating Yak Guru

483 Posts

Posted - 2005-09-19 : 14:13:17
if it is the optimization jobs, you could always change the recovery mode before and after the job. and somewhere in the back of my feeble mind I remember something about moving the job of index creation to the tempdb.

====================================================
Regards,
Sean Roussy

"pimpin ain't easy, but someone has to do it" -- Pimpin Whitefolks(?)
Go to Top of Page

Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)

7020 Posts

Posted - 2005-09-19 : 14:16:59
If your database is in full recovery mode, just change it to do transaction log backups every 15 minutes, 24 x 7.


quote:
Originally posted by farhadr

During the day, from 6am to 8pm I have t-logs every hour.
After business hours, I get a Full backup
Then run the Optimization and Integrity maintenance Jobs
And at last, I get another full backup
But the first T-Log at 6am next day is too big. Why?

I thought a full backup truncates the T-Log.


Canada DBA



CODO ERGO SUM
Go to Top of Page

sachinsamuel
Constraint Violating Yak Guru

383 Posts

Posted - 2005-09-19 : 14:27:20
Hi Fargadr,

If you are executing some jobs to defrag the indexes then the T-log will visibly grow.

To avoid this there are 2 ways

1) Change the recovery modely from full to simple.
This will avoid the sql server from logging the defragmenation in log and the growth in log will reduce.

2) While executing the defragmenation of indexes (I hope there must be some cursor based script), execute "Dump Tran <database name> with NO_LOG" in every 50-60 iterations. This will keep on removing the transaction log. I hope you will be performing this activity at off peak hour.


Hope it helps

Regards
Sachin

Go to Top of Page
   

- Advertisement -