SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


SQL Server (MSSQLSERVER) keeps Stopping


SQL Server (MSSQLSERVER) keeps Stopping

Author
Message
VegasL
VegasL
SSCrazy
SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)

Group: General Forum Members
Points: 2676 Visits: 378
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
VegasL
VegasL
SSCrazy
SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)

Group: General Forum Members
Points: 2676 Visits: 378
i uninstalled an antivirus program and it then worked.
Eirikur Eiriksson
Eirikur Eiriksson
SSC Guru
SSC Guru (172K reputation)SSC Guru (172K reputation)SSC Guru (172K reputation)SSC Guru (172K reputation)SSC Guru (172K reputation)SSC Guru (172K reputation)SSC Guru (172K reputation)SSC Guru (172K reputation)

Group: General Forum Members
Points: 172380 Visits: 24475
VegasL - Saturday, November 11, 2017 10:42 PM
i uninstalled an antivirus program and it then worked.

Exclude the data and log folders from the virus scan rather than running your system unprotected!
Cool

VegasL
VegasL
SSCrazy
SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)

Group: General Forum Members
Points: 2676 Visits: 378
Thanks.. Exclude folders didn't work either. Now that I have SSMS up and running again will now reinstall antivirus program.
VegasL
VegasL
SSCrazy
SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)

Group: General Forum Members
Points: 2676 Visits: 378
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?
Thomas Rushton
Thomas Rushton
SSC-Insane
SSC-Insane (20K reputation)SSC-Insane (20K reputation)SSC-Insane (20K reputation)SSC-Insane (20K reputation)SSC-Insane (20K reputation)SSC-Insane (20K reputation)SSC-Insane (20K reputation)SSC-Insane (20K reputation)

Group: Moderators
Points: 20749 Visits: 10915
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.
HanShi
HanShi
SSC-Dedicated
SSC-Dedicated (31K reputation)SSC-Dedicated (31K reputation)SSC-Dedicated (31K reputation)SSC-Dedicated (31K reputation)SSC-Dedicated (31K reputation)SSC-Dedicated (31K reputation)SSC-Dedicated (31K reputation)SSC-Dedicated (31K reputation)

Group: General Forum Members
Points: 31247 Visits: 4248
VegasL - Sunday, February 25, 2018 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?

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.


** Don't mistake the ‘stupidity of the crowd’ for the ‘wisdom of the group’! **
VegasL
VegasL
SSCrazy
SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)

Group: General Forum Members
Points: 2676 Visits: 378
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?
GilaMonster
GilaMonster
SSC Guru
SSC Guru (950K reputation)SSC Guru (950K reputation)SSC Guru (950K reputation)SSC Guru (950K reputation)SSC Guru (950K reputation)SSC Guru (950K reputation)SSC Guru (950K reputation)SSC Guru (950K reputation)

Group: General Forum Members
Points: 950908 Visits: 48920
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

We walk in the dark places no others will enter
We stand on the bridge and no one may pass


Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum









































































































































































SQLServerCentral


Search