Link to home
Start Free TrialLog in
Avatar of louiserutherford
louiserutherford

asked on

Determine whether a server is responding

I am trying to determine whether a server is responding.
I tried using ListAvailableSQLServers:

    Set oNames = oSQLApp.ListAvailableSQLServers()
    For i = 1 To oNames.Count
        If oNames.Item(i) = serverName Then
            serverCheck = True
            Exit For
        End If
    Next i

However, I get an error 'Not enough storage is available to complete this operation' when the oSQLApp.ListAvailableSQLServers() command is executed.

Is there another way to determine whether a server is availabe?

Thanks,

Louise
ASKER CERTIFIED SOLUTION
Avatar of EDDYKT
EDDYKT
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Mikal613
What do you consider to be "available"?  Ping will tell you if the server is available from a communications perspective.  WMI will allow you to see if a specific service is running on a given machine.  If you could be a little more specific, then we might be able to give a more definitive answer.