One of my friend sent an email that backups of a SQL Server 2016 instance are failing suddenly when the backups run through the Commvault backup tool. The error is:
Error Code: [30:325]
Description: Error encountered during backup. Error: [System.IO.FileNotFoundException:Could not load file or assembly 'Microsoft.SqlServer.BatchParserClient, Version=220.127.116.11, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. The system cannot find the file specified. Could not load file or assembly 'Microsoft.SqlServer.BatchParserClient, Version=18.104.22.168, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. The system cannot find the file specified.]
In below screenshot, backups status fails with error code [30:325] in Commvault console.
When logged into SQL Server machine and investigated the logs to identify if any recent changes on SQL instance. In C:\Program Files\Microsoft SQL Server\130\Setup Bootstrap\Log\summary.txt shows that SQL Server 2008 R2 was upgraded the previous night to SQL Server 2016. Then the backup starts failing. You can also find installed date in add/remove program features in control panel.
In below screenshot, Control planeàPrograms and Features showing installed date
For a successful backup or restore of the SQL server that has Microsoft SQL Server 2016 or its components installed, complete the following high-level steps.
Note: Follow these steps only if you are working on Commvault V10 SP14 or V11 SP5 and earlier.
From the Windows Registry Editor, create a new registry key using the following details:
Subkey: HKEY_LOCAL_MACHINE\SOFTWARE\CommVault Systems\Galaxy\Instance###\MSSQLAgent
In below screenshot, Add new registery key as SqlFactoryUse40.
At the ContentStore Base directory, create a config file named SQLBackup.exe.config, and add the following XML content to this file:
<?xml version="1.0" encoding="utf-8" ?>
<supportedRuntime version="v4.0" />
In below screenshot, I have created the SQLBackup.exe.config file.
To manually register a new DLL to V4 .NET Framework, at the command prompt, go to the %SystemRoot%\Microsoft.Net\Framework64\v4.0.30319 directory, and type one of the following commands.
RegAsm.exe "<<Program Files\Commvault\Simpana\Base>>\CvSQLSmoV4Factory.dll"
Restart Commvault services on the client. In below screenshot, I have registered the .dll manually.
Now run the backup job in the Commvault tool. It runs successfully. In below screenshot, Commvault console shows backup status
For more information: http://kb.commvault.com/article/SQL0019
Ganapathi varma Chekuri
Lead SQL DBA, MCP