Bobcares

Could not load file or assembly microsoft sqlserver batchparserclient

by | Mar 27, 2022

Are you stuck with error “Could not load file or assembly microsoft sqlserver batchparserclient”? We can help you.

At Bobcares, we offer solutions for every query, big and small, as a part of our Server Management Service.

Let’s take a look at how our Support Team help a customer  deal with this issue.

How to resolve “Could not load file or assembly microsoft sqlserver batchparserclient” error?

Typically, error looks as shown below:

SQL Attachability check fails with error “Could not load file or assembly ‘Microsoft.SqlServer.BatchParserClient … The system cannot find the file specified”

Usually, the production databases are configure to perform SQL replication.

In order to check if you have SQL databases set for replication follow the steps below:

  • Firstly, open SQL Management Studio in your SQL production server.
  • On the left panel look for “Replication” folder.  Right click over it and go to “Publisher Properties…”
  • Next, on the “Publisher Properties” window go to “Publication Databases”, here you will see list the databases manage by the current SQL Server.

If the checkbox is mark on “Transnational” or/and “Merge” it means that the database in question is set for that type of replication.

How to resolve it?

Today, let us see the steps followed by our Support techs to resolve it.

  • Firstly, create two SQL scripts to disable the database replication temporally and enable it back after the attachability check.

[SQL scripts]:

–Script #1: Disable database replication

use master

exec sp_replicationdboption @dbname = ‘your db name here’,

@optname = ‘publish’,

@value = ‘false’

Go

–Script #2: Enable the database replication

use master
exec sp_replicationdboption @dbname = ‘your db name here’,
@optname = ‘publish’,
@value = ‘true’
Go
  • Next, create two PowerShell scripts to execute the SQL scripts automatically.

Example:

osql -S SQL2016-SRV -U sa -P Passw0rd123 -i “Disable_Replication.sql” -o “Disable_Replication-Out.txt”
osql -S SQL2016-SRV -U sa -P Passw0rd123 -i “Enable_Replication.sql” -o “Enable_Replication-Out.txt”
  • Then, create two schedule tasks to run the PowerShell scripts to disable the database replication before the last recovery point for the SQL server is created and resume it after the attachability check.

Solution1:

For some applications, we need to ensure that we have both 32-bit and 64-bit versions of assemblies found under c:\Windows\assembly.

This Assembly Version=10.0.0.0 has something to do backward compatibility with SQL 2008 or R2 feature pack.

It wasn’t able to list the assembly in the c:\windows\assembly folder.

Before: We can see that missing 64-bit assembly batch parser assembly.

Then, select the respective component as per the processor architecture:

  • x64\SharedManagementObjects.msi
  • x64\SQLSysClrTypes.msi

The SQLSysClrTypes.msi should install first due to its dependency on SharedManagementObjects.

After: We can see the file in c:\Windows\assembly folder

Solution 2:

Remove all references to Microsoft.SqlServer.SOMETHING and replace them with the version you have registered in GAC.

[Need a solution to another query? We are just a click away.]

Conclusion

Today, we saw steps followed by our Support Engineers to resolve microsoft sqlserver error.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Never again lose customers to poor
server speed! Let us help you.