Use this utility to check whether your system is correctly
configured for using pureQuery.
This topic contains the following sections:
Syntax of command

(1)
>>-------java com.ibm.pdq.tools.DataVersion--------------------->
>--+------------------------------------------------------------------------------------------------------------+-->
'- -configuration--+---------------------------------------------------------------------------------------+-'
'- -url--JDBC-URL-- -userName--user-ID-- -password--password-- -driverName--JDBC-driver-'
>--+------------+--+------------+--+-----------+--+--------+---><
'- -features-' '- -validate-' '- -version-' '- -help-'
Notes:
- You can specify the
options in any order.
To understand
the conventions that are used in the diagram, see How to read syntax diagrams.
Descriptions of options
- -configuration
- Displays the following information for the system on which you
run the command:
- The version of pureQuery Runtime that is installed
- The vendor, version, and name of the installed Java Virtual Machine
- The vendor, version, and name of the installed Java Runtime Environment
- The current classpath
- The name, architecture, and version of the installed operating
system
- The version of IBM® Data
Server Driver for JDBC and SQLJ that is installed
- A list of the licensed pureQuery features that are activated
- A list of resolved pureQuery property values based on the current
classpath and current JVM options.
- If you specify the following options, the -configuration option
also displays information for the system on which a database is located:
- -url JDBC-URL
- Specifies the JDBC URL to use to establish a connection with the
database.
- -userName user-ID
- Specifies the user ID to use for authenticating with the database.
If the -url option is specified, the -userName must
also be specified.
- -password password
- Specifies the password to use for authenticating with the database.
- -driverName JDBC-driver
- Specifies the fully-qualified name of the JDBC driver to use for
establishing a connection to the database. For example, if you are
using the IBM Data Server Driver
for JDBC and SQLJ, the driver name is com.ibm.db2.jcc.DB2Driver.
When you specify these options for connecting to a
database, the DataVersion utility displays this additional information:- Database Major Version
- Database Minor Version
- Database Product Name
- Database Product Version
- Username as known to the database
If you use the IBM Data
Server Driver for JDBC and SQLJ to connect to the database, the DataVersion
utility displays this additional information:- ClientUser
- ClientWorkstation
- ClientApplicationInformation
- ClientAccountinginformation
- ClientProgramId
- CurrentPackageSet
- CurrentPackagePath
- isDB2GatewayConnection
- -features
- Displays a list of the licensed pureQuery features that are activated.
- -validate
- Checks whether a supported version of IBM Data Server Driver for JDBC and SQLJ is on
the CLASSPATH. Also, checks whether a supported version of a Java Virtual Machine is on the CLASSPATH.
- -version
- Displays the version and build level of pureQuery Runtime.
- -help
- Displays summary usage information.
The format of the output of these options is subject
to change.
Running the DataVersion
utility from an application
You can retrieve information
from the DataVersion utility by calling the following methods from
a Java application:
public static String com.ibm.pdq.tools.DataVersion.getVersion();
public static String com.ibm.pdq.tools.DataVersion.getConfiguration();
public static String com.ibm.pdq.tools.DataVersion.getConfiguration(String url, String user, String password, String driverName);
public static String com.ibm.pdq.tools.DataVersion.getConfiguration(java.sql.Connection connection);
public static String com.ibm.pdq.tools.DataVersion.getFeatures();
public static String com.ibm.pdq.tools.DataVersion.validate();
These
methods return the same output that the corresponding command line
options provide, but in a returned String object. The content of
the String contains new-line characters for breaking lines.
Here
is an example of a call to the getVersion() method:
String versionInfo = com.ibm.pdq.tools.DataVersion.getVersion();
System.out.println (versionInfo);
The output of these
methods is subject to change.