Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

"Library not registered" error message when you open a new query window in SQL Server 2012 Express


View products that this article applies to.

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)

↑ Back to the top


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.

↑ Back to the top


Status

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

↑ Back to the top


More Information

For more information, see Microsoft Connect Feedback ID: 761226.

↑ Back to the top


Keywords: kbexpertiseinter, kbprb, kbsurveynew, kb

↑ Back to the top

Article Info
Article ID : 2849799
Revision : 1
Created on : 1/7/2017
Published on : 5/28/2013
Exists online : False
Views : 137