You can query TCP/IP Port 1433 using portqry tool available on MSDN.
Here is the link to get it :
http://support.microsoft.com/default.aspx?scid=kb%3Ben-us%3B816103No matter what you try, I don't think it will get below 2-3 seconds response time.
>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
- Jayesh