2013-05-31 9 views
1

У меня есть база данных SQL-сервера, которую я недавно переименовал в SSMS. База данных работает отлично, за исключением того, что я больше не могу обращаться к диаграммам базы данных или создавать новые. Всякий раз, когда я пытаюсь сделать это, я получаю следующее сообщение об ошибке -Диаграммы базы данных недоступны после изменения имени базы данных

Attempted to read or write protected memory. This is often an indication that other memory is corrupt. 

Как я могу восстановить доступ к базе данных диаграмм, или, по крайней мере, очистить их и быть в состоянии создать новые снова?

EDIT: Я только что заметил, что диаграммы базы данных недоступны ни в одной из баз данных на SQL-сервере, а не только в базе данных, которая была переименована.

сообщение полной ошибки в SQL Server выглядит следующим образом:

at Microsoft.VisualStudio.OLE.Interop.IOleCommandTarget.QueryStatus(Guid& pguidCmdGroup, UInt32 cCmds, OLECMD[] prgCmds, IntPtr pCmdText) 
    at Microsoft.VisualStudio.Platform.WindowManagement.DocumentObjectSite.QueryStatus(Guid& pguidCmdGroup, UInt32 cCmds, OLECMD[] prgCmds, IntPtr pCmdText) 
    at Microsoft.VisualStudio.Platform.WindowManagement.WindowFrame.QueryStatus(Guid& pguidCmdGroup, UInt32 cCmds, OLECMD[] prgCmds, IntPtr pCmdText) 
    at Microsoft.Internal.VisualStudio.Shell.Interop.IVsTrackSelectionExPrivate.Register() 
    at Microsoft.VisualStudio.Platform.WindowManagement.WindowFrame.ConnectSelectionContext() 
    at Microsoft.VisualStudio.Platform.WindowManagement.WindowFrame.Activate() 
    at Microsoft.VisualStudio.Platform.WindowManagement.WindowManagerService.viewManager_ActiveViewChanged(Object sender, ActiveViewChangedEventArgs e) 
    at System.EventHandler`1.Invoke(Object sender, TEventArgs e) 
    at Microsoft.VisualStudio.PlatformUI.ExtensionMethods.RaiseEvent[TEventArgs](EventHandler`1 eventHandler, Object source, TEventArgs args) 
    at Microsoft.VisualStudio.PlatformUI.Shell.ViewManager.SetActiveView(View view, ActivationType type) 
    at Microsoft.VisualStudio.Platform.WindowManagement.WindowFrame.ShowInternal(ShowFlags showFlags) 
    at Microsoft.VisualStudio.Platform.WindowManagement.WindowFrame.<Show>b__26() 
    at Microsoft.VisualStudio.ErrorHandler.CallWithCOMConvention(Func`1 method) 
    at Microsoft.VisualStudio.Platform.WindowManagement.WindowFrame.Show() 
    at Microsoft.VisualStudio.Platform.WindowManagement.WindowFrame.MarshalingWindowFrame.<Microsoft.VisualStudio.Shell.Interop.IVsWindowFrame.Show>b__7a() 
    at Microsoft.VisualStudio.Shell.ThreadHelper.Invoke[TResult](Func`1 method) 
    at Microsoft.VisualStudio.Platform.WindowManagement.WindowFrame.MarshalingWindowFrame.Microsoft.VisualStudio.Shell.Interop.IVsWindowFrame.Show() 
    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.VsDocumentMenuItem.CreateDesignerWindow(IManagedConnection mc, DocumentOptions options) 
    at Microsoft.SqlServer.Management.UI.VSIntegration.Editors.VsDocumentMenuItem.InvokeDesigner(IManagedConnection connection) 
    at Microsoft.SqlServer.Management.UI.VSIntegration.Editors.VsDocumentMenuItem.Invoke() 
    at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.ToolsMenuItemBase.MenuInvokedHandler(Object sender, EventArgs args) 
+0

Вы пытались переименовать базу данных снова, назад к ее старому имени? (Попытка этого теперь * может * усугубить ситуацию.) –

ответ

1

В конце концов я нашел решение - надеюсь, что это может помочь другим. , ,

Вам понадобится второй компьютер с установленным SQL Server и/или Visual Studio. Затем используйте второй компьютер для копирования DLL-файлов, указанных в приведенных ниже шагах, и замените соответствующие файлы на компьютере, где диаграммы базы данных не работают.

Шаг 1: Заменено следующий файл: C: \ Program Files (x86) \ Common Files \ Microsoft Shared \ Визуальные инструменты для баз данных \ dsref80.dll

Шаг 2: Заменены все файлы в папке : C: \ Program Files (x86) \ Common Files \ microsoft shared \ MSDesigners8 \

Я сделал это, и все предыдущие диаграммы базы данных теперь снова работают.

+0

Спасибо, что разместили его. год спустя это помогло мне с той же проблемой. оно работает. –

Смежные вопросы