症状

请考虑以下情形:

  • 卸载现有的 Microsoft SQL Server 2008 R2 表达与高级服务实例。

  • 您的高级服务安装 Microsoft SQL Server 2012年速成版一个的实例。


在这种情况下,如果您尝试在 Microsoft SQL Server 管理 Studio 中打开新的查询窗口中收到以下错误消息︰

未注册的库。(从 HRESULT 异常︰ 0x8002801D (TYPE_E_LIBNOTREGISTERED))


此外,当您单击详细信息,您会收到以下错误消息︰

Program Location:
at EnvDTE._DTE.get_Properties(String Category, String Page)
at Microsoft.SqlServer.Management.UI.VSIntegration.Editors.EditorFactorySql.CreateEditorInstance(IServiceProvider serviceProvider, Boolean storeActiveConnIfNeeded, String moniker)
at Microsoft.SqlServer.Management.UI.VSIntegration.Editors.EditorFactoryBase.Microsoft.VisualStudio.Shell.Interop.IVsEditorFactory.CreateEditorInstance(UInt32 createFlags, String moniker, String physicalView, IVsHierarchy hierarchy, UInt32 itemId, IntPtr existingDocData, IntPtr& docViewIntPtr, IntPtr& docDataIntPtr, String& caption, Guid& cmdUIGuid, Int32& result)
at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
at Microsoft.SqlServer.Management.UI.VSIntegration.Editors.ScriptFactory.CreateNewScript(String strFullPathToScript, IVsProject projectToAddScriptTo, UIConnectionGroupInfo connectionInfoList, IDbConnection liveCon, String rootName)
at Microsoft.SqlServer.Management.UI.VSIntegration.Editors.ScriptFactory.CreateNewScript(String strFullPathToScript, IVsExternalFilesManager extFileMgr, UIConnectionGroupInfo connectionInfoList, IDbConnection liveCon, String rootName)
at Microsoft.SqlServer.Management.UI.VSIntegration.Editors.ScriptFactory.CreateNewScript(String strFullPathToScript, UIConnectionGroupInfo connectionInfoList, IDbConnection liveCon, String fileRoot)
at Microsoft.SqlServer.Management.UI.VSIntegration.Editors.ScriptFactory.CreateNewScript(String strFullPathToScript, UIConnectionInfo ci, IDbConnection liveCon)
at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.NewQueryMenuHandler.Invoke()
at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.ToolsMenuItemBase.MenuInvokedHandler(Object sender, EventArgs args)


解决方法

要变通解决此问题,请执行以下步骤︰

  1. 单击开始,单击运行,在打开框中,键入注册表编辑器,然后单击确定

  2. 在注册表编辑器中,找到下面的项︰

    HKEY_CLASSES_ROOT\TypeLib

  3. 如果子项 {91A74EB0-EFA0-482B-B43C-35CFC74B275F} 存在,请将其删除。

  4. 退出注册表编辑器。

  5. 单击开始,单击运行,在打开框中,键入cmd ,然后单击确定

  6. 到命令提示符窗口中,键入以下内容,然后按 enter 键︰

    C:\Windows\Microsoft.NET\Framework\v4.0.30319\regtlibv12.exe "C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\dteproperties.tlb"

  7. 您应该收到有关注册成功的消息。

  8. 重新启动 SQL Server 管理 Studio。


状态

Microsoft 已经确认这是“适用于”一节中列出的 Microsoft 产品中的问题。

详细信息

有关详细信息,请参阅Microsoft 连接反馈 ID: 761226

Need more help?

Expand your skills
Explore Training
Get new features first
Join Microsoft Insiders

Was this information helpful?

How satisfied are you with the translation quality?
What affected your experience?

Thank you for your feedback!

×