Fix: The transaction log for database is full due to 'log_backup' - Dynamics 365FO
If you're encountering the error "The transaction log for database is full due to 'log_backup'" while working with Dynamics 365 Finance and Operations (D365FO), it means your SQL Server transaction log has reached its maximum capacity.
Solution
Follow these steps to resolve the issue:
Step 1: Check the Database Files
Run the following SQL query to check the database file details:
SELECT * FROM sys.database_files
Note down the log file name from the result and use that same name in the second statement of the step 2 SQL query.
Query result screenshot:
Step 2: Shrink the Transaction Log
Execute the following commands to shrink the transaction log and free up space:
ALTER DATABASE AxDB SET RECOVERY SIMPLE; DBCC SHRINKFILE('AxDb_New_log', 0, TRUNCATEONLY); ALTER DATABASE AxDB SET RECOVERY FULL;
Replace 'AxDb_New_log'
with the actual log file name you noted earlier.
Step 3: Start DB synchronization again...this time it should work
..
Follow "Dynamics World" blog also for some other approachTip: Always ensure you have proper database backups before making changes to recovery models.