When connecting to MSSQLLocalDB with SQL Server in Visual Studio 2019 "A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible." and SQL Server is configured to allow remote connections. "error. How can I fix it?
Asked
Active
Viewed 32 times
0
Mark Rotteveel
- 90,369
- 161
- 124
- 175
DevFatih
- 43
- 1
- 1
- 7
-
"Error occurred during LocalDB instance startup: SQL Server process failed to start"...seems quite imoportant there. Something is wrong with your SQL Server and it won't start. What that is, we can't tell you without looking at your computer. Maybe try re-installing it, or looking in the event logs for clues. – ADyson Jul 22 '20 at 09:06
-
My operating system is Windows 7 Professional. I heard that Microsoft has left support for Windows 7. Could this be the cause of the problem? – DevFatih Jul 22 '20 at 09:13
-
You're correct that support for Windows 7 has ended - but that means you won't get any more windows updates, or security fixes. it doesn't mean that existing software which is designed to run on Windows 7 will suddenly stop working. AFAIK the only versions of SQL Server which don't support Windows 7 are SQL 2019 and SQL 2017 - but it likely wouldn't have let you install it in the first place, rather than simply fail to start up. What version of SQL Server did you install? – ADyson Jul 22 '20 at 09:17
-
There is a version of SQL Server 2016 Express LocalDB in Visual Studio 2019. I have installed the version of SQL Server 2019 Express LocalDB, regardless of Visual Studio. – DevFatih Jul 22 '20 at 09:34
-
Ok. FYI it's not "in" Visual Studio. They are completely separate products. – ADyson Jul 22 '20 at 09:38
-
If you installed SQL 2016 it should be ok. If you installed SQL 2019 (you've mentioned both in your comment, confusingly), then it won't be supported. But even so, if you're trying to start the SQL 2016 and it's failing, then you need to check the windows event logs for any errors, or you could try re-installing it. Also you could read the duplicate question in the blue box above, to see if any suggestions there are helpful. There's nothing more really we can do to help you without a lot more detail. – ADyson Jul 22 '20 at 09:38
-
I installed 2016 as a standalone component in Visual Studio. – DevFatih Jul 22 '20 at 09:42
-
Then I got the error and installed the 2019 version from the internet. – DevFatih Jul 22 '20 at 09:43
-
I have deleted the SQL Server 2019 version now and the bug has been fixed Thank you very much for your help :) – DevFatih Jul 22 '20 at 10:14