1. Using db2move to export all data db2move is an integrated data migration tool that supports export, import, and load operations. In fact, the three methods of db2move are implemented by simply using the db2export, db2import, and db2load commands. This section only describes its export
1. Using db2move to export all data db2move is an integrated data migration tool that supports export, import, and load operations. In fact, the three methods of db2move are implemented by simply using the db2 export, db2 import, and db2 load commands. This section only describes its export
1. Use db2move to export all data
Db2move is an integrated data migration tool that supports export, import, and load operations. In fact, the three methods of db2move are implemented by simply using the db2 export, db2 import, and db2 load commands.
This section only describes its export function. import and load will be described later. The format of the data file exported using db2move is IXF.
Create and enter the data storage directory:
$ Mkdir/home/backup/mydata
$ Cd/home/backup/mydata
Export all data in the specified database:
$ Db2move testdb export-u db2inst1-p thepasswd
Note:
1. This will extract all the data in testdb to the current directory (/home/backup/mydata. The content of each table is stored in one. in the ixf file, each. each ixf file corresponds to one. msg file ,. the msg file describes the information when exporting data from the table. There are also two files. db2move. lst is used to record the one-to-one correspondence between the. ixf file and the. msg file and the table. EXPORT. out records the screen output when exporting data.
2. Export the table structure. The command line is as follows:
Db2look-d dbname-e-a-x-I username-w passWord-o ddlfile. SQL
3. Export table data
Export to [path (example: D: "TABLE1.ixf)] of ixf select [field (example: * or col1, col2, col3)] from TABLE1;
Example: export to "data/DBMEMUSE_WATCHER.ixf" of ixf messages "data/DBMEMUSE_WATCHER.txt" SELECT * FROM DBMEMUSE_WATCHER;