DB2Move in db2


The db2move can help us in several situations, such as:

1.Move data between tables

2.Move data between schema

3.Move data between tablespaces

 

Let's work with examples:

Databases Name:

DB1
DB2

 

Example 1 - Move all tables in schema1 from DB1 to database DB2

db2move DB1 export -aw -l lobs -sn schema1

db2move DB2 import -io replace_create -l lobs

Example 2 - Move all data from tableA and tableB in schema1 from DB1 to database DB2

db2move DB1 export -aw -l lobs -tn schema1.tableA,schema1.tableB

db2move DB2 load -lo replace -l lobs

Don't forget to set integrity for tables in pending status after the load.

Example 3 -Move all data from tablespaceA in schema1 from DB1 to database DB2

db2move DB1 export -aw -l lobs -ts tablespaceA

db2move DB2 import -io replace_create -l lobs

 

Comments

Popular posts from this blog

Db2 export command example using file format (del , ixf)

How to fix DB2 Tablespace OFFLINE state issue?

Phases of a load operation