Spanking brand-new installations of:
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!
From the SSMS connection dialog, click the Options button in the lower right corner to expand the connection options. Ensure that Encrypt Connection is not checked.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With