[quoted text, click to view] sumGirl wrote:
> Hi all. I have a simple vbs script I use to connect to sql server, try
> and read from a table, and if it fails notify me that the sql server
> might be down. Works fine in its very simple way, but what I am
> wondering is if I should try and connect to one table from every
> specific database on the server? Is it possible for one database on
> this server to be up, say for instance the master db and one of my
> user db's to not be up? Just wondering about false positives and if I
> should test deeper.
>
> Not trying to make it to complicated, it really is the equivanlent of
> a dashboard idiot light!
Well, from my understanding, database can't be up/down - that's the server's "feature".
So i guess that you just need to try to connect to the sql server, not accessing any tables.
What i see as a hole in your approach is that if the table you check in a database is locked
by any other process(e.g. sometimes happens with tables linked to ms access), you will not get
access to the table and you get a false alarm.
Or, if you still want to check some tables, you better call a stored procedure from you vb script,
and the stored proc should make the checks and return the status - should be more secure and
reliable, i think.
But anyway, if you want to make it simple, just connect to the database without accessing any
tables, and disconnect - should be more or less reliable for this purpose.
WIGL,