还原数据库时出现Microsoft SQL Server 2008错误

时间:2022-11-29 15:43:13

I've just recently upgraded to SQL Server 2008 from 2005 and when I attempt to restore a database I get the following error...

我刚刚从2005年升级到SQL Server 2008,当我尝试恢复数据库时,我收到以下错误...

"Could not load file or assembly 'Microsoft.SqlServer.Sqm, Version=10.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91"

“无法加载文件或程序集'Microsoft.SqlServer.Sqm,Version = 10.0.0.0,Culture = neutral,PublicKeyToken = 89845dcd8080cc91”

3 个解决方案

#1


I had the same error after a clean install of Sql Server 2008 Express Edition after trying to create a new database.

在尝试创建新数据库后,在干净安装Sql Server 2008 Express Edition后,我遇到了同样的错误。

These are the steps I followed and it worked for me using Windows 7 64 Bit:

这些是我遵循的步骤,它适用于我使用Windows 7 64位:

  1. Copy the file Microsoft.SqlServer.Sqm.dll located on C:\Program Files\Microsoft SQL Server\100\Shared
  2. 复制位于C:\ Program Files \ Microsoft SQL Server \ 100 \ Shared上的Microsoft.SqlServer.Sqm.dll文件

  3. to folder C:\Program Files\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE
  4. 到文件夹C:\ Program Files \ Microsoft SQL Server \ 100 \ Tools \ Binn \ VSShell \ Common7 \ IDE

  5. and C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE.
  6. 和C:\ Program Files(x86)\ Microsoft SQL Server \ 100 \ Tools \ Binn \ VSShell \ Common7 \ IDE。

Then next time I tried to add a database everything came up fine.

然后下次我尝试添加数据库时,一切都很顺利。

#2


I'm not sure of what the exact problem was but I went with the solution of uninstalling SQL Server completely then re-installing. These are the steps I followed...

我不确定确切的问题是什么,但我选择了完全卸载SQL Server然后重新安装的解决方案。这些是我遵循的步骤......

  1. I uninstalled everything SQL Server related I could find in add/remove programs.
  2. 我卸载了在添加/删除程序中可以找到的与SQL Server相关的所有内容。

  3. Ran "CCLeaner" both for programs/windows components and the registry
  4. 对于程序/ Windows组件和注册表都是“CCLeaner”

  5. Removed any left over SQL Server folders from my hard drives which seemed to be from previous SQL Server installations.
  6. 从我的硬盘驱动器中删除了任何遗留的SQL Server文件夹,这些文件夹似乎来自以前的SQL Server安装。

  7. Re-install SQL Server 2008.
  8. 重新安装SQL Server 2008。

And voila everything works.

瞧,一切正常。

#3


It's because the exact verion 10.0.. was not found in the folder where 'ssms.exe' is present.

这是因为在'ssms.exe'所在的文件夹中找不到确切的版本10.0 ..

Solution

Goto the exact folder where 'ssms.exe' is present by going to start menu and typing ssms.exe. then right click the result and click 'open file location'.

通过转到开始菜单并键入ssms.exe,转到'ssms.exe'所在的确切文件夹。然后右键单击结果并单击“打开文件位置”。

In that location try to paste the exact 10.0.. version of 'Microsoft.SqlServer.Sqm'.

在该位置尝试粘贴'Microsoft.SqlServer.Sqm'的确切10.0 ..版本。

you can find the exact version somewhere by searching in the Microsoft Sql Server folders.

您可以通过在Microsoft Sql Server文件夹中搜索找到确切的版本。

In my case it asked for 12.0.0.0 version and i pasted 12.0.2000.8 and it worked like a charm.!!!! cheers.!!!

在我的情况下,它要求12.0.0.0版本,我粘贴12.0.2000.8,它就像一个魅力。干杯。!!!

#1


I had the same error after a clean install of Sql Server 2008 Express Edition after trying to create a new database.

在尝试创建新数据库后,在干净安装Sql Server 2008 Express Edition后,我遇到了同样的错误。

These are the steps I followed and it worked for me using Windows 7 64 Bit:

这些是我遵循的步骤,它适用于我使用Windows 7 64位:

  1. Copy the file Microsoft.SqlServer.Sqm.dll located on C:\Program Files\Microsoft SQL Server\100\Shared
  2. 复制位于C:\ Program Files \ Microsoft SQL Server \ 100 \ Shared上的Microsoft.SqlServer.Sqm.dll文件

  3. to folder C:\Program Files\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE
  4. 到文件夹C:\ Program Files \ Microsoft SQL Server \ 100 \ Tools \ Binn \ VSShell \ Common7 \ IDE

  5. and C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE.
  6. 和C:\ Program Files(x86)\ Microsoft SQL Server \ 100 \ Tools \ Binn \ VSShell \ Common7 \ IDE。

Then next time I tried to add a database everything came up fine.

然后下次我尝试添加数据库时,一切都很顺利。

#2


I'm not sure of what the exact problem was but I went with the solution of uninstalling SQL Server completely then re-installing. These are the steps I followed...

我不确定确切的问题是什么,但我选择了完全卸载SQL Server然后重新安装的解决方案。这些是我遵循的步骤......

  1. I uninstalled everything SQL Server related I could find in add/remove programs.
  2. 我卸载了在添加/删除程序中可以找到的与SQL Server相关的所有内容。

  3. Ran "CCLeaner" both for programs/windows components and the registry
  4. 对于程序/ Windows组件和注册表都是“CCLeaner”

  5. Removed any left over SQL Server folders from my hard drives which seemed to be from previous SQL Server installations.
  6. 从我的硬盘驱动器中删除了任何遗留的SQL Server文件夹,这些文件夹似乎来自以前的SQL Server安装。

  7. Re-install SQL Server 2008.
  8. 重新安装SQL Server 2008。

And voila everything works.

瞧,一切正常。

#3


It's because the exact verion 10.0.. was not found in the folder where 'ssms.exe' is present.

这是因为在'ssms.exe'所在的文件夹中找不到确切的版本10.0 ..

Solution

Goto the exact folder where 'ssms.exe' is present by going to start menu and typing ssms.exe. then right click the result and click 'open file location'.

通过转到开始菜单并键入ssms.exe,转到'ssms.exe'所在的确切文件夹。然后右键单击结果并单击“打开文件位置”。

In that location try to paste the exact 10.0.. version of 'Microsoft.SqlServer.Sqm'.

在该位置尝试粘贴'Microsoft.SqlServer.Sqm'的确切10.0 ..版本。

you can find the exact version somewhere by searching in the Microsoft Sql Server folders.

您可以通过在Microsoft Sql Server文件夹中搜索找到确切的版本。

In my case it asked for 12.0.0.0 version and i pasted 12.0.2000.8 and it worked like a charm.!!!! cheers.!!!

在我的情况下,它要求12.0.0.0版本,我粘贴12.0.2000.8,它就像一个魅力。干杯。!!!