Using Microsoft SQL Server 2000 and some ASP script, Mitch creates a function that will ping any remote server, digest and process the results, and then return a summary of that ping session through an ASP function.
Using ASP & SQL To Ping A Remote Server - Analyzing the ping attempts (Page 5 of 6 )
The data returned from the sp_PingServer will contain the details of the four ping attempts in rows 4 to 7, as shown below:
The GetPingStats() function will break each line down to extract two things: the number of bytes sent per ping, and the time it took to reach its destination:
if Instr(1, rsObject.Fields(0).value, "timed out") = 0 then 'successful