Subject | Re: [firebird-support] Testing the Presence of a Server |
---|---|
Author | Paul Vinkenoog |
Post date | 2007-07-10T11:22:09Z |
Hi Stefan,
Even if the credentials are wrong, the answer will tell you if there's
a Firebird service manager at the other end.
I'm not sure if you can distinguish the absence of a service manager
from the total absence of a Firebird server though; you'd have to try
that out. If there's no difference, you could test for server presence
with the (deprecated) function isc_add_user(), supplying a nonsense
SYSDBA password. This isn't a service manager function, so any
Firebird server will respond to it.
HTH,
Paul Vinkenoog
> you all know that it can be sometimes difficult to connect to aYou can call isc_service_attach() to verify a user name and password.
> remote Firebird server.
> Does anybody know if there is any sequence of bytes that I can send
> to that newly opened TCP connection that will give me a reply that
> tells me it is a Firebird that I am connected to? (Ideally together
> with the server version number ... ;-)
> Or is there any other way to connect to the server alone without
> directly connecting to a database?
Even if the credentials are wrong, the answer will tell you if there's
a Firebird service manager at the other end.
I'm not sure if you can distinguish the absence of a service manager
from the total absence of a Firebird server though; you'd have to try
that out. If there's no difference, you could test for server presence
with the (deprecated) function isc_add_user(), supplying a nonsense
SYSDBA password. This isn't a service manager function, so any
Firebird server will respond to it.
HTH,
Paul Vinkenoog