Subject | Re: [firebird-support] How to tell if a client is connecting to a classic or super server |
---|---|
Author | Ann W. Harrison |
Post date | 2005-03-03T23:16:52Z |
> Ann W. Harrison wrote:Milan Babuskov wrote:
>>In the API, there's the isc_version call.
>
>No, I meant isc_version. Look in utl.cpp ("g d s _ $ v e r s i o n").
> I searched for isc_version but found nothing.
> I guess you are refering to isc_info_svc_server_version?
More on that below my signature.
However, it won't answer the original question - whether the remote
server is classic or superserver. My instinctive reaction, as a
developer, is to ask "Why do you need to know that?". But that's the
question lots of operating system developers have asked me, and I always
had a good reason. If the reason is to know whether you can use the
services API, I guess the answer is to try. In V2, it works everywhere.
In Vulcan (at the moment) it works nowhere, but will work everywhere.
With Vulcan, that question of what architecture you're dealing with gets
much harder to answer, because the code itself doesn't know. In Vulcan,
the configuration file for a specific database determines whether access
to that database is shared - like classic - or exclusive - like
superserver and embedded. And, in Vulcan, you can have a tcp/ip server
handling many incoming connections - like superserver - and still allow
concurrent local direct connections - like classic.
Regards,
Ann
int API_ROUTINE isc_version(isc_handle* handle,
FPTR_VERSION_CALLBACK routine, void* user_arg)
It's a thin layer over the isc_database_info call, which may be more
useful to you. The code to use the info call is all in utl.cpp.
isc_version used in all the utilities to respond to "show version" or -z.
From ISQL it looks like this [reformatted from the clip for readability]:
C:\harrison>isql foo.fdb
Database: foo.fdb
SQL> show version;
ISQL Version: WI-V2.0.0.4027 Vulcan 1.0 Development
Firebird/x86/Windows NT (access method), version
"WI-V2.0.0.4027 Vulcan 1.0 Development"
on disk structure version 10.1
SQL> commit;
SQL> connect hotspur:\harrison\foo.fdb;
Database: hotspur:c:\harrison\foo.fdb
SQL> show version;
ISQL Version: WI-V2.0.0.4027 Vulcan 1.0 Development
Firebird/x86/Windows NT (access method),
version "WI-V1.5.2.4731 Firebird 1.5"
Firebird/x86/Windows NT (remote server),
version "WI-V1.5.2.4731 Firebird 1.5/tcp (hotspur)/P10"
Firebird/x86/Windows NT (remote interface),
version "WI-V2.0.0.4027 Vulcan 1.0 Development/tcp (hotspur)/P10"
on disk structure version 10.1
SQL>
The first line is the version for the utility. The next line (shown as
two lines to fit on a screen) comes from the engine. The next line
(again shown as two) comes from the server that talks to the engine. The
next line(shown as two) comes from the interface that contacts the
server that talks to engine. The last line gives the ODS version.