Re: Best way to check oracle database server / services is alive using Java



On Apr 4, 10:50 am, "joeNOS...@xxxxxxx" <joe.weinst...@xxxxxxxxx>
wrote:
On Apr 3, 9:56 pm, harishas...@xxxxxxxxx wrote:

Hi,

I am looking for the best way to check whether several oracle (or any
database) databases is running or not.
At the moment I just attempt to connect to the server IP using Socket
and conclude the database is not running if connection timed out.
Which is a silly way of doing it.
Appreciate any help.
Best regards.

It's not silly, it's elementary. That's as good as you can do
generically,
in that it's quick, and if you can't get a socket to the DBMS
listener,
your JDBC driver won't either (as long as the driver is also using
TCPIP)
to connect) but not completely reliable, because the DBMS listener may
be
up, but the DBMS may still not be in an operating condition.

Joe Weinstein at BEA Systems

And another problem (with no solution) is that a DBMS
might have a limit on the number of concurrent
connections, so a new socket request may be rejected,
but all currently existing connections may be operating
as expected.... Just to say the real answer to the general
question may not be trivial to get. In fact, if the
conditions are dynamic, whatever test you make may
pass, but the DBMS or environment may change in between
your running your test and your acting on the results.
Good luck,
Joe

.



Relevant Pages

  • Re: Kinda urgent Connection error messages
    ... driver perspective, these are all unexpected problems the driver is suffering ... I guarantee that the driver is making the socket the same way ... Do you hold JDBC connections open indefinitely, ... Maybe the DBMS has an idle connection timeout, ...
    (microsoft.public.sqlserver.jdbcdriver)
  • Re: Good Books on MultiValue Databases
    ... have to admit I was intrigued by the multivalue database, however, I ... In SQL-relational land you 'talk' to the DBMS via SQL commands. ... Do not be confused about this: PickBasic is not a scripting language. ...
    (comp.databases.pick)
  • Re: Size matters to some
    ... BobJ wrote: ... specified to the DBMS tools with a maxlen specification, ... database does, without the maxlen specification to the DBMS. ... Field A is supposed to be 2 characters of a country abbreviation, ...
    (comp.databases.pick)
  • Re: Object oriented database
    ... By 'dbms' do you mean VAX DBMS? ... line from digital's database folks to be incredibly interesting. ... It made input from files with repeating groups "look ... rdbms has this where the actual implementation of the database is ...
    (comp.databases.theory)
  • Re: File-System or DBMS? (non-flammable clothing optional)
    ... didn't know how to design a database." ... I, too, think that it is not a good design to ... writing sentences with lists within lists is not common, ... Once Pick was the operating system, and you can't get much more DBMS than ...
    (comp.databases.pick)