在需要之前停止运行 SQL Server [英] Stop SQL Server from running until needed

查看:41
本文介绍了在需要之前停止运行 SQL Server的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

不是题外话.话题链接说:...如果您的问题通常涵盖...常用的软件工具由程序员...那么你来对地方问你的问题!


我的 PC 上安装了 SQL Server 2012,通常不需要它.仅用于调试目的.

我已经看到它占用了相当多的内存,所以我想阻止它在我需要它之前启动,启动它,然后在不再需要时停止它.

我该怎么做?(我也安装了 SSMS,所以如果可以的话,我可以使用它.)

解决方案

要启动、停止、暂停、恢复或重新启动 SQL Server 数据库引擎的实例:

<块引用>

  1. 在开始"菜单上,依次指向所有程序"、Microsoft SQL Server 2012"、配置工具",然后单击SQL Server"配置管理器.如果出现用户帐户控制"对话框,点击是.
  2. 在 SQL Server 配置管理器的左窗格中,单击 SQL Server 服务.
  3. 在结果窗格中,右键单击 SQL Server (MSSQLServer) 或命名实例,然后单击启动、停止、暂停、恢复或重新启动.
  4. 单击确定"关闭 SQL Server 配置管理器.

来自:Microsoft - 开始、停止等.SQL Server

您也可以在 SSMS 中执行此操作:

<块引用>

在对象资源管理器中,连接到数据库引擎的实例,右键单击要启动的数据库引擎实例,然后然后点击开始、停止、暂停、恢复或重新启动.

正如拉马克提到的,在 SQL Server 配置管理器中,您可以将所有服务的启动模式更改为手动";所以它们不会在启动时启动.

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.)

解决方案

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.

这篇关于在需要之前停止运行 SQL Server的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆