.net - Check Internet Connectivity from sql query/script....? -


can check availability of internet sql script? google'd lot no use.

any suggestion regarding highly appreciated.

thanks in advance

you can sql clr udf. here example:

[microsoft.sqlserver.server.sqlfunction] public static sqlboolean hasconnectivity(sqlstring url) {     try     {         if (url.isnull)         {             return false;         }         var httprequest = (httpwebrequest)httpwebrequest.create(url.tostring());         using(var response = (httpwebresponse)httprequest.getresponse())         {             //make sure http repsonse http 200 ok.             return response.statuscode == httpstatuscode.ok;         }     }     catch     {         return false;     } } 

Comments

Popular posts from this blog

jquery - Invalid Assignment Left-Hand Side -

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -