Section 12.6. The db2move Utility


12.6. The db2move Utility

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.

Figure 12.32. Syntax diagram of the db2move command
                             .---------------------------.                             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.



Understanding DB2(R. Learning Visually with Examples)
Understanding DB2: Learning Visually with Examples (2nd Edition)
ISBN: 0131580183
EAN: 2147483647
Year: 2004
Pages: 313

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net