How to get SQL instances at runtime

A

AliNawaz

hello
I am working on Microsoft SQL database, and I've to connect my client database with my Server database dynamically. For that I need all the instances of database running at SQL server, and from them my client will search the desired database and will try to connect it. The problem is whenever my client (database) tries to connect with a database whose machine is down for meantime, it takes time to check whether its my database or not.I have to reduce that time. So, please help me

From http://www.developmentnow.com/g/36_2005_1_0_0_0/dotnet-languages-csharp.htm

Posted via DevelopmentNow.com Groups
http://www.developmentnow.com
 
G

Guest

Hi,

You can use WMI in order to check if the database is up and running.

WMI = Windows Management Instrumentation.

There are plenty of queries to check this, is a little tricky to learn how
to use it but when you manage it you will be able to query whatever you want
from a remote computer.

Other way: You can enumerate the Process running on a remote machine, and
check for the SQL String

best regards
Salva
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top