SQL server can't start to connect? - database

Sql server reports a service error
Windows could not start the SQl server (SQLEXPRESS) service on Local Computer.
Error 1067: the process terminated unexpectedly
Images which describe the problem from the moment SQL Server was started, as follows:
Thanks in advance

1.Turns out Microsoft dot net framework 2.0 was corrupted. This was only determined while trying to repair the SQL install and received a prompt regarding dot net 2.0. So we cancelled the SQL repair and instead repaired the .Net 2.0 installation. Rebooted and SQL agent started automatically. Hope this helps.
2.Check the windows event viewer.
3.Also check the SQL Error log - if the service stayed up long enough to start writing to that, it may provide some useful information.

Related

SQL server doesn't install

What we know / I've tried so far:
It failed during installation. Everything else seems to be installed correctly except for "Database Engine Services" (Ignoring server replication).
The installer sent me here, but this solution doesn't seem to work either.
The SQL Server service doesn't start.
The following screenshot is what I see when I click on the repair:
Looking through the logs, this is the repair error description: The SQL Server feature 'SQL_Engine_Core_Inst' is not in a supported state for repair, as it was never successfully configured. Only features from successful installations can be repaired. To continue, remove the specified SQL Server feature.
Thank you!
I couldn't install SQL Server 2019 Developer as well because of other reason below:
A computer restart is required. Please restart your computer and try
the Basic installation again.
So, I restarted my Windows PC, then I could install SQL Server 2019 Developer.

I have installed SQL Server and Managment Studio on laptop but server name has gone

The other week I installed the latest version of SQL Server and Management Studio. In the Server Name box was a long name made up of some path and other parts however it has now disappeared and reading all these answers has not helped. I downloaded two backups of databases from a live server and restored them down here. I could access them and everything was fine until the server name disappeared and I have no idea (none of the ones on here work) how to get it back.
If I try localhost, 127.1.1.0 or . as the server name it doesn't work the error I get is:
A network or instance-specific occurred whilst establishing connection to SQL Server....Provider: Named Pipes Provider, error 40- could not open connection to SQL Server
If I go into services I only have SQL Server Browser and SQL Server VSS Writer. Under Browser it is disabled. If I start it or tell it to start on delayed or manual or just start it, it starts okay and then two seconds later its stopped again with no error message.
If I got to CMD and type (under) I get (under that)
C:\Windows\system32>SQLCMD -L
Servers:
;UID:Login ID=?;PWD:Password=?;Trusted_Connection:Use Integrated Security=?;
*APP:AppName=?;*WSID:WorkStation ID=?;
No list of servers which another answer suggested.
I cannot find under services a MS SQL Service for some reason.
Everything was working fine the last time I came to do some work on this so I don't know if some virus was detected that removed the service or something.
I had two databases to connect to and run queries against and try to get a Windows Service working again locally but I can't get the DB to work.
I am on Windows 8.1 64bit laptop with enough diskspace.
If I go to C:\Program Files\Microsoft SQL Server\110\LocalDB\Binn and double click sqlservr.exe, I get the error
Your SQL Server Installation is either corrupt or has been tampered with (Error getting Instance ID from name) Please uninstall then re-run setup to correct this problem.
Is it a case of me having to uninstall Management Studio and restarting again? I don't know what could have corrupted it but I need it working.
Should I just use the SQL Server 2017 Configuration Server to see if that can fix it or do I need to delete whole directories or "uninstall" from "programs and features" and try to install it again?
Still have no scooby to why the server name disappeared in the first place. Anyone got a clue?
SQL Server should appear in Services (you should not start it by double-clicking sqlservr.exe). If it doesn't appear anymore, you should reinstall SQL Server. After that you may attach the MDF and LDF files of your user databases, if they are still available (but in your case, you can also restore the backups again).
It seems your SQL server is not installed properly or corrupted now.
If the SQL Server installs on any machine there is a service named 'Sql Server(MSSQLSERVER)' or similar must be there and in 'Running' mode to connect to the database.

SQL Server 2014 - Windows could not start SQL server on local computer

I have an AWS instance, on which SQL Server 2014 has been running for more than 3 years.
But a few days ago, suddenly the SQL Server stopped running.
I checked the server and tried to start SQL Server service from services, from SQL Server Configuration Manager etc. but I'm not able to start the server and got following error:
So I checked event viewer entries and I found these two errors:
I started some research work over web to overcome on this issue and I found that I can start SQL service using below command using T902:
net start MSSQL$REVCORD /T902
And SQL Server service started successfully.
But I want to make SQL Server / services back to normal as before so I can start / stop services normally.
I found on web that this cause is due to corruption in master SQL Server database, I don't have backup of master SQL Server database so I cannot restore it back.
I checked multiple threads over web and tried multiple things to overcome this issue but no luck.
So finally I decided to reinstall/recover SQL Server 2014, but I am getting another error while reinstalling:
Based on finding over web, all threads showing that I have to uninstall and reinstall SQL Server to make it normal again.
Please help! It's a live server with multiple calls continously so I cannot uninstall/reinstall SQL Server there due to possible data loss.
The first thing:
select * from sys.sysmessages where error = 5833
The message:
The affinity mask specified is greater than the number of CPUs supported or licensed on this edition of SQL Server.
Check your edition, and fix the affinity mask so that the number of CPUs satisfy the number which is supported by your edition.
You can fix it in SSMS on the Processors tab in your server properties, or using sp_configure

How to enable SQL Server Agent in SQL Server 2012 Express

When I try to start SQL Server Agent from SQL Server Configuration Manager
I get this error
the request failed or the service did not respond in a timely fashion.Consult the error log or other applicable error log for details
So how can I solve it?
Have you checked if your sqlServerAgent is running in windows admin tools / services? If it is stopped,just right click it and start it. Set also start type to automatic in next column.
The agent service is not included in the express editions of SQL Server, so it can't be enabled at all. Even though the error messages are misleading, the actual error is a licensing one. To get the agent you need to upgrade to any other edition. For just developing and testing the developer edition is the best choice.
Other than that, you can try to emulate such functionality by using the Windows task scheduler to run the SQL command line tools.

Does having a Microsoft SQL Server 'LocalDB' on your computer use up CPU resources?

I've just installed VS2013 Premium on my Win8.1 and noticed this in my Sql Server Object Explorer ..
Does this mean that I have Sql Server running as a service and therefore consuming CPU, etc?
How can I confirm this please?
UPDATE:
here's a screenshot of my task manager..
Nope, LocalDB instances are started as needed rather than running as a service.
Instead of installing a service and configuring security, they just start up an instance of this new LocalDB runtime as needed.
http://www.mssqltips.com/sqlservertip/2694/getting-started-with-sql-server-2012-express-localdb/
LocalDB is a special instance of SQL Server, so to confirm whether its taking up any resource all you need to do is check if SQLServer is running in Task Manager.

Resources