Moving the FACT table records in Db2 Database Software
Before you perform this task, make sure you have full access to the source and the destination databases (you need the database admin privileges).
- Connect to the source database.
-
Do the following step:
EXPORT TO "<Filename_withpath>.IXF" OF IXF SELECT * FROM PR_DATA_IH_FACT
- Connect to the target database.
-
Move data.
-
If a table does not exist, execute the following script:
IMPORT FROM "<Filename_withpath>.IXF" OF IXF CREATE INTO PR_DATA_IH_FACT
-
If a table exists with the exact same columns:
- Make sure there are no primary key (PK) constraints on the PXFACTID column in the destination database and do not move any constraints.
-
Execute the following script:
IMPORT FROM "<Filename_withpath>.IXF" OF IXF INSERT INTO PR_DATA_IH_FACT
-