Personal tools
You are here: Home DB2 How To's How to use db2move
Navigation
Log in


Forgot your password?
 
Document Actions

How to use db2move

import, export, load

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

  •  Move data between tables
  • Move data between schema
  • 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

WARNING:

The db2move doesn't create contraints, so if you need to create a table with its constraints use db2look to create FKs, PKs, etc 

Security Awareness
Would you like your company to implement gamification into your security awareness program?





Polls