November 11, 2017 at 6:49 pm
Hello,
Trying to connect to sql server database engine, via ssms, but won't connect. I get the standard 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: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (Microsoft SQL Server, Error: 2)
I've gone in to Sql Server Configuration Manager (Local) > SQL Server Services > and turned on SQL Server (MSSQLSERVER) and changed it from Stopped to Start and trying to connect to SSQL but keep getting error above. I refresh and noticed SQL Server (MSSQLSERVER) goes back to Stopped after I manually started service.
I've also turned windows firewall off.
Restarted..and no luck. SSMS won't connect to DB engine.
Any help would be appreciated
November 11, 2017 at 10:42 pm
i uninstalled an antivirus program and it then worked.
November 12, 2017 at 2:46 am
VegasL - Saturday, November 11, 2017 10:42 PMi uninstalled an antivirus program and it then worked.
Exclude the data and log folders from the virus scan rather than running your system unprotected!
😎
November 12, 2017 at 5:52 am
Thanks.. Exclude folders didn't work either. Now that I have SSMS up and running again will now reinstall antivirus program.
February 25, 2018 at 3:16 pm
Hello,
The problem has re-occurred. I've uninstalled AntiVirus program, and disabled Windows Firewall, restarted SSMS but getting 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: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (Microsoft SQL Server, Error: 2)
Using: Windows Authentication. I've also re-enabled the stopped services in SSCM, i.e. SQL Server, but when I then attempt to re-start SSMS the SQL Server goes back to Stopped from Running.
Any ideas to fix?
February 26, 2018 at 5:11 am
Which antivirus product is this?
There's some general advice from MS about installing/configuring AV software to run on SQL Servers at https://support.microsoft.com/en-us/help/309422/how-to-choose-antivirus-software-to-run-on-computers-that-are-running
You might also want to check if you're running certain other pieces of software that hook into the SQL Server process space. See https://support.microsoft.com/en-us/help/2033238/performance-and-consistency-issues-when-certain-modules-are-loaded-int - and the sp_Blitz check I wrote a while back - https://github.com/BrentOzarULTD/SQL-Server-First-Responder-Kit/issues/229 - and have a look at the contents of sys.dm_os_loaded_modules.
Thomas Rushton
blog: https://thelonedba.wordpress.com
February 26, 2018 at 5:12 am
VegasL - Sunday, February 25, 2018 3:16 PMHello,The problem has re-occurred. I've uninstalled AntiVirus program, and disabled Windows Firewall, restarted SSMS but getting 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: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (Microsoft SQL Server, Error: 2)
Using: Windows Authentication. I've also re-enabled the stopped services in SSCM, i.e. SQL Server, but when I then attempt to re-start SSMS the SQL Server goes back to Stopped from Running.
Any ideas to fix?
Please look at the contents of the SQL Error log. Most likely some messages will indicate the reason for the SQL Server service to stop.
You don't need to have SQL Server service running to get the error log. You can just open the file ERRORLOG.# (being ERRORLOG the most recent error log, ERRORLOG.1 the previous, ERRORLOG.2 the pre-previous, etc.) with any text editor. By default these files are located in the folder "..\Microsoft SQL Server\MSSQL.1\MSSQL\LOG".
Additionally check the Windows Application eventlog for any entries related to the service to stop.
February 26, 2018 at 9:49 pm
Thanks HanShi.
This is the error from the error log:
2018-02-26 22:35:15.77 Server The SQL Server Network Interface library could not register the Service Principal Name (SPN) [ MSSQLSvc/MY-PC:50925 ] for the SQL Server service. Windows return code: 0xffffffff, state: 63. Failure to register a SPN might cause integrated authentication to use NTLM instead of Kerberos. This is an informational message. Further action is only required if Kerberos authentication is required by authentication policies and if the SPN has not been manually registered.
2018-02-26 22:35:15.94 spid14s A new instance of the full-text filter daemon host process has been successfully started.
2018-02-26 22:35:16.05 spid17s Starting up database 'msdb'.
2018-02-26 22:35:16.05 spid18s Starting up database 'ReportServer$MSSQLSERVER2012'.
2018-02-26 22:35:16.05 spid19s Starting up database 'ReportServer$MSSQLSERVER2012TempDB'.
2018-02-26 22:35:16.05 spid20s Starting up database 'MYDB'.
2018-02-26 22:35:16.06 spid9s Starting up database 'mssqlsystemresource'.
2018-02-26 22:35:16.37 spid9s The resource database build version is 11.00.2218. This is an informational message only. No user action is required.
2018-02-26 22:35:17.36 spid9s Starting up database 'model'.
2018-02-26 22:35:17.49 spid9s Error: 9003, Severity: 20, State: 1.
2018-02-26 22:35:17.49 spid9s The log scan number (34:280:1) passed to log scan in database 'model' is not valid. This error may indicate data corruption or that the log file (.ldf) does not match the data file (.mdf). If this error occurred during replication, re-create the publication. Otherwise, restore from backup if the problem results in a failure during startup.
2018-02-26 22:35:17.49 spid9s SQL Trace was stopped due to server shutdown. Trace ID = '1'. This is an informational message only; no user action is required.
2018-02-26 22:35:17.86 Logon Error: 18456, Severity: 14, State: 38.
2018-02-26 22:35:17.86 Logon Login failed for user 'NT SERVICE\ReportServer$MSSQLSERVER2012'. Reason: Failed to open the explicitly specified database 'ReportServer$MSSQLSERVER2012'. [CLIENT: fe80::6df8:932a:6bb1:128%4]
What is best work around? Uninstall reinstall SQL? or is there an easier fix?
February 27, 2018 at 2:04 am
Looks like your model database is corrupt. You can replace it (data and log) with a copy from another server running the same version (and service pack) as this one.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
Viewing 9 posts - 1 through 8 (of 8 total)
You must be logged in to reply to this topic. Login to reply