How can I select the Database-Version ?
Posted in 2000
Topics: General Discussion
Hello, is it possible to retrieve the database-version via SELECT-statement ? Thanks Bernd
Brett Randall wrote:
>
> select owner
> from systables
> where tabname = " VERSION">
> ^ note space
>
> Bizarre, I know ...
>
> Brett Randall
>
> Bernd Steinhauer wrote:
>
> > Hello,
> >
> > is it possible to retrieve the database-version via SELECT-statement ?
> >
> > Thanks
> > Bernd
The problem doing this select is, that You get the version, which was
used
when the database was created. This may differ from the actual version,
if
You did an update in between.
A far better seems to me to use an "dbaccess -V" instead
--
*******************************************************************************
* Any opinions written in this e-mail are my own. They may not
correspond to *
* those of my
company. *
*******************************************************************************
* Wolfgang Zager Berghauser Str.
104 *
* BAB Data-Systems GmbH D-42349
Wuppertal *
* Abt. Programmierung Tel. : +49 202
479870 *
* Fax : +49 202
470035 *
* E-Mail:
zager@gmx.de *
*******************************************************************************
select owner
from systables
where tabname = " VERSION"
^ note space
Bizarre, I know ...
Brett Randall
Bernd Steinhauer wrote:
> Hello,
>
> is it possible to retrieve the database-version via SELECT-statement ?
>
> Thanks
> Bernd
"Brett Randall" <Brett@reply.to.newsgroup> ...
> select owner
> from systables
> where tabname = " VERSION">
> ^ note space
>
> Bizarre, I know ...
Unfortunately this is a shortened version (without the F,U or T)
and more the version number of the sysmaster database when it was
*installed*. This is not necessarily the version you are running
now after some db upgrades...
Since 7.31 the dbinfo function can do the trick:
SELECT DBINFO('version', 'full') FROM systables WHERE tabid = 1;
For more options see the SQL syntax guide.
>
> Brett Randall
>
> Bernd Steinhauer wrote:
>
> > Hello,
> >
> > is it possible to retrieve the database-version via SELECT-statement
?
> >
> > Thanks
> > Bernd
>
HTH
Christian
--
The opinions stated above are my own
and not necessarily those of my employer.
Another one for the FAQ!
Christian Knappke wrote in message <8ubiqc$2pj$1@news1.wdf.sap-ag.de>...
>
>"Brett Randall" <Brett@reply.to.newsgroup> ...
>> select owner
>> from systables
>> where tabname = " VERSION">>
>> ^ note space
>>
>> Bizarre, I know ...
>
>Unfortunately this is a shortened version (without the F,U or T)
>and more the version number of the sysmaster database when it was
>*installed*. This is not necessarily the version you are running
>now after some db upgrades...
>
>Since 7.31 the dbinfo function can do the trick:
>
>SELECT DBINFO('version', 'full') FROM systables WHERE tabid = 1;
>
>For more options see the SQL syntax guide.
>
>>
>> Brett Randall
>>
>> Bernd Steinhauer wrote:
>>
>> > Hello,
>> >
>> > is it possible to retrieve the database-version via SELECT-statement
>?
>> >
>> > Thanks
>> > Bernd
>>
>
>HTH
>Christian
>--
>
>The opinions stated above are my own
>and not necessarily those of my employer.
>
>
Bernd Steinhauer wrote:
> is it possible to retrieve the database-version via SELECT-statement ?
According to the 9.20 Informix Guide to SQL: Syntax (6527.pdf from
http://www.informix.com/answers), you can use:
DBINFO('version', 'specifier')
Where specifier can be one of:
'full'
'server-type'
'major'
'minor'
'os'
'level'
On my 9.21.UC1 Foundation.2000 server, I get:
select
dbinfo('version', 'server-type'),
dbinfo('version', 'major'),
dbinfo('version', 'minor'),
dbinfo('version', 'os'),
dbinfo('version', 'level'),
dbinfo('version', 'full')
from systables where tabid = 1;
Informix Dynamic Server 2000|9|21|U|C1|Informix Dynamic Server 2000
Version 9.21.UC1
Kinda useful, those manual thingies! :-)
--
Yours,
Jonathan Leffler (Jonathan.Leffler@Informix.com) #include <disclaimer.h>
Guardian of DBD::Informix v1.00.PC1 -- http://www.perl.com/CPAN
"I don't suffer from insanity; I enjoy every minute of it!"