all groups > sql server connect > july 2003 >
You're in the

sql server connect

group:

How to know a database is alive without doing connection


How to know a database is alive without doing connection John
7/31/2003 1:39:41 PM
sql server connect:
I want to check if a database server is listening for
connection before to connect to this database server. I
heard that Weblogic comes with a class called
java.util.dbping which does this. However, I am not sure
whether other lagnuages have a similar one. To make it
short, I am looking for an idea instead of tied to any
programming language.

I know I can do this by going to socket lever programming
using tcp protocol so I can check if a specific port in a
giving host to see if it is open to listen. Does someone
know if a database server, like SQL 2000 server will echo
anything to a client that sent a message or there is a
specification on this purpose? The key is, I don't want
open any connection before I know if the database is
available or alive. So how can I check a database
availability?


Thanks in advance.

Re: How to know a database is alive without doing connection Dejan Sarka
8/1/2003 12:47:24 PM
You can try with the OSQL -L command. Check tools developed by Gert Drapers
at http://www.sqldev.net/misc/EnumSQLSvr.htm,
http://www.sqldev.net/misc/ListSQLSvr.htm and
http://www.sqldev.net/misc/OleDbEnum.htm.

--
Dejan Sarka, SQL Server MVP
FAQ from Neil & others at: http://www.sqlserverfaq.com
Please reply only to the newsgroups.
PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org

[quoted text, click to view]

AddThis Social Bookmark Button