收录日期:2020/05/27 11:32:12 时间:2009-08-07 15:49:25 标签:sql-server-2008

Is there any tool or program that show if sql server 2008

is running (like was in sql server 2000) ?

how I can see the condition of sql server (if running or not) ?

thank's in advance

You can check if the mssql service is running with the Service Control Manager command line tool, sc.exe:

C:\>sc query MSSQLSERVER

SERVICE_NAME: MSSQLSERVER
        TYPE               : 10  WIN32_OWN_PROCESS
        STATE              : 4  RUNNING
                                (STOPPABLE, PAUSABLE, ACCEPTS_SHUTDOWN)
        WIN32_EXIT_CODE    : 0  (0x0)
        SERVICE_EXIT_CODE  : 0  (0x0)
        CHECKPOINT         : 0x0
        WAIT_HINT          : 0x0

There are many options in sc to explore.