October 29, 2016 at 11:06 pm
since installing SQL Server 2014 I have lost ability to connect to local instance (tried . and <local>) Full error message is below. How to resolve?
===================================
Cannot connect to ..
===================================
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: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (.Net SqlClient Data Provider)
------------------------------
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft%20SQL%20Server&EvtSrc=MSSQLServer&EvtID=2&LinkId=20476
------------------------------
Error Number: 2
Severity: 20
State: 0
--Quote me
October 31, 2016 at 2:54 am
First make sure the SQL Server service is running... Also check the service name to see if you installed a default instance or a named instance.
Additionally (for ease of use) also start the SQL Browser service, so you will be able to connect on instance name and you can use the "browse" functionallity.
If you have installed SQL locally you can start SSMS and use "browse" from the dropdown box to search for available SQL instances. Your local instance(s) should pop-up rather quick.
Even without connecting to the SQL instance you can read the SQL Error log by searching the file "..\MSSQL12.MSSQLSERVER\MSSQL\Log\ERRORLOG" and open it with a text editor like notepad. Look in the error log for "login failed" messages. If you can't find these messages the connection attempt is failing before it reaches the SQL instance. You should look for settings in the connection string (like correct instance name?) or firewall to solve such issues.
October 31, 2016 at 2:57 am
polkadot (10/29/2016)
<snip>...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: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (.Net SqlClient Data Provider)...<snip>
The error message states it tries to connect using named pipes. Use SQL Server Configuration Manager to check if the "Named Pipes" protocol is indeed enabled.
October 31, 2016 at 11:56 am
ok, one step at a time. How to check "the SQL Server service is running". when I search for SQL Server Configuration manager it only returns SQL Server Reporting Services configuration manager. As of 2014, I am not able to see the usual interface showing SQL Server Browser, Agent, and other services.
Can you help me sort this out?
--Quote me
October 31, 2016 at 2:54 pm
If SQL Server Configuration Manager only list the Reporting Server service, it looks like the SQL Server engine is not installed on that machine. The functionality of configuration manager has hardly changed between versions since SQL2005.
You can look also directly in the services by starting the services console (either from computer management or by running "services.msc" from the start or command prompt). Look in the list for "SQL Server (instancename)" as the engine service. If this isn't listed the SQL engine is not installed.
October 31, 2016 at 3:28 pm
attached screenshot of services running, and it appears SQL Server <instance> is already running. BTW, am able to use my instance to connect to remote servers/instances, only not my own local.
Also, I tried recommendation on this youtube titled FIX can't connect local server in microsoft SQL 2014
1. In View tab selected Registered Servers
2. right clicked on local machine, Service Control, Start (was active option)
in my case got 'unable to start service', even though Start option was available for clicking. See screenshot 'attempt to start'.
Can you pls advise further?
--Quote me
October 31, 2016 at 3:42 pm
The picture of the services shows the SQL Server service is not running (although the startup is manual). In the other picture the message indicates the service is started, but next stopped again.
Look in the Windows Event log (both "system" and "application") for any messages related to the start and stop of the SQL Server service.
Also look in the SQL error log for any clues. You don't need SSMS and the SQL Server service does not need to be running to read the SQL Error log. You can open the file "..\MSSQL12.MSSQLSERVER\MSSQL\Log\ERRORLOG" (adjust to your situation) in notepad.
November 1, 2016 at 3:25 am
SOLUTION
1.If you have installed SQL Server then you should remove it completely through the Control Panel and restart the server. If you need help, visit this wiki post for more information.
2.When you get to the Server Configuration page as shown below, you will notice that the SQL Server Database Engine service is using the account NT Service\MSSQLSERVER.
ChangeDBEngineService
3.Change the account from NT Service\MSSQLSERVER to NT AUTHORITY\SYSTEM by clicking on the drop-down box, selecting browse and then typing SYSTEM in Select User, Computer, Service Account, or Group window in Active Directory. Click OK to accept the new account.
SYSTEM-account
4.Your screen should look similar to the screenshot below.
NT-Authority-System
5.Continue on with the installation as you normally would.
6.You should no longer receive the error Could not find the Database Engine startup handle during installation.
Best Practice: You should restart the Windows server after SQL Server installation is complete. Yes, even if you are not prompted by the system to restart the server you must restart the server after installation of SQL Server, SharePoint Server, etc. or else you may run into problems.
after the installation is complete you should change this account back to a low-privileged domain account that will run the SQL Database Engine service.
Viewing 8 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply