Page tree
Skip to end of metadata
Go to start of metadata
Purpose

 Moving a data contained inside a DB2 schema

Applicable in CAST Version
Release
Yes/No
7.3.x?
7.2.x

?

7.0.x?
Applicable RDBMS
RDBMS
Yes/No
Oracle Server?
Microsoft SQL Server?
CSS2?
CSS1?
Details

1.To run the export of DB2 Schema, you need to know

  • the schema name,
  • the name of DB2 database which contain the schema
  • the user and the password allowing to connect to DB2 database containing the schema

2. The command line used to run the export is "db2move". The syntax of the db2move is:

db2move <DB2_database_name> EXPORT -u <user> -p <password> -sn <schema_name>

3.You should run this command line inside a db2cmd session.
4.You do not need to specify the file name or the path into which we the export will be saved. The generated files will be saved in the same path as the working folder:


Example:
When you open db2cmd session, you will be under C:\Documents and setting>XXX:
The generated files will be saved in the under C:\Documents and setting>XXX 


5.The export will generate 4 types of files;
6.An export log file Called "export.out" (can be opened with ultaEdit for example)


In this file you see:
The schema name
The DB2 server version
The number of line exported from each table. Here an extract of export.out file: 
Action: EXPORT
Start time: Wed May 16 15:02:15 2007
All schema names matching: ADG_CENTRAL571;
Server: DB2 Common Server V8.2.0
EXPORT: 18 rows from table "ADG_CENTRAL571"."ADG_SYSTEM_TREE"
EXPORT: 0 rows from table "ADG_CENTRAL571"."ADG_WORK_STATUS"
EXPORT: 4 rows from table "ADG_CENTRAL571"."APM_MODULE_LIST"
EXPORT: 24 rows from table "ADG_CENTRAL571"."APM_MODULE_PARENTS"
EXPORT: 15 rows from table "ADG_CENTRAL571"."APM_PARENT_LIST"
EXPORT: 0 rows from table "ADG_CENTRAL571"."APM_RULESCHECK_TMP"
EXPORT: 0 rows from table "ADG_CENTRAL571"."APM_RULESCHECKER"
EXPORT: 31 rows from table "ADG_CENTRAL571"."APM_SYSTEM_TREE"
For each table a msg file and an ixf file will be created.
These files will be named tabn.ixf and tabn.msg when n=1,2,3,4 ....
The tabn.ixf contains the data exported from the table "tabn"
The tabn.msg is a log file. Here an example of a msg file containing:
SQL3104N The Export utility is beginning to export data to file "tab28.ixf".
SQL3105N The Export utility has finished exporting "120" rows.
The names of ixf and msg files do not correspond to the real name of the exported table. 

7.The file "db2move.lst" is also created during the data export. This file will indicate for each table tabn the name of database table which corresponds to each tabn.ixf and tabn.msg files. 


Here an extract of a "db2move.lst" file:
"ADG_CENTRAL571"."ADG_SYSTEM_TREE"tab1.ixftab1.msg
"ADG_CENTRAL571"."ADG_WORK_STATUS"tab2.ixftab2.msg
"ADG_CENTRAL571"."APM_MODULE_LIST"tab3.ixftab3.msg
"ADG_CENTRAL571"."APM_MODULE_PARENTS"tab4.ixftab4.msg
"ADG_CENTRAL571"."APM_PARENT_LIST"tab5.ixftab5.msg

Notes/comments

 

Related Pages

 

  • No labels