示例: 将数据迁移到 Swift 目标
本例中 Optim™ High Performance Unload 会将数据迁移到 Swift 目的地,并将账户数据存入环境变量
执行报告:
[i1058@lat111 ~]$ db2hpu -i i1058 -f /home/i1058/sysin_swift
INZM031I Optim High Performance Unload for Db2 06.01.00.001(171127)
64 bits 11/28/2017 (Linux lat111 3.10.0-327.36.1.el7.x86_64 #1 SMP Wed Aug 17 03:02:37 EDT 2016 x86_64)
INZI473I Memory limitations: 'unlimited' for virtual memory and 'unlimited' for data segment
----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+
000001 GLOBAL CONNECT TO SAMPLE;
000002 MIGRATE TABLESPACE
000003 LOCK NO QUIESCE NO
000004
000005 SELECT * FROM EMPLOYEE;
000006 LOADDEST(OBJECT_STORAGE SWIFT "SWIFT_BLUEMIX" WITH STANDARD AUTH)
000007 OUTFILE("outfile")
000008
000009 FORMAT DEL;
INZU462I HPU control step start: 11/28/2017 16:45:16.477.
INZU463I HPU control step end : 11/28/2017 16:45:16.952.
INZU464I HPU run step start : 11/28/2017 16:45:17.018.
INZU543I HPU utility will perform load operations on lat111 host.
INZU683I HPU utility has prepared 42 rows for an upload to the SWIFT destination.
INZU741I [lat111] HPU utility has performed an upload of the outfile file to the SWIFT destination
at the location configured: check its execution report in the /home/i1058/EMPLOYEE.msg file.
INZU465I HPU run step end : 11/28/2017 16:45:20.905.
INZI441I HPU successfully ended: Real time -> 0m4.427554s
User time -> 0m0.123696s : Parent -> 0m0.123696s, Children -> 0m0.000000s
Syst time -> 0m0.027831s : Parent -> 0m0.027831s, Children -> 0m0.000000s
db2hpu.dest 文件中的关联 Swift 部分:
[Swift]
alias=SWIFT_BLUEMIX
host=lat111
container=container1
user_id=yesSwift 环境变量:
[i1058@lat111 ~]$ env |grep OS_
OS_REGION_NAME=london
OS_USER_ID=a4c7b27e8aff4156ada9ac57531b98b1
OS_PROJECT_NAME=object_storage_59e3074d_d0f1_439b_88e8_b4db9dd0e875
OS_PROJECT_DOMAIN_NAME=1507409
OS_AUTH_URL=https://lon-identity.open.softlayer.com/v3 db2hpu.creds 文件中的关联 Swift 凭证:
[SWIFT_BLUEMIX]
type=swift
password=9E46FA3C323A348C9BEAE76FF2392B2FD5B0F5A5A3B8908D0D3D5A291505E9E242317010...