|The db2move tool now has two addtional options, --aw and --sn. Full documentation |for this tool follows:
|This tool facilitates the movement of large numbers of tables between DB2 |databases located on workstations. The tool queries the system catalog tables |for a particular database and compiles a list of all user tables. It then |exports these tables in PC/IXF format. The PC/IXF files can be imported or |loaded to another local DB2 database on the same system, or can be transferred |to another workstation platform and imported or loaded to a DB2 database |on that platform.
|Authorization
|This tool calls the DB2 export, import, and load APIs, depending on the |action requested by the user. Therefore, the requesting user ID must have |the correct authorization required by those APIs, or the request will fail.
|Command Syntax
| .-------------------------. | V | |>>-db2move--dbname--action----+---------------------+-+-------->< | +--tc--table-creators-+ | +--tn--table-names----+ | +--sn--schema names---+ | +--io--import-option--+ | +--lo--load-option----+ | +--l--lobpaths--------+ | +--u--userid----------+ | +--p--password--------+ | '--aw-----------------' | |
|Command Parameters |
|This is an EXPORT action |only. If specified, only those tables created by the creators listed with |this option are exported. If not specified, the default is to use all creators. |When specifying multiple creators, each must be separated by commas; no blanks |are allowed between creator IDs. The maximum number of creators that can be |specified is 10. This option can be used with the 『-tn』 and 『-sn』 options |to select the tables for export.
|An asterisk (*) can be used |as a wildcard character that can be placed anywhere in the string.
|This is an EXPORT action |only. If specified, only those tables whose names match exactly those in the |specified string are exported. If not specified, the default is to use all |user tables. When specifying multiple table names, each must be separated |by commas; no blanks are allowed between table names. The maximum number of |table names that can be specified is 10. This option can be used with the 『-tc』 and 『-sn』 options to select the tables for export. db2move will only export those tables whose names are matched with specified |table names and whose creators are matched with specified table creators.
|An asterisk (*) can be used as a wildcard character that |can be placed anywhere in the string.
|This is an EXPORT action |only. If specified, only those tables whose schemas match exactly those in |the specified string are exported. If not specified, the default is to use |all schemas. When specifying multiple schema names, each must be separated |by commas; no blanks are allowed between schema names. The maximum number |of schema names that can be specified is 10. This option can be used with |the 『-tc』 and 『-tn』 options to select the tables for export. db2move will only export those tables whose names |are matched with specified table names, whose schemas are matched with specific |table schemas, and whose creators are matched with specified table creators.
|An asterisk (*) can be used as a wildcard character that |can be placed anywhere in the string.
|Valid options are INSERT, |INSERT_UPDATE, REPLACE, CREATE, and REPLACE_CREATE.
|Valid options are INSERT and |REPLACE.
|This option specifies |the absolute path names where LOB files are created (as part of EXPORT) or |searched for (as part of IMPORT or LOAD). When specifying multiple LOB paths, |each must be separated by commas; no blanks are allowed between LOB paths. |If the first path runs out of space (during EXPORT), or the files are not |found in the path (during IMPORT or LOAD), the second path will be used, and |so on.
|If the action is EXPORT, and LOB paths are specified, all files |in the LOB path directories are deleted, the directories are removed, and |new directories are created. If not specified, the current directory is used |for the LOB path.
|Both user ID and password |are optional. However, if one is specified, the other must be specified. If |the command is run on a client connecting to a remote server, user ID and |password should be specified.
|Both user ID and |password are optional. However, if one is specified, the other must be specified. |If the command is run on a client connecting to a remote server, user ID and |password should be specified.
|Used for the EXPORT action only. If this option is |specified, then any tables that receive warnings during export will be included |in the db2move.lst file. If the option is omitted, then any tables that cause |warnings during export are not included in the db2move.lst file. A table's |.ixf file and .msg file are generated regardless of whether or not this option |is used. |
|Examples |
|This will export all tables in the |SAMPLE database; default values are used for all options.
|This will export all tables created by 『userid1』 or user IDs LIKE 『us%rid2』, and with the name 『tbname1』 or table names LIKE 『%tbname2』.
|This example |is applicable to OS/2 or the Windows operating system only. The command will |import all tables in the SAMPLE database; LOB paths 『D:\LOBPATH1』 and 『C:\LOBPATH2』 are to be searched for LOB files.
|This example |is applicable to UNIX-based systems only. The command will load all tables |in the SAMPLE database; both the /home/userid/lobpath subdirectory |and the tmp subdirectory are to be searched for LOB files.
|This will import all tables in the SAMPLE database in REPLACE mode; the specified |user ID and password will be used. |
|Usage Notes
|This tool exports, imports, or loads user-created tables. If a database |is to be duplicated from one operating system to another operating system, db2move facilitates the movement of the tables. It |is also necessary to move all other objects associated with the tables, such |as aliases, views, triggers, user-defined functions, and so on. db2look (DB2 Statistics and DDL Extraction Tool; see the Command Reference) |can facilitate the movement of some of these objects by extracting the data |definition language (DDL) statements from the database.
|When export, import, or load APIs are called by db2move, the FileTypeMod parameter is set to lobsinfile. That is, LOB data is kept in separate files from PC/IXF files. There |are 26 000 file names available for LOB files.
|The LOAD action must be run locally on the machine where the database and |the data file reside. When the load API is called by db2move, the CopyTargetList parameter is set to NULL; that |is, no copying is done. If logretain is on, the load operation cannot |be rolled forward later. The table space where the loaded tables reside is |placed in backup pending state and is not accessible. A full database backup, |or a table space backup, is required to take the table space out of backup |pending state.
|When issued on a Version 5.2 client against a Version 6 database, this |tool does not support table or column names that are greater than 18 characters |in length.
|Files Required/Generated When Using EXPORT: |
|
|『nnn』 is the table |number, 『c』 is a letter of the alphabet, 『yyy』 is a number ranging |from 001 to 999.
|These files are created only if the table being exported |contains LOB data. If created, these LOB files are placed in the lobpath directories. |There are a total of 26 000 possible names for the LOB files.
|Files Required/Generated When Using IMPORT: |
|
|
|Files Required/Generated When Using LOAD: |
|
|