How to verify if a remote server is accessible or not?
I want to perform an open query on it, but before I would like to know if the server is online or not in order to generate a message.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Even you check before execute your query it can be unavailable when you calling the method. So what you can do is try to process the task and catch the exception. you can show the message based on the exception.
If you want to check availability of SQL Server check this.