Problem solve Get help with specific problems with your technologies, process and projects.

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.

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


For More Information

Dig Deeper on Microsoft SQL Server Installation

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.