SQL 2012 logs are not being truncated by Veeam

As the title states, I had some problems with truncating logs of my SQL databases when using Veeam. This post will explain why this happened and how you can fix it.

Some days ago, I noticed a disk, which was used for SQL logging, that was filling up quiet rapidly. After some investigation, it seemed that none of the SQL logs were being truncated, as they should be by Veeam after job completion.

In the event logs, I did see that the log was being backed up by Veeam (so the backup portion was running fine):

Log was backed up. Database: VCDB, creation date(time): 2014/02/13(13:36:43), first LSN: 42026:7241:241, last LSN: 42035:24683:1, number of dump devices: 1, device information: (FILE=1, TYPE=DISK: {‘NUL’}). This is an informational message only. No user action is required.

But cleaning the logfile on disk was not occuring. Because the disk was filled up while investigating, I had to find a quick way to gain free capacity. I did this by converting some less critical databases to “Simple” recovery mode, and creating a manual backup in the SQL Management Studio. After the backup was completed, I could shrink the database files and have enough space to continue.

It seems that the Local System account needs sysadmin rights on the SQL server. You can change this by opening up Security under the root level of your SQL server, and opening Logins. Open properties of the NT AUTHORITY\SYSTEM and select the sysadmin permission. See screenshots below.

After applying these settings, re-run your job and see that it’s working now =)

Thanks for reading!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s