I have a lengthy process that contains a transaction for the full duration.
I have no control over how this is done.
Because a transaction remains open for as long as the transaction log is full, SQL Server cannot increase the size of the log file.
Thus, the process crashes with the error "The transaction log for database 'xxx' is full" .
I tried to prevent this by increasing the size of the transaction log file in the database properties, but I get the same error.
Not sure what I should try next. The process runs for several hours, so it’s not easy to play the trial version and errors.
Any ideas?
If anyone is interested, the process is importing an organization into Microsoft Dynamics CRM 4.0.
There is a lot of disk space, we have a log in simple logging mode and backing up the log before the process starts.
- = - = - = - = - UPDATE - = - = - = - = -
Thank you all for the comments. The following - it led me to think that the journal would not grow due to an open transaction:
I get the following error ...
Import Organization (Name=xxx, Id=560d04e7-98ed-e211-9759-0050569d6d39) failed with Exception: System.Data.SqlClient.SqlException: The transaction log for database 'xxx' is full. To find out why space in the log cannot be reused, see the log_reuse_wait_desc column in sys.databases
So, following these tips, I went to the " log_reuse_wait_desc column in sys.databases " and it kept the value " ACTIVE_TRANSACTION ".
According to Microsoft: http://msdn.microsoft.com/en-us/library/ms345414(v=sql.105).aspx
This means the following:
The operation is active (all recovery models). • A long-term transaction may exist at the beginning of a log backup. In this case, another log backup may be required to free up space. For more information, see the “Long Active Transactions” section later in this section.
• Pending transaction (SQL Server 2005 Enterprise Edition and later only). A deferred transaction is actually an active transaction, the rollback of which is blocked due to some inaccessible resource. For information on the reasons for deferred transactions and how to move them from the deferred payment state, see the section Deferred Transactions.
I didn’t understand something?
- = - = - = - UPDATE 2 - = - = - = -
The process has just begun with the original log file size set to 30 GB. It takes a couple of hours.
- = - = - = - Final UPDATE - = - = - = -
The problem was caused by the fact that the log file is consuming all available disk space. In the last attempt, I freed up 120 GB, and he still used all of this and eventually failed.
I did not understand that this was happening earlier, because when the process started all night, it returned to failure. This time I managed to check the size of the log file before rolling back.
Thank you all for your input.