Db2 support tools overview

The Db2® support tools package contains a number of scripts and utilities that can help with many of the common database administration tasks.

If you are using Db2 Warehouse

There are three options for obtaining the support tools:
  • If you do not need to use the tools remotely, you can use the Db2 support tools that are included in Db2 Warehouse image container. If you deploy the image container, no additional work is required to install or set up the tools.
  • If you want to use the tools remotely, you can use the Db2 support tools that are included in the Db2 Warehouse client container. If you deploy the client container, no additional work is required to install or set up the tools.
On Db2 Warehouse, you can run one of the support tools (for example, dbsql or db_migrate) in the following ways:
  • If you obtained the support tools from the image container, issue the following command as root on the container host's command line:
    docker exec -it Db2wh toolname
  • If you obtained the support tools from the client container, issue the following commands as root. (You run the tools from inside the client container, from the cli prompt.)
    
    docker exec -it client cli
    toolname
Note: When running the tools as user root or by using docker exec -it Db2wh toolname, the database user name is case sensitive. Ensure you use the exact letter case, as in the following example:
[root@node0109 - dashDB /]# dbsql -d BLUDB -u TestUser -pw password

If you are using IAS

On Integrated Analytics System, first connect to a database through a terminal session as a user from the bluadmin group:
ssh <username>@<Customer_defined_IP_address> -po 50022
and then you can run the selected tool command:
toolname

The tools are available in /opt/ibm/migration_tools.

Available tools

Refer to the toolkit for the complete list of available commands. In Db2 Warehouse, you can also get a list of the Db2 support tools and other Db2 Warehouse commands by issuing the following command:
docker exec -it Db2wh commands 
dbsql
A Db2 SQL command line interpreter. You can use dbsql to connect to a Db2 database and run SQL commands to manage the database or run reports. Your database user account controls the access and privileges for the dbsql session. This command is based on an IBM® Netezza® command that is called nzsql, and operates in a similar manner.
db_migrate
A utility for copying databases or tables from a Netezza database to a Db2 warehouse.
dbload
A tool that you can use to load data from the local host or a remote client, on all supported client platforms, into a Db2 warehouse.
db_ddl_* commands
Commands that export the data definition language (DDL) syntax that defines objects such as databases, tables, views, functions, and other contents of the Db2 database.
db_getstats and db_genstats commands
Commands that obtain statistics and generate the statistics for the user tables in the Db2 database.
db_size
A command that displays the size information for tables in the Db2 database.
db_tables
A command that displays information about the tables in the Db2 database.