Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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.

like image 880
Gina Marano Avatar asked Mar 12 '13 14:03

Gina Marano


People also ask

How do you check if I have LocalDB installed?

Open "Command Prompt" Type line "sqllocaldb info" and check the name. By default, it will show "MSSQLLocalDB".

How do I get rid of LocalDB?

In order to be deleted, first it should be stopped. Type the SqlLocalDB stop MSSQLLocaDB command in the Command Prompt window: LocalDB instance “MSSQLLocalDB” stopped. Now, repeat the SqlLocalDB delete MSSQLLocalDB command.

How do I find my LocalDB server name?

To get all existing LocalDB instance names, use: SqlLocalDB.exe i info|i Lists all existing LocalDB instances owned by the current user and all shared LocalDB instances.


1 Answers

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]
like image 181
Serghei Gorodetki Avatar answered Oct 14 '22 03:10

Serghei Gorodetki