DB2 Transfer (migrate) from AIX server to Linux

Source: Internet
Author: User
Tags db2 db2 connect db2 connect to ftp create database linux


First of all, the general situation is that the current production environment (AIX server) has a database product, now want to migrate to the local test environment, because the local server is only Linux server, so you can not directly use Backup and restore recovery. Need to use Db2look and db2move to implement the migration process, this operation is applicable to the migration between various operating systems.



First of all, these are done on the AIX server



1. Use Db2look to export the DDL statements of the product database on AIX.



db2look-d product-a-e-o Product.sql



The output results are:



aix:/home/db2inst1$ db2look -d product-a -e -o product.sql
-- Generate statistics for all creators
-- Creating DDL for table(s)
-- Output is sent to file: product.sql



2. Export IXF and MSG files using the Db2move command



Db2move PDM Export



The screen output resembles the following information



***** DB2MOVE *****
Action: EXPORT
Start time: Tue Mar 11 01:26:43 2008
Connecting to database PRODUCT... successful! Server: DB2 Common Server V8.2.1
EXPORT: 4 rows from table "PROCORE "."PLAN_MASTER"
EXPORT: 3 rows from table "PROCORE "."PERIOD_MASTER"
EXPORT: 3849 rows from table "PROCORE "."PLAN_OBJ"
EXPORT: 26176 rows from table "PROCORE "."REGION"
EXPORT: 340 rows from table "PROCORE "."CTY_MASTER"



After the system is done, a bunch of. IXF and. msg files are generated.



3. Create a directory on the local or target machine (Linux) such as Product,product.sql and the files generated in the previous step are FTP over.



ftp servername
bin
prompt off
mget *
close
quit



Can



4. Create a new database locally the original AIX database has the same name as product



create DATABASE "PRODUCT"
ON ’/home/db2inst1/’
ALIAS "PRODUCT"
USING CODESET ISO8859-1
TERRITORY US
COLLATE USING Compatibility
NUMSEGS 1
DFT_EXTENT_SZ 32;



5. Create all the tables in this database and use the DDL statements generated in the first step to generate



DB2–VTF Product.sql



6. Last step, import all data



Db2move Product Import



Note: This command is to be executed in the directory of those files (*.ixf *.msg) that come down from the third small download



Test DB2 connect to product;



If you see successful information, the DB2 database is successfully migrated from Aix to Linux.


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.