Spanking brand-new installations of:
- Visual Studio 2022 Community (VS)
- SQL Server 2019 Dev (SQL)
- SQL Server Management Studio v18.10 (SSMS)
There are no other Visual Studio or SQL Server instances or installations.
A console program creates a localdb database using Entity Framework successfully. VS SQL Server Object Explorer documents this with a connection to (localdb)\MSSQLLocalDB
using a connection string of:
Data Source=(localdb)\MSSQLLocalDB;Initial Catalog=master;
Integrated Security=True;Connect Timeout=30;Encrypt=False;
TrustServerCertificate=False;ApplicationIntent=ReadWrite;
MultiSubnetFailover=False
But I can't get SSMS to connect to this localdb
database instance.
I am trying to use this server name:
(localdb)\MSSQLLocalDB
What am I doing wrong? I get an immediate (2 second) response with:
The instance of SQL Server you attempted to connect to does not support encryption. (.Net SqlClient Data Provider)
I used sqllocaldb, and everything looks ok:
sqllocaldb info
MSSQLLocalDB
ProjectModels
sqllocaldb info MSSQLLocalDB
Name: MSSQLLocalDB
Version: 15.0.4153.1
Shared name:
Owner: GreenMachine\jean
Auto-create: Yes
State: Running
Last start time: 1/21/2022 11:38:11 AM
Instance pipe name: np:\\.\pipe\LOCALDB#878B8E4E\tsql\query
So I tried another tack. I pointed my EF connection string to the local SQL Server instance:
optionsBuilder.UseSqlServer("Data source = GreenMachine; Initial
Catalog=SamuraiAppData; Integrated Security=True;
TrustServerCertificate=True;")
And that worked - I got a new database created on that instance. It seems like SSMS can't connect to localdb!
Thanks for your ideas!