July 15, 2002 at 7:24 am
How can I start/stop SQL Server via command line? I need to know this for a script that I'm writing.
July 15, 2002 at 7:31 am
Hi,
use net stop mssqlserver
Edited by - Klaas-Jan on 07/15/2002 07:41:28 AM
July 15, 2002 at 7:39 am
To stop
NET STOP MSSQLSERVER
or if you are also running sql agent (It will ask if you want to stop related services the /y answer that without user input)
NET STOP MSSQLSERVER /y
To start
NET START MSSQLSERVER
or if you are also running sql agent (because agent requires SQL Server to be able to run SQL will be started automatically first).
NET START SQLSERVERAGENT
"Don't roll your eyes at me. I will tape them in place." (Teacher on Boston Public)
July 15, 2002 at 8:52 am
Thanks. Another thing I was wondering how to do was to check to see if SP2 is installed.
July 15, 2002 at 9:07 am
Hey,
With regards to the installed SP...Is this SQL2000? If so, run the following command.
SELECT SERVERPROPERTY('productversion'), SERVERPROPERTY ('productlevel'), SERVERPROPERTY ('edition')
For SQL 7, check the following link (too lazy to type it all - this contains the SQL2000 info too!)
http://support.microsoft.com/default.aspx?scid=kb;en-us;Q321185
Clive Strong
July 15, 2002 at 11:31 am
Here is a good list of the values from SELECT @@version to tell yuo th SP level.
http://www.sql-server-performance.com/service_packs.asp
"Don't roll your eyes at me. I will tape them in place." (Teacher on Boston Public)
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply