views:

35

answers:

2

hi

Is there any script (any batch file) to Start/Stop the SQL Server 2008 service?

for example in Oracle i use this for open:

net start OracleServiceORCL

net start OracleOraDb10g_home1TNSListener

net start OracleOraDb10g_home1iSQL*Plus

net start OracleDBConsoleORCL

how to do it in sql-server 2008 ?

thank's in advance

+3  A: 

If you are looking for a way to restart SQL Server 2008 (or the databases in a SQL instance) you have multiple GUI options.

From the command line, you can restart all the SQL-related services (hint, they all start with "SQL") you find in the Windows Service Manager, although that is a rough way of doing it (in my opinion).

Example:

net start "sql server browser"

If this doesn't answer your question, please clarify.

Tim
OK, this works: net start MSSQLSERVER
Gold
+3  A: 

As far as I understand you, you want to start/stop SQL Server 2008 from command line.

The way you describe, using net start/stop is a crude way but it certainly works...

The following services are associated with SQL Server 2008 and you may/may not need them. The actual "server" is "MSSQLSERVER". Please note that you need an elevated command prompt to start/stop these services.

net start MSSQLSERVER -- only this service is actually "needed" to run SQL Server---
net start SQLServerBrowser
net start SQLSERVERAGENT
net start MSSQLServerOLAPService --analysis services--
net start ReportServer

To start/stop services and more administrative tasks you would usually use the SQL Server Configuration Manager you can see in the screenshot below: sql server configuration managert

moontear
.... nice save.
Will

related questions