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.ListAvailableSQLSe rvers()
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.ListAvailableSQLSe rvers() command is executed.
Is there another way to determine whether a server is availabe?
Thanks,
Louise
I tried using ListAvailableSQLServers:
Set oNames = oSQLApp.ListAvailableSQLSe
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.ListAvailableSQLSe
Is there another way to determine whether a server is availabe?
Thanks,
Louise
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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.
http://www.dotnet247.com/247reference/msgs/27/136650.aspx