如何使用命令(CMD)停止SQL Server服务 [英] How to stop sql server service using command (CMD)

查看:340
本文介绍了如何使用命令(CMD)停止SQL Server服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用命令行停止和启动sql server实例?

i`v trid以下示例:

net stop MSSQLSERVER



net stopSQL Server代理(MSSQLSERVER)

但是在点击这个之后,cmd windows会出现一秒钟而且消失,并且sql server命名实例没有任何反应......





谢谢...

how to stop and start sql server instance using command line?
i`v trid following samples:
net stop MSSQLSERVER
and
net stop "SQL Server Agent (MSSQLSERVER)"
but after hitting this the cmd windows comes for a second and dissapears and the nothing happens to sql server named instance...


thanks...

推荐答案

Hi Sakura


转到命令提示符

运行 - >键入cmd to命令提示符



启动SQL Server

net start mssqlserver



停止SQL Server

net stop mssqlserver



问候

Willington
Hi Sakura

Go to Command prompt
Run -> type cmd to to command prompt

To Start SQL Server
net start mssqlserver

To Stop SQL Server
net stop mssqlserver

Regards
Willington


Hi Sakura



转到命令提示符

运行 - >键入cmd to命令提示符



启动SQL Server

net start mssqlserver



停止SQL Server

net stop mssqlserver



问候

Willington
Hi Sakura

Go to Command prompt
Run -> type cmd to to command prompt

To Start SQL Server
net start mssqlserver

To Stop SQL Server
net stop mssqlserver

Regards
Willington


嗨专业...



有很多命令用于驱动sql server throw命令提示符...



描述:

SC是一个命令行程序,用于与

NT服务控制器和服务进行通信。

用法:

sc< server> [命令] [服务名称] ...



选项< server>具有\\\名称形式

可以通过键入以下命令获得有关命令的更多帮助:sc [command]

命令:

查询-----------查询服务的状态,或者

枚举服务类型的状态。

queryex --- ------查询服务的扩展状态,或者

枚举服务类型的状态。

start ---------- - 启动服务。

暂停-----------向服务发送暂停控制请求。

interrogate -----发送对服务的INTERROGATE控制请求。

继续--------向服务发送CONTINUE控制请求。

停止-------- ----向服务发送STOP请求。

config ----------更改服务的配置(持久)。

description -----更改服务的描述。

failure ---------更改服务失败时所采取的操作。

qc --------------查询配置信息对于服务。

qdescription ----查询服务的描述。

qfailure --------查询服务在失败时采取的操作。

删除----------删除服务(来自注册表)。

create ----------创建一个服务。 (将其添加到注册表中)。

控制---------向服务发送控件。

sdshow -------- - 显示服务的安全描述符。

sdset -----------设置服务的安全描述符。

GetDisplayName- - 获取服务的DisplayName。

GetKeyName ------获取服务的ServiceKeyName。

EnumDepend ------枚举服务依赖项。< br $>


以下命令不需要服务名称:

sc< server> <命令> < option>

boot ------------(ok | bad)表示上次启动是否应该将
保存为最后一次 - 已知良好的启动配置

锁定------------锁定服务数据库

QueryLock -------查询LockStatus SCManager数据库

示例:

sc start MyService



以及更多sql操作尝试此链接。 。



http://msdn.microsoft.com/en-us/library/ms165702%28v=sql.105%29.aspx [ ^ ]



很高兴帮忙......
Hi professional...

there is such a many commands for driving sql server throw command prompt ...

DESCRIPTION:
SC is a command line program used for communicating with the
NT Service Controller and services.
USAGE:
sc <server> [command] [service name] ...

The option <server> has the form "\\ServerName"
Further help on commands can be obtained by typing: "sc [command]"
Commands:
query-----------Queries the status for a service, or
enumerates the status for types of services.
queryex---------Queries the extended status for a service, or
enumerates the status for types of services.
start-----------Starts a service.
pause-----------Sends a PAUSE control request to a service.
interrogate-----Sends an INTERROGATE control request to a service.
continue--------Sends a CONTINUE control request to a service.
stop------------Sends a STOP request to a service.
config----------Changes the configuration of a service (persistant).
description-----Changes the description of a service.
failure---------Changes the actions taken by a service upon failure.
qc--------------Queries the configuration information for a service.
qdescription----Queries the description for a service.
qfailure--------Queries the actions taken by a service upon failure.
delete----------Deletes a service (from the registry).
create----------Creates a service. (adds it to the registry).
control---------Sends a control to a service.
sdshow----------Displays a service''s security descriptor.
sdset-----------Sets a service''s security descriptor.
GetDisplayName--Gets the DisplayName for a service.
GetKeyName------Gets the ServiceKeyName for a service.
EnumDepend------Enumerates Service Dependencies.

The following commands don''t require a service name:
sc <server> <command> <option>
boot------------(ok | bad) Indicates whether the last boot should
be saved as the last-known-good boot configuration
Lock------------Locks the Service Database
QueryLock-------Queries the LockStatus for the SCManager Database
EXAMPLE:
sc start MyService

and for many more sql operation try this link..

http://msdn.microsoft.com/en-us/library/ms165702%28v=sql.105%29.aspx[^]

happy to help...


这篇关于如何使用命令(CMD)停止SQL Server服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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