https://login.veeam.com/en/oauth?client_id=nXojRrypJ8&redirect_uri=https%3A%2F%2Fwww.veeam.com%2Fservices%2Fauthentication%2Fredirect_url&response_type=code&scope=profile&state=eyJmaW5hbFJlZGlyZWN0TG9jYXRpb24iOiJodHRwczovL3d3dy52ZWVhbS5jb20va2IyMDI3IiwiaGFzaCI6Ijc5MjZhNGJmLTM0MjgtNDg0Ny05OGI5LTEyYTY1YTNjYzNhMSJ9
1-800-691-1991 | 9am - 8pm ET
EN

Job reports warning "Failed to truncate transaction logs for SQL instances: Possible reasons: lack of permissions, or transaction log corruption."

Challenge

Job may report warning: "Failed to finalize guest processing. Details: Failed to process 'TruncateSQLLog' command. Failed to truncate transaction logs for SQL instances: <instance name>. Possible reasons: lack of permissions, or transaction log corruption."

Solution

SQL logs truncation is done under user account specified in AAIP in Job settings, if it fails then GuestHelper tries to truncate transaction logs under LocalSystem account.

In order to understand why SQL logs truncation failed you will need to open the GuestHelper log on the Guest VM, and search for "Truncation Statistics".

  • Windows 2008 or later
    \\GUESTVM\c$\ProgramData\Veeam\Backup\VeeamGuestHelper_%date%.log
  • Windows 2003
    \\GUESTVM\c$\Documents and Settings\All Users\Application Data\Veeam\Backup\VeeamGuestHelper_%date%.log

Known Errors and Solutions

  1. Error: OpenFromInitializationString failed. [Login failed for 'DOMAIN\user'.]
    Solution: give DOMAIN\user permissions on SQL instance and add db_backupoperator role for all FULL and BULK databases, or give it a sysadmin role.
     
  2. OLEDB Error: 'The server principal "DOMAIN\user" is not able to access the database "DATABASE" under the current security context.', HelpCtx: '0'
    Solution: give DOMAIN\user db_backupoperator role for all FULL and BULK databases, or give it a sysadmin role.
     
  3. OLEDB Error: 'BACKUP detected corruption in the database log. Check the error log for more information.', HelpCtx: '0'
    Solution: error points to possible corruption and issues with SQL server
     
  4. OLEDB Error: 'BACKUP LOG cannot be performed because there is no current database backup.'

    As a rule this is an issue with the secondary node of the SQL always on cluster. You can solve this by making a backup of the DB in question via SQL Management Studio. Otherwise, you can set the secondary node as primary for just one run of your backup job. As a result all its DBs will be backed up without "copy only" flag and the error will disappear.

    The issue occurs when the secondary node has always been backed up with "copy only" flag and its standalone DBs do not have any full backup. Thus during the truncation of the standalone DB logs we get the above-mentioned message.

    The same solution applies if you get this message with regard to the excluded vCenter database / Veeam database.
     
  5. "Query timeout expired" 
Veeam Backup & Replication: If you see this entry in VeeamGuestHelper log, it usually means that we couldn't truncate SQL logs in allotted time (by default timeout is only 60 seconds). Usually you might experience such issues with rather large databases, and with large amount of transaction logs
Solution: Implement the following registry value in affected VMs in [HKLM\SOFTWARE\Veeam\Veeam Backup and Replication\] and [ HKLM\SOFTWARE\Wow6432Node\VeeaM\Veeam Backup and Replication] (if either location does not exist, create it): Try to expand that value and run a backup afterwards, safe guess here is to set it for 600 seconds.
SqlExecTimeout
Type: REG_DWORD
Default value: 60 (in seconds, decimal)
Veeam Agent for Microsoft Windows: If you see this entry in Job log, it usually means that we couldn't truncate SQL logs in allotted time (by default timeout is 300 seconds). Usually you might experience such issues with rather large databases, and with large amount of transaction logs.
 Implement the following registry value on affected machines in [HKLM\SOFTWARE\Veeam\Veeam Endpoint Backup] 
SqlExecTimeout
Type: REG_DWORD
Default value: 300 (in seconds, decimal)
Try to expand that value and run a backup afterwards, safe guess here is to set it for 1800 seconds.
 

More information

 

If you observe the following warning "Failed to truncate transaction logs for SQL instances: MICROSOFT WID" on Veeam B&R version 8.0.0.2084, please contact Veeam Support for the hot-fix.

KB ID:
2027
Product:
Veeam Agent for Microsoft Windows, Veeam Backup & Replication
Version:
VBR 8.x and higher, VAW 2.x and higher
Published:
2015-04-28
Last Modified:
2020-08-13
Languages:
IT | FR | ES
Please rate how helpful this article was to you:
1.2 out of 5 based on 12 ratings
Thank you for helping us improve!
An error occurred during voting. Please try again later.

Couldn't find what you were looking for?

Below you can submit an idea for a new knowledge base article.
Report a typo on this page:

Please select a spelling error or a typo on this page with your mouse and press CTRL + Enter to report this mistake to us. Thank you!

Spelling error in text

Knowledge base content request
By submitting, you agree that your personal data will be managed by Veeam in accordance with the Privacy Policy.

ty icon

Thank you!

We have received your request and our team will reach out to you shortly.

OK

error icon

Oops! Something went wrong.

Please go back try again later.