What does “The ”DataDirectory“ registry value is missing in the LocalDB instance registry key” error mean?

空扰寡人 提交于 2019-12-18 06:09:21

问题


I have a MVC4/ASP.Net application that uses localdb. Everything "appears" to work correctly. However I am getting loads of errors in my event log:

The "DataDirectory" registry value is missing in the LocalDB instance registry key: {BB3F4304-E7E9-4EE7-9A25-B46BFAA73FB4}

The "DataDirectory" registry value is missing in the LocalDB instance registry key: {BB31321B-BEB9-465B-8C8E-DEF9C2C67FBE}

Each time the instance changes.

XML Detail of the error:

<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name="SQLLocalDB 11.0" /> 
    <EventID Qualifiers="35269">512</EventID> 
    <Level>2</Level> 
    <Task>0</Task> 
    <Keywords>0x80000000000000</Keywords> 
    <TimeCreated SystemTime="2013-03-12T14:12:43.000000000Z" /> 
    <EventRecordID>1080755</EventRecordID> 
    <Channel>Application</Channel> 
    <Computer>XXXXXX</Computer> 
    <Security /> 
  </System>
  <EventData>
    <Data>{BB07CF13-2ABD-4FD5-AB2B-467FF08F28E6}</Data> 
  </EventData>
</Event>

Connection string:

<add 
    name="DefaultConnection" 
    connectionString="Data Source=(localdb)\v11.0; Initial Catalog=WebMVCContext-20121205135209; Integrated Security=True; MultipleActiveResultSets=True; AttachDbFilename=|DataDirectory|WebMVCContext-20121205135209.mdf" 
    providerName="System.Data.SqlClient" />

Again, it is working and everything is connecting just get 10-20 of these for every connection.


回答1:


I have the same issue. It seems like a bug of Localdb. I have solved this issue by deleting the registry key:

HKEY_USERS\.DEFAULT\Software\Microsoft\Microsoft SQL Server\UserInstances\[GUID_FROM_EVENT_LOG]


来源:https://stackoverflow.com/questions/15364542/what-does-the-datadirectory-registry-value-is-missing-in-the-localdb-instance

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!