Status of the MSSQLServer Service from Remote Workstation

  • Hi SQL Genius,

       Is it possible to know the status of  the mssqlserver/sqlserveragent  service from remote workstation(say Win XP or Win2K Professional).

    we are connecting to the server using Client network utility.

    we have login with sysadmin rights but we are not able to login to the server.The error message states that the server or serive may down.Also we do have local admin rights in the workstation. 

    we are able to ping the server and the port no is also correct one.

     

  • Yes. You could write a WMI script that checks if the process are running on the remote machine.

  • If you are able to ping the server and if remote desktop connectivity fails to connect ...then I guess you have problem with services on the DB server...

    I believe, u need someone out there to restart the server...


    Get busy living ....or get busy dying....

  • With credits to the Microsoft Scripting Center....

    WMI script to check service status

    strComputer = "<server_name>"

    Set objWMIService = GetObject("winmgmts:" & _

        "{impersonationLevel=Impersonate}!\\" & strComputer & "\root\cimv2")

    Set colServices = objWMIService.ExecQuery("SELECT * FROM Win32_Service")

    For Each objService in colServices

        Wscript.Echo objService.DisplayName  & " = " & objService.State

    Next

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply