Error message when you run a 32-bit version of SQL Server 2008 on an Itanium-based version of Windows: "The system cannot find the file specified"

Applies to: SQL Server 2008 EnterpriseSQL Server 2008 StandardSQL Server 2008 Express

Symptoms


Consider the following scenario:
  • You run a 32-bit version of Microsoft SQL Server 2008 on an Itanium-based version of Windows.
  • Windows PowerShell is started. Windows PowerShell may be started by SQL Server Agent or by using SQL Server Management Studio.
  • You run the following command:
    cd SQLSERVER:\SQL\SQLPOD030-17\DEFAULT
    invoke-sqlcmd -query "select @@version"
In this scenario, you expect the version information to be displayed. Instead, you receive the following error message:
Invoke-Sqlcmd : Could not load file or assembly 'Microsoft.SqlServer.BatchParser, Version=10.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. The system cannot find the file specified.

At line:1 char:14

+ invoke-sqlcmd <<<< -query "select @@version"

Cause


This problem occurs because, when a 32-bit version of SQL Server 2008 is installed, the 32-bit version of the BatchParser shared component is installed. Because Windows PowerShell is a version-neutral Microsoft .NET Framework application, the application will run natively. Therefore, a 64-bit version of the shared component must be installed.

Workaround


To work around this problem, upgrade the BatchParser assembly to a 64-bit version. To do this, install the following files:
  • SQLSysClrTypes_ia64.msi
  • SharedManagementObjects_ia64.msi
These files are available in the SQL Server 2008 Feature Pack, August 2008. The following file is available for download from the Microsoft Download Center:

Download Download the Microsoft SQL Server 2008 Feature Pack, August 2008 package now.

Status


Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.