SQLTeam.com | Weblogs | Forums

Sql server instance error in visual studio


I have installed sq lserver 2014 and sql server 12 express edition in my PC. When I coonect the visual studio connectionString using 2014 it works well. But when I try to connect with 2012 it gives error

A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)

How to find out if my PC is registered under sql server 2014 windows authentication. And how do I change it to use sql server 2012 windows authentication.
So my visual studio connectionString will be able to use sql server 2018 server and instance. Please help me.


First thing, check if SQL 2012 is running. Run services.msc, scroll down to the SQL Server section and find the SQL 2012 instance and start it if it is not running. The service name also will tell you want the instance name you should connect to is.


Thanks for the reply. When I run services.msc, there is only one "sql server (MSSQLSERVER)" is running. I wasn't sure which sql server version is runnin. So I opened 2014 -configuration manager and saw is the instance is running. that was running so I stopped it becasue I just wanted my 2012 version to run.

after that when I opened 2012 - configuration manager I saw that that is stopped as well. Not sure why I have only one sql server is running in services.msc. how do I find out which version is running. please help


If you right click on the service name in Services and select properties, it will show you the path to the executable. The path will let you look at the installation files to see which version you are running.

What happens if you start the service from configuration manager for SQL 2012?


Hi - Thanks for the reply. I right clicked on sql server-properties it says path is

c:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\Binn\sqlservr.exe" -sMSSQLSERVER

so, The running version is sql server 2012 RTM - 11.0.2100.60

sql server (MSSQLSERVER) - processid 6596
sql server browser -processid 6484

When I tried to start the sql server 2014 thru configuration maager it was alredy started (the start icon was disabled) and it also said the processid-6596 and processid 6484 like sql server 2012. I am confused.

The other thing I want you guys to know that in my system I have installed sql server 2012 express edition and SSMS 2012 using msi. I didn't install sql server 2014 using msi file. When I installed visual studio 2013 that time it installed sql server 2014 data tools only to use in visual studio. I just wanted you to know all the information. so I can find the solution from experts as quickly as possible.

Please help me as soon as possible. it is urgent.


take a look at this link hope this will help you out: http://www.sqlserverlogexplorer.com/fix-error-code-26/