Russell Chidhakwa
Russell Chidhakwa

Reputation: 389

localdb ((localdb)\MSSQLLocalDB) is not listed in Visual Studio IDE 2022 SQL Server Explorer

I recently installed Visual Studio IDE 2022 Version 17.6.2 and created a new Blazor Server Project targeting .NET 7.

For some reasons, unknown to me, the localdb is not listed under SQL Server on the SQL Server Explorer. I tried the following:

  1. Repair Visual Studio IDE.
  2. Check Registry for localdb instances.
  3. Checked the Visual Studio Installer and can see that SQL Server Express 2019 LocalDB is added and downloaded.
  4. Tried to create a DB using EF Core but I get an error that says: SqlException: A network-related or instance-specific error occurred while establishing a connection to SQL Server.
  5. I ran "sqllocaldb info" in command prompt to see what databases are there on my device: MSSQLLocalDB and ProjectModels.

What could be the problem because this is my first time seeing this error.

I have attached images to this. If anyone has ever encountered this problem please explain how you overcame it. This is a new Blazor Server Project.

  1. VS: Visual Studio IDE 2022 Version 17.6.2
  2. OS: Windows 11 Pro Version 22H2

Thanks.

ATTACHMENTS:

Error

Registry values

Nothing under SQL Server

SQL Server Express 2019 LocalDB is correctly installed

databases on my device

Upvotes: 0

Views: 2238

Answers (1)

Russell Chidhakwa
Russell Chidhakwa

Reputation: 389

I checked the error logs and saw a message stating something like “there have been 256 misaligned log IOs which required falling back to synchronous IO”.

I searched and found out that the error is usually associated with Windows 11 and Modern SSD. Windows 11 doesn’t behave the same way as Windows 10 when it comes to disk sector sizes on modern SSDs.

This article talked about how to troubleshoot OS 4KB disk sector size issues: https://learn.microsoft.com/en-us/troubleshoot/sql/database-engine/database-file-operations/troubleshoot-os-4kb-disk-sector-size

error is solved.

Upvotes: 1

Related Questions