DB2 transfers (migrates) from AIXserver to linux

Source: Internet
Author: User
Tags db2 connect db2 connect to
DB2 transfers (migrates) data from the AIXserver to the linux-Linux Enterprise Application-Linux server application information. The following is a detailed description. The general situation is that there is a database product in the current production environment (AIX server). Now I want to migrate it to a local testing environment. Because the local server is only a linux server, backup and restore cannot be used for recovery. You need to use db2look and db2move to implement the migration process. This operation is applicable to migration between various operating systems.

First
1. Use db2look to export the DDL statements of the product database on aix.
Db2look-d product-a-e-o product. SQL

The output result is:
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. Use the db2move command to export the ixf and msg files
Db2move pdm export

The screen output is similar to 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 completes execution, a bunch of. ixf and. msg files will be generated.



3. Create a directory such as product, product. SQL and the files generated in the previous step on the local machine or the target machine (linux) Over ftp.
Ftp servername
Bin
Prompt off
Mget *
Close
Quit
You can.

4. You can create a local database with the same name as the source aix database, for example, 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 tables in the database and use the DDL statement generated in the first step to generate
Db2? Vtf product. SQL

6. Import all data in the last step.
Db2move product import

Note: This command must be executed in the directory of the files (*. ixf *. msg) downloaded in the third small download.

Test db2 connect to product;
If the successful information is displayed, the db2 database is successfully migrated from aix to linux.

This article applies to migration between any systems
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.