Resolving a transaction log full error

Is it possible to handle a transaction log full error in T-SQL ? I have one T-SQL for DBCC DBREINDEX which is scheduled in the background once weekly. In this script I identify tables with scan density < 90 % and do DBCC DBREINDEX for all those tables in a loop. Even though the transaction log backup is scheduled in 10-minute frequencies, sometimes the transaction log becomes full and the process terminates. Is there is any possibility to handle the 9002 error in the same script in order to put a pause for 30 or 35 minutes (by the time transaction log backup will happen) and continue the process with the remaining tables? If possible, checking the transaction log used percentage will also be a help to me.

We are using MS SQL Server 2000 with SAP R/3 4.6C. Our database size is 219 GB and transaction log size is 19 GB. Further increase of the size of the transaction log is a constraint now. Moreover, in the normal run, even though we back up the transaction log at a two-hour duration, the percentage of use is very nominal.

    Requires Free Membership to View

I would suggest moving to using indexdefrag which will have a lower impact on the size of your transaction log files.

 

For More Information

This was first published in June 2004

Join the conversationComment

Share
Comments

    Results

    Contribute to the conversation

    All fields are required. Comments will appear at the bottom of the article.