3

I am getting this error when trying to create a new diagram in SQL Server 2008 R2:

The specified module could not be found.
(MS Visual Database Tools)

Program Location:

at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
at Microsoft.SqlServer.Management.UI.VSIntegration.NativeMethods.ThrowOnFailure(Int32 hr)
at Microsoft.SqlServer.Management.UI.VSIntegration.Editors.VirtualProject.CreateDesigner(Urn origUrn, DocumentType editorType, DocumentOptions aeOptions, IManagedConnection con, String fileName)
at Microsoft.SqlServer.Management.UI.VSIntegration.Editors.VirtualProject.Microsoft.SqlServer.Management.UI.VSIntegration.Editors.ISqlVirtualProject.CreateDesigner(Urn origUrn, DocumentType editorType, DocumentOptions aeOptions, IManagedConnection con, String fileName)
at Microsoft.SqlServer.Management.UI.VSIntegration.Editors.ISqlVirtualProject.CreateDesigner(Urn origUrn, DocumentType editorType, DocumentOptions aeOptions, IManagedConnection con, String fileName)
at Microsoft.SqlServer.Management.UI.VSIntegration.Editors.ScriptFactory.CreateDesigner(DocumentType editorType, DocumentOptions aeOptions, Urn parentUrn, IManagedConnection mc, String fileName)
at Microsoft.SqlServer.Management.UI.VSIntegration.Editors.VsDocumentMenuItem.CreateDesignerWindow(IManagedConnection mc, DocumentOptions options)

Please help me to resolve this issue.

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
  • Sounds like your installation is broken - can you try to repair / re-install SQL Server 2008 R2 on that machine? – marc_s Jul 06 '13 at 11:07

2 Answers2

0

The problem seems to be with the Visual Database Tools DLL.

This DLL file is installed by the VS 2010 installation, but during a SQL Server 2012 installation, it will be upgraded to the SQL 2012 version of the tools. Thereafter, uninstalling and reinstalling SQL or VS will not remove this newer DLL in order to allow the older version to be installed, and hence leave this annoying issue.

How I fixed it was I set up a clean virtual machine and installed VS 2010, then took this original DLL from my virtual machine and overwrote the DLL on my live machine. Simple as that.

I would assume though that deleting this DLL file and then doing a VS 2010 repair or uninstall/reinstall would also fix the problem.

The directory and file name of the DLL (on an X64 machine) is: C:\Program Files (x86)\Common Files\microsoft shared\Visual Database Tools\dsref80.dll

Hiren Dhaduk
  • 2,760
  • 2
  • 19
  • 21
0

In my case the problem was that I was connected to a SQL Server 2012 database on another server, while my machine had SQL Server 2008 R2. Installing the SQL Management Studio 2012 solved the problem.

Ani
  • 2,636
  • 1
  • 21
  • 17