Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Stop SQL Server from running until needed [closed]

This is not off-topic. The link to on-topic says: ...if your question generally covers...software tools commonly used by programmers...then you’re in the right place to ask your question!


I have SQL Server 2012 installed on my PC, and usually don't need it. It's only for debugging purposes.

I've seen it takes up quite some RAM so I'd like to prevent it from starting until I need it, start it, and then stop it when not needed again.

How do I do that? (I have SSMS installed as well so I can use that if that's the way to do it.)

like image 293
ispiro Avatar asked Jun 24 '13 20:06

ispiro


People also ask

How do I stop a running job in SQL Server?

Expand SQL Server Agent, expand Jobs, right-click the job you want to stop, and then click Stop Job. If you want to stop multiple jobs, right-click Job Activity Monitor, and then click View Job Activity. In the Job Activity Monitor, select the jobs you want to stop, right-click your selection, and then click Stop Jobs.

How do I shutdown SQL Server safely?

The Net Stop Command But to stop SQL Server from outside the Windows GUI, you can use Windows 2000 or Windows NT 4.0's built-in Net command. From a command prompt, type net stop mssqlserver. If you're using a named instance, type net stop mssql$instancename.


2 Answers

To start, stop, pause, resume, or restart the an instance of the SQL Server Database Engine:

  1. On the Start menu, point to All Programs, point to Microsoft SQL Server 2012 , point to Configuration Tools, and then click SQL Server Configuration Manager. If the User Account Control dialog box appears, click Yes.
  2. In SQL Server Configuration Manager, in the left pane, click SQL Server Services.
  3. In the results pane, right-click SQL Server (MSSQLServer) or a named instance, and then click Start, Stop, Pause, Resume, or Restart.
  4. Click OK to close SQL Server Configuration Manager.

From: Microsoft - Start,Stop,etc. SQL Server

You can also do this from within SSMS:

In Object Explorer, connect to the instance of the Database Engine, right-click the instance of the Database Engine you want to start, and then click Start, Stop, Pause, Resume, or Restart.

Edit: As Lamak mentioned, within the SQL Server Configuration Manager you can change all the services StartMode to "Manual" so they do not start on boot.

like image 106
Hart CO Avatar answered Oct 23 '22 00:10

Hart CO


The best way is to setup se SQL service to manual, from run type “services.msc” to access windows services and change startup type to “manual” you can change all services started by SQL*.

Doing so your computer starts faster because will not start SQL Server on boot.

If you need just go again to services.msc and start the service, there's no need to change again the type they just stay "manual"

like image 28
MineScript Avatar answered Oct 22 '22 22:10

MineScript