Verifies the basic functions of a DB2® copy by checking the state of installation
files, instance setup, and local database connections.
Authorization
Instance
validation requires one of the following authorities:
- On root copies, root authority is required on Linux and UNIX operating
systems.
- SYSADM plus one of the following authorities:
- Instance owner
- Root access on Linux and UNIX operating systems, or Local
Administrator authority on Windows operating
systems
Command syntax
.------------------------.
V |
>>-db2val--+-----+----+--------------------+-+--+-----+--------->
'- -o-' '- -i--instance_name-' '- -a-'
>--+-----+--+--------------+--+---------------+--+-----+-------->
'- -s-' '- -b--db_name-' '- -l--log_file-' '- -t-'
>--+-----+--+-----+--------------------------------------------><
'- -d-' +- -h-+
'- -?-'
Command parameters
- -o
- Specifies that only the installation files will be validated;
validation of the instance, database, and extended security will not
be performed. If this parameter is specified, the -i, -a, -b,
and -s parameters are ignored.
- -i instance_name
- Specifies
the name of the instance to validate including pureScale® instance. To specify multiple
instances are to be validated, specify this parameter multiple times.
For example, -i inst1 -i inst2. On Windows operating
systems, if this parameter is not specified, the current instance
will be used as the default value. On Linux and UNIX operating systems, this parameter
can only be used by root users in a root installation of a DB2 copy.
- -a
- Validates all instances in the DB2 copy.
On Linux and UNIX operating systems, this parameter can only
be used by root users in a root installation of a DB2 copy. This parameter overrides parameter -i.
- -b <db_name>
- Validates
database creation and connections to the database specified. Only
active DB2 instances will be
validated and this parameter will be ignored for DB2 client and DB2 pureScale instances.
- -t <trace_file>
- This parameter applies only to Linux and UNIX operating systems. Specifies
the full path and name of trace file specified by trace_file.
- -d
- This parameter is deprecated and might be
removed in a future release. Use the -t parameter
instead. Valid only on Linux and UNIX operating systems. Use this
parameter only when instructed by DB2 Support.
Turns the debug mode on.
- -s
- Starts the DB2 database
manager for the specified instance that is part of a partitioned database
environment.
- -l <log_file>
- Writes the log to the file name specified. Unless the -l parameter
is specified, the default log path on Linux and UNIX operating systems is /tmp/db2valxx.log and
on Windows operating systems
is My Documents\DB2LOG\db2valxx.log, where xx is
a generated value.
- -? | -h
- Displays usage information for the db2val command.
Examples
To validate the instance TEST1
and the database DATA1, run the following command:
db2val -i TEST1 -b DATA1
To validate all the instances for the DB2 copy,
run the following command:
db2val -a
To
validate only the DB2 installation
files, run the following command:
db2val -o
Usage Notes
You
can use the db2val command only to validate installation files in
a DB2 pureScale environment.