Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

transaction log & transactional replication

Status
Not open for further replies.

kitty

Programmer
Oct 18, 2000
2
HK
I have a Ms sql db which always bears a continuous growing transaction log. It seems that there is lots of active transaction log there because the log never drops even I manually make checkpoints. I didn't enable the 'trunc. log on chkpt.' because transactional replication is running. I think tranasactional replication can cause the log grows quickly.

Is there any method that can shrink the log under such situation?

Regards
Kitty [sig][/sig]
 
Normally, transaction logs are shrunk by backing them up. A (nightly) main backup should reset the log, and this can be added to be regular (1/2 hourly) transaction log backups.

There is a server setting that says how long it should take for a restore. This can affect how much transaction log is cleared.

However, I would have to see exactly how replication transfers the transactions to the other machine, and whether it has to somehow mark transactions as sent before they can be cleared from the log? Anyone got any details?

In general, people see the transaction log as some giant file that inexplicably grows and should be truncated as often as possible. There are almost NO situations in which this should be done on a live server. Anyone who does that should write 'the transaction log is my saviour and not my enemy' on the blackboard 100 times. It is of course a log of all the changes that have been made to your database since the last backup, meaning that you could restore your database to almost the last minute before failing....rather than to yesterday's state. Sorry to ramble on, but if your server crashes and you lose a whole days worth of customer orders they are going to kill you! [sig]<p> <br><a href=mailto: > </a><br><a href= home</a><br> [/sig]
 
Make sure that your log reader agent is functioning properly.

Tom
[sig][/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top