DetailPage-MSS-KB

Microsoft small business knowledge base

Article ID: 2849799 - Last Review: May 28, 2013 - Revision: 1.0

Symptoms

Consider the following scenario:
  • You uninstall an existing instance of Microsoft SQL Server 2008 R2 Express with Advanced Services.
  • You install an instance of Microsoft SQL Server 2012 Express with Advanced Services.

In this scenario, if you try to open a new query window in Microsoft SQL Server Management Studio, you receive the following error message:

Library not registered. (Exception from HRESULT: 0x8002801D (TYPE_E_LIBNOTREGISTERED))

Additionally, when you click Details, you receive the following error message:

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)

Workaround

To work around this problem, follow these steps:
  1. Click Start, click Run, type regedit in the Open box, and then click OK.
  2. In Registry Editor, locate the following key:

    HKEY_CLASSES_ROOT\TypeLib

  3. If the subkey {91A74EB0-EFA0-482B-B43C-35CFC74B275F} exists, delete it.
  4. Exit Registry Editor.
  5. Click Start, click Run, type cmd in the Open box, and then click OK.
  6. Type the following into the Command Prompt window, and then press 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. You should receive a message about the registration being successful.
  8. Restart SQL Server Management Studio.

Status

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

More information

For more information, see Microsoft Connect Feedback ID: 761226 (https://connectadmin/Feedback/ConnectTab.aspx?FeedbackID=761226) .

Applies to
  • Microsoft SQL Server 2012 Express
Keywords: 
kbexpertiseinter kbprb kbsurveynew KB2849799
Share
Additional support options
Ask The Microsoft Small Business Support Community
Contact Microsoft Small Business Support
Find Microsoft Small Business Support Certified Partner
Find a Microsoft Store For In-Person Small Business Support