SQL/MP Version Management Guide

Software Versions and Releases
Compaq NonStop™ SQL/MP Version Management Guide429833-001
2-5
Using the GET VERSION OF SYSTEM Statement
application developers and database administrators to determine which version of
SQL/MP software is currently operating on a particular system.
To retrieve the SQL/MP software version currently running, use either of these methods:
Execute the GET VERSION OF SYSTEM statement, either programmatically or
through SQLCI (use only with version 300 or newer).
From a program, execute the system library procedure
SQLGETSYSTEMVERSION (use with any version except version 1).
Using the GET VERSION OF SYSTEM Statement
You can execute the GET VERSION OF SYSTEM statement from a static or dynamic
SQL program, or you can enter it as a command through the SQLCI command interface.
The GET VERSION OF SYSTEM statement returns the version number of the SQL/MP
software running on a specified node.
The GET VERSION OF SYSTEM statement is not available to version 1 or version 2
SQL programs or SQLCI. You must enter the statement from a node running version
300 or newer SQL/MP software. In a network, you can execute the GET VERSION OF
SYSTEM statement to retrieve the version of SQL/MP software running on a remote
node, even if the software on the remote node is an older version.
For example, suppose you are running version 315 SQLCI on a node named \SYS3. To
determine the version of the software running on node \SYS2, type:
>> GET VERSION OF SYSTEM \SYS2;
SQLCI returns:
VERSION: 2
--- SQL operation complete.
For the syntax of the GET VERSION OF SYSTEM statement and for examples of using
the statement in static and dynamic SQL programs, see the SQL/MP Reference Manual
and the NonStop SQL/MP Programming Manual for the language you are using.
Using the SQLGETSYSTEMVERSION Procedure
You can call the TAL procedure SQLGETSYSTEMVERSION from a program to
retrieve the version of the SQL/MP software running on a specified node. You can call
the SQLGETSYSTEMVERSION procedure from version 2 SQL programs in addition
to version 300 and newer programs. The SQLGETSYSTEMVERSION procedure is not
available to version 1 programs and will be phased out in a future release of SQL/MP.
Therefore, use the GET VERSION OF SYSTEM statement instead of
SQLGETSYSTEMVERSION in any programs whose program format version is 300 or
newer.
For information on program versions, see Section 5, Program Versions
. For information
on developing version-independent applications, see Section 7, Version Compatibility
for SQL Programs.