Click here to Skip to main content
13,191,400 members (76,381 online)
Rate this:
 
Please Sign up or sign in to vote.
See more:
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...
Posted 22-Feb-13 3:13am
Updated 22-Feb-13 5:21am
v2
Comments
Arun1_m1 22-Feb-13 9:29am
   
Are you trying to stop a named instance of SQL Server ?
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

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
  Permalink  
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 2

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
  Permalink  
Comments
Shubh Agrahari 22-Feb-13 9:33am
   
its not good to put solution more the once .....be care full for next time...
ThePhantomUpvoter 22-Feb-13 9:35am
   
There is a bug that solutions are sometimes posted twice.
willington.d 22-Feb-13 9:40am
   
Its not my problem Shubh Agrahari. Please report this to Code Project.
Thanks for your kind advice.
Shubh Agrahari 22-Feb-13 9:43am
   
ya ok but there also a delete link that helps you to remove solution from your end ..
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 3

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

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy |
Web04 | 2.8.171017.1 | Last Updated 23 Feb 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100