DB2:Utilities

From PIT (Practical IT) Wiki
Jump to navigation Jump to search

Several processes in DB2 are running as utilities in order to keep them independent from user sessions on the command line.

  • backup
  • restore
  • runstats
  • reorg

After being started via cli (command line interface) they will start a DB2 internal utility and will execute in the background. This means: If you kill your session the utility will continue under its own process.

To review that process on OS level type:

$ ps -ef | grep db2

You might find a process named above in the output.

In case you have access to owner or another user with suitable permissions you can also issue some db2 commands:

$ db2 list utilities

or

$ db2pd -runstats

To review all kinds of processes, utilities, sessions and tables (and much more) consult the db2top interface as instance owner by running:

$ db2top -d <name_of_database>

You might need to set several environment variables to get valid (and even colored) output on your screen.

LC_COLLATE="C"

LC_CTYPE="C"

LC_MONETARY="C"

LC_NUMERIC="C"

LC_TIME="C"

LC_MESSAGES="C"

LC_ALL=

LANG="en_US"

and issue

$ set | egrep 'LC|LANG'

to check if your amendments are correct.

But: Be careful if your DB server is not preset to another LANG value. In this case keep the 'normal' LANG value and reset it to the original version after db2top is closed.