Adsense

Wednesday, April 17, 2013

db2move command with example


db2move : It is used to move the database tables across different plat forms. This utility retrieves list of all user tables in a database from the system catalog and exports these tables in PC/IXF ( Integration Exchange Format ) format. The PC/IXF files can be imported or loaded to another local DB2 database on the same system , or different system with diffent platform.

The syntax of the db2move command is
db2move <dbname > <action > [ <option > <value >]
- dbname is the data base whose tables you want to move
- actions are export, import, or load which is to be performed on the data base.
- Options may be like to limit the operation to certain tables (-tn), table spaces (-ts), table creators (-tc), or schema names (-sn). Specifying a subset of tables, table spaces, or table creators is valid with the export action only. If multiple values are specified, they must be separated by commas; no blanks are allowed between items in the list of values.

eq. db2move employee export
- exports all table
db2move employee export -tn employee,desig
- exports only employee , desig tables

db2move employee import
- imports all the tables listed in the db2move.lst to the database employee.

Some of files which are generated during Export, Import or Load as follows

EXPORT.out , IMPORT.out , LOAD.out - Stores summary of the completed action
db2move.lst - Contains a list of table names, their corresponding PC/IXF file names, and message file names
tabn.ixf - Contains exported data from a user table (where n is 1, 2 , .... (tab1.ixf, tab2.ixf, ....))
tabn.msg - Contains messages about the requested action against a user table , where is 1,2, .....
tabna.nnn - Contains Large Object Date (LOB) identified by n
system.msg - system messages which is created only if the action is export, and a LOB path has been specified

For Step by Step example , Please Visit post How to move db2 database across different platforms / clone database with cross-platform in db2

0 comments:

Post a Comment