You have multiple accounts
Choose the account you want to sign in with.

狀況

請考慮下列情況:

  • 您解除安裝現有的 Microsoft SQL Server 2008 R2 表達與進階服務執行個體。

  • 您可以安裝 Microsoft SQL Server 2012 Express 執行的個體與進階的服務。


在這個案例中,如果您試著在 Microsoft SQL Server Management 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. 按一下 [開始]、按一下 [執行]、在 [開啟] 方塊中輸入 [regedit] ,然後按一下[確定]

  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 Management Studio。


狀態

Microsoft 已確認這是<套用>一節所列出的 Microsoft 產品的問題。

更多的資訊

如需詳細資訊,請參閱Microsoft 連接的意見反應識別碼︰ 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!

×