Symptoms
You receive the following error:
Could not load file or assembly 'Microsoft.SqlServer.BatchParser.dll' or one of its dependencies. The specified module could not be found.
The error text may also include the following details:
An error occurred during executing this statement \r\n IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[<TableName>]') AND OBJECTPROPERTY(id, N'IsTable') = 1) DROP TABLE [<TableName>];: ExecuteNonQuery failed for Database '<DatabaseName>'.
Cause
The server is missing or unable to call a necessary dynamic-link library (dll) file. On a typical machine, you may find multiple copies of Microsoft.SqlServer.BatchParser.dll . However, in some configurations, the dlls installed with TimeXtender and SQL Server Management Studio (SSMS) do not seem to load, while the ones installed with SMO 2016 are.
Resolution
Download Microsoft SQL Server® 2016 Service Pack 2 Feature Pack and install the following packages:
- ENU\x64\SharedManagementObjects.msi
- ENU\x64\SQLSysClrTypes.msi
0 Comments