Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Quickly determine if SQL server is available
Message
De
01/07/2003 17:20:20
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Titre:
Quickly determine if SQL server is available
Divers
Thread ID:
00805848
Message ID:
00805848
Vues:
70
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform