Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Quickly determine if SQL server is available
Message
From
01/07/2003 17:20:20
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Client/server
Title:
Quickly determine if SQL server is available
Miscellaneous
Thread ID:
00805848
Message ID:
00805848
Views:
69
I need to find a way to "quickly" determine if a SQL Server is available. So far, everything I have tried takes several seconds to determine if a server is not available.

I tried SQLSetProp(0,'ConnectTimeOut',1). It seemed to have no effect on a server that was not present. According to some, they achieved a response time of 2-3 seconds. Didn't work for me and even if it did, this is pretty slow.

I tried SQL-DMO. loServer.LoginTimeOut seemed to have no effect on a server that was not present. Took it about 15 seconds to determine the server was not there regardless of my setting for the timeout.

I tried to look at the RegisteredServers collection of the ServerGroup object, but it contained servers that had long been gone.

I tried PingSQLServerVersion method of the SQLServer object. Errored after several seconds.

I understand WMI just wraps DMO. So I haven't gone there yet.

I could ping the server with TCP\IP, but that wouldn't really tell me if SQL is running.

Anybody know how I can get a fast determination? Thanks
Next
Reply
Map
View

Click here to load this message in the networking platform