You can only operate the export, import, and load utilities on one table at a time. To move a large number of tables between DB2 databases, use the db2move utility. Based on the action you request, the utility calls the DB2 export, import, and load application programming interfaces (APIs) accordingly. Refer to Figure 12.32 for options supported by db2move.
.---------------------------. V | >>-db2move--dbname--action----+-----------------------+-+------>< +--tc--table-creators---+ +--tn--table-names------+ +--sn--schema-names-----+ +--ts--tablespace-names-+ +--tf--filename---------+ +--io--import-option----+ +--lo--load-option------+ +--l--lobpaths----------+ +--u--userid------------+ +--p--password----------+ '--aw-------------------' |
The db2move command can also be used without any options. This example exports all tables in the sample database:
db2move sample export
To import tables with schema dbaadmin and schemas that start with dbauser, you can specify the –tc option and provide a list of schema names; the command also accepts the wildcard (*).
db2move sample import –tc dbaadmin,dbauser*
You can also specify the replace mode and lobpath:
db2move sample load –lo replace -l c:lobpath1,c:lobpath2
There is no specific authorization prerequisite to invoke this utility. However, the user ID must have the correct authorization and/or privileges for the associated utility (export, import, and load) to take action.