Export Multiple Tables in DB2: db2move Guide
In DB2 database, you can use the db2move tool to export data from multiple tables at once. Here are the steps to export data from multiple tables at once using the db2move tool.
- First, create a file list containing the names of the tables to be exported. Write each table name on a new line and save the file as tables.lst.
- Export data from multiple tables using the db2move command. Execute the following command in the command line:
db2move <database_name> export -sn <schema_name> -aw -tn @tables.lst
The
- The db2move command will export the data of all tables listed in the tables.lst file to the export directory in the current location.
Please note that the exported data will be saved in the export directory as a comma-separated text file. You can restore the data by importing these files into the target database.