Beside the standard Command Line Processor Commands (CLP), DB2 is
enhanced with full set of system commands. DB2 system commands are used to
access and maintain the DB2 database and can be entered from the OS command
line, or can be used in a shell script. Set of commands depends on the version
and packaging models (Standard, EE or EEE) installed on the machine. Every new
DB2 version extends the existing set of the commands; in version 7.2 DB2 UDB
EEE there is already 87 such commands. A DBA has a chance to be familiar with
some of these commands only if he has a problem and needs to use some of them.
More over, there is a slight difference in command sets between platforms.
In this article I will explain some of the special DB2 system
commands.
This article covers:
- DB2
System Commands Overview - db2ptree
– Show DB2 Process Tree for Sun Solaris - db2empfa
– Enable Multi-page File Allocation - db2gov
– DB2 Governor - db2osconf
– DB2 Operating System Configuration - Conclusion
DB2 System Commands
Overview
All DB2 system commands are installed in the sqllib/bin directory
by the installation procedure. Most commands have interactive help so simply
typing the command will generate a listing of all possible command switches.
Database version 7.1 with Fixpack 7 has 87 different db2
system commands including "db2_" system commands for control of
multipartitioned database.
>> db2level
DB21085I Instance “db2udb1” uses DB2 code release “SQL07025” with level identifier “03060105” and
informational tokens “DB2 v7.1.0.68”, “s020616” and “U484483”>> ls sqllib/bin/db2* | wc -l
87
Here is standard set of the system commands for DB2
version 7:
Number |
System Command |
Explanation |
1 |
Db2admin |
DB2 Administration Server |
2 |
db2adutl |
Work with TSM Archived Images |
3 |
db2advis |
DB2 Index Advisor |
4 |
db2audit |
Audit Facility Administrator Tool |
5 |
db2atld |
Autoload |
6 |
db2batch |
Benchmark Tool |
7 |
db2bfd |
Bind File Description Tool |
8 |
db2cap |
CLI/ODBC Static Package Binding |
9 |
db2cc |
Start Control Center |
10 |
db2cdbcr |
Create Control Database for Data |
11 |
db2cfexp |
Connectivity Configuration Export |
12 |
db2cfimp |
Connectivity Configuration Import |
13 |
db2cidmg |
Remote Database Migration Tool |
14 |
db2ckbkp |
Check Backup |
15 |
db2ckmig |
Database Pre-migration Tool |
16 |
db2ckrst |
Check Incremental Restore Image |
17 |
db2cli |
DB2 Interactive CLI |
18 |
db2cmd |
Open DB2 Command Window |
19 |
db2dclgn |
Declaration Generator |
20 |
db2drdat |
DRDA Trace |
21 |
db2empfa |
Enable Multi-page File Allocation |
22 |
db2eva |
Event Analyzer |
23 |
db2evmon |
Event Monitor Productivity Tool |
24 |
db2exfmt |
Explain Table Format Tool |
25 |
db2expln |
DB2 SQL Explain Tool |
26 |
db2flsn |
Find Log Sequence Number |
27 |
db2fs |
First Steps |
28 |
db2gncol |
Update Generated Column Values |
29 |
db2gov |
DB2 Governor |
30 |
db2govlg |
DB2 Governor Log Query |
31 |
db2icrt |
Create Instance |
32 |
db2idrop |
Remove Instance |
33 |
db2ilist |
List Instances |
34 |
db2imigr |
Migrate Instance |
35 |
db2inidb |
Initialize a Mirrored Database |
36 |
db2ipxad |
Get IPX/SPX Internetwork Address |
37 |
db2iupdt |
Update Instances |
38 |
db2ldcfg |
Configure LDAP Environment |
39 |
db2licm |
License Management Tool |
40 |
db2look |
DB2 Statistics and DDL Extraction |
41 |
db2move |
Database Movement Tool |
42 |
db2mscs |
Set up Windows NT Failover Utility |
43 |
db2nchg |
Change Database Partition Server |
44 |
db2ncrt |
Add Database Partition Server to |
45 |
db2ndrop |
Drop Database Partition Server |
46 |
db2perfc |
Reset Database Performance Values |
47 |
db2perfi |
Performance Counters Registration |
48 |
db2perfr |
Performance Monitor Registration |
49 |
db2profc |
DB2 SQLJ Profile Customizer |
50 |
db2profp |
DB2 SQLJ Profile Printer |
51 |
db2rbind |
Rebind all Packages |
52 |
Db2relocatedb |
Relocate Database |
53 |
db2sampl |
Create Sample Database |
54 |
db2set |
DB2 Profile Registry Command |
55 |
db2sql92 |
SQL92 Compliant SQL Statement |
56 |
db2start |
Start DB2 |
57 |
db2stop |
Stop DB2 |
58 |
db2support |
Problem Analysis and Environment |
59 |
db2sync |
Start DB2 Synchronizer |
60 |
db2tbst |
Get Tablespace State |
61 |
db2trc |
Trace |
62 |
db2uiddl |
Prepare Unique Index Conversion to |
63 |
db2untag |
Release Container Tag |
Version 8.1 has more system commands and the DBA should
regularly check /sqllib/bin directory after installation for the new stuff.