how to get the server version from C?
Posted in 2000
Topics: General Discussion
Hello, Is it possible to get the server version number of the server I am connected to from a C program? I cannot execute any program, is there a table I can scan to get the version? I am interested in Informix 9.20, 7.31, 7.30, 7.22, if there is a solution that only works for 9.20, I would appreciate if you post it anyway. Thank you. Alex Sent via Deja.com http://www.deja.com/ Before you buy.
SELECT DBINFO( 'version', <specifier>) FROM systables where tabid = 99; where the possible values for <specifier> are detailed in the Guide to SQL: Syntax manual. This function and 'version' option is first available to IDS 7.30. You will have to identify the 7.22 server by the -728 error that is returned when you try to run this function there. Art S. Kagel abeylin@yahoo.com wrote: > Hello, > > Is it possible to get the server version number of the server I am > connected to from a C program? > I cannot execute any program, is there a table I can scan to get the > version? I am interested in Informix 9.20, 7.31, 7.30, 7.22, if there > is a solution that only works for 9.20, I would appreciate if you post > it anyway. > > Thank you. > Alex > > Sent via Deja.com http://www.deja.com/ > Before you buy.
On Tue, 18 Apr 2000 13:36:16 -0400, "Art S. Kagel"
<kagel@bloomberg.net> wrote:
>SELECT DBINFO( 'version', <specifier>)
>FROM systables where tabid = 99;
>
>where the possible values for <specifier> are detailed in the Guide to
>SQL: Syntax manual.
>
>This function and 'version' option is first available to IDS 7.30. You
>will
>have to identify the 7.22 server by the -728 error that is returned when
>you try to run this function there.
and prior 7.30
SELECT owner
FROM systables
WHERE tabname = " VERSION" (space is required!)
but I found bug(?)
On our testing instance we upgrading from 7.30UC1 to 7.30UC8 and new
version running on old dbbspaces. And result from this SELECT is
7.30C1 (onstat - output is right: 7.30.UC8)
--
Jiří Lisický ČD DATIS Olomouc
e-mail: lisicky@datis.cdrail.cz Nerudova 1
phone: +420-068-472-5496 Olomouc, Czech Republic
>>> čeština ISO-8859-2 Compatible <<<
Jiri Lisicky wrote:
> On Tue, 18 Apr 2000 13:36:16 -0400, "Art S. Kagel"
> <kagel@bloomberg.net> wrote:
>
> >SELECT DBINFO( 'version', <specifier>)
> >FROM systables where tabid = 99;
> >
> >where the possible values for <specifier> are detailed in the Guide to
> >SQL: Syntax manual.
> >
> >This function and 'version' option is first available to IDS 7.30. You
> >will
> >have to identify the 7.22 server by the -728 error that is returned when
> >you try to run this function there.
>
> and prior 7.30
> SELECT owner
> FROM systables
> WHERE tabname = " VERSION" (space is required!)>
> but I found bug(?)
> On our testing instance we upgrading from 7.30UC1 to 7.30UC8 and new
> version running on old dbbspaces. And result from this SELECT is
> 7.30C1 (onstat - output is right: 7.30.UC8)
Not a bug; the version in the " VERSION" entry is not guaranteed
to be identical to the version from onstat -V. It represents the
version of the metadata in the system catalogs, and in the reserved
spaces, and sysmaster, and so on. That doesn't normally change
between a UC1 and a UC8 release. This discrepancy was why the
DBINFO() information was introduced.
--
Jonathan Leffler (jleffler@informix.com, jleffler@earthlink.net)
Guardian of DBD::Informix v1.00.PC1 -- see http://www.perl.com/CPAN
#include <disclaimer.h>
>Subject: how to get the server version from C? >From: abeylin@yahoo.com >Date: 18.04.00 18:54 W. Europe Daylight Time >Message-id: <8di3v3$v59$1@nnrp1.deja.com> > >Hello, > >Is it possible to get the server version number of the server I am >connected to from a C program? >I cannot execute any program, is there a table I can scan to get the >version? I am interested in Informix 9.20, 7.31, 7.30, 7.22, if there >is a solution that only works for 9.20, I would appreciate if you post >it anyway. > >Thank you. >Alex > > >Sent via Deja.com http://www.deja.com/ >Before you buy. > > > > > > try dbinfo() Nona