Error Code [30:325] Error encountered during backup

Article ID: SQL0019 Backup and restore jobs running on a SQL server fail with Error Code [30:325]

Symptom

Backup and restore operations fail on a SQL server with the following error message:

Error Code: [30:325]
Description: Error encountered during backup. Error: [System.IO.FileNotFoundException:Could not load file or assembly 'Microsoft.SqlServer.BatchParserClient, Version=13.0.0.0, 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=13.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. The system cannot find the file specified.]

Cause

Backup and restore operations fail on a SQL server because the server has Microsoft SQL Server 2016 or its components installed.

Resolution

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.

  1. From the Windows Registry Editor, create a new registry key using the following details:

    Name: SqlFactoryUse40

    Subkey: HKEY_LOCAL_MACHINE\SOFTWARE\CommVault Systems\Galaxy\Instance###\MSSQLAgent

    Type: DWORD

    Value: 1

  2. 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" ?>
    <configuration>
    <startup useLegacyV2RuntimeActivationPolicy="true">
    <supportedRuntime version="v4.0" />
    </startup>
    <runtime>
    <NetFx40_LegacySecurityPolicy enabled="true"/>
    </runtime>
    </configuration>
  3. 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.

    For V11:

    RegAsm.exe "<<CommVault\ContentStore\Base>>\CvSQLSmoV4Factory.dll"

    For V10:

    RegAsm.exe "<<Program Files\Commvault\Simpana\Base>>\CvSQLSmoV4Factory.dll"
  4. Restart Commvault services on the client.