DB2 Version 9.7 for Linux, UNIX, and Windows

db2val - DB2 copy validation tool command

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:
  • On root copies, root authority is required on Linux and UNIX operating systems.
  • SYSADM plus one of the following:
    • Instance owner
    • Root access on Linux and UNIX operating systems, or Local Administrator authority on Windows operating systems

Required Connection

None.

Command syntax

Read syntax diagramSkip visual syntax diagram
                    .------------------------.            
                    V                        |            
>>-db2val--+-----+----+--------------------+-+--+-----+--------->
           '- -o-'    '- -i--instance_name-'    '- -a-'   

>--+-----+--+--------------+--+---------------+--+-----+-------->
   '- -s-'  '- -b--db_name-'  '- -l--log_file-'  '- -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 that the name of the instance to validate. 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 instances.
-d
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