Home arrow ASP arrow Page 2 - Using ASP & SQL To Ping A Remote Server

Using ASP & SQL To Ping A Remote Server

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.

Author Info:
By: Mitchell Harper
Rating: 5 stars5 stars5 stars5 stars5 stars / 35
November 28, 2001
  1. · Using ASP & SQL To Ping A Remote Server
  2. · An overview of the procedure
  3. · Creating the stored procedure
  4. · The GetPingStats() ASP function
  5. · Analyzing the ping attempts
  6. · Conclusion

print this article

Using ASP & SQL To Ping A Remote Server - An overview of the procedure
(Page 2 of 6 )

Let me just start by providing a brief outline of what our function will do. The ASP function will be named GetPingStats(), will return a string of text and will accept one parameter, RemoteIP. RemoteIP can be a fully qualified domain name (such as www.devarticles.com), an internal network name (such as webserver1), or an IP address (such as It doesn’t matter which it is, because the ping command will automatically resolve its I.P.

This function will execute a stored procedure on the SQL Server named sp_PingServer, which will accept the RemoteIP variable as its only parameter. This function will call an extended stored procedure, xp_cmdShell, which will start a thread of the ping command on the SQL servers’ machine.

The results of that ping command will be fed back to our GetPingStats() ASP function, which in turn will process the results. These results will then be returned as a simple string of HTML text to the calling ASP script.
blog comments powered by Disqus

- Central Scoreboard with Flash and ASP
- Calorie Counter Using WAP and ASP
- Creating PGP-Encrypted E-Mails Using ASP
- Be My Guest in ASP
- Session Replacement in ASP
- Securing ASP Data Access Credentials Using t...
- The Not So Ordinary Address Book
- Adding and Displaying Data Easily via ASP an...
- Sending Email From a Form in ASP
- Adding Member Services in ASP
- Removing Unconfirmed Members
- Trapping HTTP 500.100 - Internal Server Error
- So Many Rows, So Little Time! - Case Study
- XDO: An XML Engine Class for Classic ASP
- Credit Card Fraud Prevention Using ASP and C...

Watch our Tech Videos 
Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us 
Weekly Newsletter
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 

Developer Shed Affiliates


© 2003-2019 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials