software:db2:quick_tips
This is an old revision of the document!
Table of Contents
Quick Tips
How to find the version number of DB2
ON any client host
You will have to source the client's profile
source ~<clientUserID>/sqllib/db2cshrc
eg: source ~db2leduc/sqllib/db2cshrc
Issue the following Command
% db2level
DB21085I This instance or install (instance name, where applicable: "db2cli")
uses "64" bits and DB2 code release "SQL10012" with level identifier
"0203010E".
Informational tokens are "DB2 v10.1.0.2", "s121127", "IP23394", and Fix Pack
"2". Product is installed at "/cse/local/pkg/db2/V10.1".
Using client db2c64 (64 bit but version 9)
DB21085I Instance "db2c64" uses "64" bits and DB2 code release "SQL09017" with
level identifier "02080107".
Informational tokens are "DB2 v9.1.0.7", "s090308", "MI00273", and Fix Pack
" 7".
Product is installed at "/cse/local/pkg/db2/V9.1".
db2ls
This will only work on the server
To list the path where DB2 database products are installed on your system and
list the DB2 database product level, enter:
db2ls
This lists the installation path , level, fixpak, special install number ,
installation date , installer UID
db2ls -q -p -b baseInstallDirectory
where q is querying a product or feature
p specifies that the listing displays products
b specifies the installation directory of the product
db2ls is installed in /usr/local/bin as a symlink at installation time
If the host server has to be rebuild with a new operating system
This link will have to be recreated
gold ~]$ db2ls
Install Path Level Fix Pack Install Date
-----------------------------------------------------------------
/local/dbms/V9 9.7.0.6 6 Wed Aug 29 17:17:30 2012
/local/dbms/V10 10.1.0.0 0 Fri Sep 14 09:21:48 2012
db2val
This will only work on the server host
The db2val tool verifies the core function of a DB2 copy by validating
installation files,instances, database creation, connections to that database,
and the state of partitioned database environments. This validation can be helpful
if you have manually deployed a DB2 copy on Linux and UNIX operating systems using
tar.gz files. The db2val command can quickly ensure that all the configuration has
been correctly done and ensure that the DB2 copy is what you expect it to be.
You can specify instances and databases or you can run db2val against all of the instances. The db2val command can be found in the DB2-install-
path\bin and sqllib/bin directory
eg:
gold ~]$ db2val
Installation file validation for the DB2 copy installed at
/local/dbms/V10 was successful.
DB2 Tools
- db2icrt
- db2iupdt
software/db2/quick_tips.1362681783.txt.gz · Last modified: by seela
