點擊上方“IT那活兒”,關注后了解更多內(nèi)容,不管IT什么活兒,干就完了?。。?/strong>
1
遷移準備
2
db2move的適用情況
3
HADR1上進行的工作
[db2inst1@HADR1 ~]$ db2 "create table cfsource2 (name varchar(10)) "
DB20000I The SQL command completed successfully.
[db2inst1@HADR1 ~]$ db2 "CREATE PROCEDURE insert_cf ()
DYNAMIC RESULT SETS 1 P1: BEGIN declare a int; set a=1; loop1: LOOP if(a<=1000) then insert into
cfsource2(NAME) values(f); set a=a+1; else leave loop1;
end if; end loop loop1; END P1"
DB20000I The SQL command completed successfully.
[db2inst1@HADR1 ~]$ db2 call insert_cf
Return Status = 0
[db2inst1@HADR1 ~]$ db2 "select count(*) from cfsource2"
1
-----------
1000
[db2inst1@HADR1 ~]$ db2 "select * from cfsource2 fetch first 1 rows only"
NAME
----------
1
[db2inst1@HADR1 ~]$ db2look -d sample -e -l -o db2look_sample.ddl
-- No userid was specified, db2look tries to use Environment variable USER
-- USER is: DB2INST1
-- Creating DDL for table(s)
-- Output is sent to file: db2look_sample.ddl
-- Binding package automatically ...
-- Bind is successful
-- Binding package automatically ...
-- Bind is successful
[db2inst1@HADR1 backup]$ db2move sample export
Application code page not determined, using ANSI codepage 1208
***** DB2MOVE *****
Action: EXPORT
Start time: Thu Mar 4 06:18:50 2021
Connecting to database SAMPLE ... successful! Server : DB2 Common Server V9.7.0
EXPORT: 18 rows from table "DB2INST1"."ACT"
EXPORT: 0 rows from table "DB2INST1"."CATALOG"
4
HADR2中的工作
[db2inst1@HADR1 ~]$ db2 -tvf db2look_sample.ddl
[db2inst1@HADR1 backup]$ cd /home/db2inst1/db2inst1/backup
[db2inst1@HADR1 backup]$ db2move sample load
[db2inst1@HADR1 backup]$ db2 "select * from cfsource2 fetch first 1 rows only"
NAME
----------
1
1 record(s) selected.
END
文章版權歸作者所有,未經(jīng)允許請勿轉(zhuǎn)載,若此文章存在違規(guī)行為,您可以聯(lián)系管理員刪除。
轉(zhuǎn)載請注明本文地址:http://www.ezyhdfw.cn/yun/129511.html
摘要:自上線以來,總遷移已超過級數(shù)據(jù)量。支持通過內(nèi)網(wǎng)專線以及外網(wǎng)遷移數(shù)據(jù)。全量遷移在全球多地地域部署服務,根據(jù)源目位置來就近選擇運行位置,保證遷移效率。數(shù)據(jù)庫是公司核心資產(chǎn)的重要存儲基座,面對用戶不同場景,數(shù)據(jù)也需跨數(shù)據(jù)庫遷移。如用戶業(yè)務上云、多云災備下的數(shù)據(jù)同步、不同數(shù)據(jù)源的聚合分析等,都需數(shù)據(jù)跨數(shù)據(jù)庫的遷移。UCloud數(shù)據(jù)遷移方案UDTSUCloud數(shù)據(jù)傳輸服務UDTS(UCloud Dat...
摘要:本期大綱隨著從到千萬用戶的業(yè)務增長,通過的不同服務輕松地實現(xiàn)高性能和高可用的基礎架構。方坤老師本次的主題比較偏向?qū)嵺`的基礎部分,假設了一個應用從小型到中型和大型的時候,可能需要用到的服務,以及相關介紹和實踐建議。 極牛技術實踐分享活動 極牛技術實踐分享系列活動是極牛聯(lián)合頂級VC、技術專家,為企業(yè)、技術人提供的一種系統(tǒng)的線上技術分享活動。每期不同的技術主題,和行業(yè)專家深度探討,專注...
摘要:操作登錄,切換到導入頁面,選擇本地的數(shù)據(jù)文件進行導入。注意源數(shù)據(jù)庫時,僅導出業(yè)務相關的庫表,請過濾掉基礎庫。若全庫導入,會覆蓋實例原有基礎庫,影響后續(xù)使用。phpMyAdmin操作 登錄phpMyAdmin,切換到導入頁面,選擇本地的數(shù)據(jù)文件進行導入。 命令行操作 將需要導入的數(shù)據(jù)文件上傳至云主機,在云主機中執(zhí)行如下命令: mysql -h$IP -P$Port ...
閱讀 1491·2023-01-11 13:20
閱讀 1850·2023-01-11 13:20
閱讀 1289·2023-01-11 13:20
閱讀 2041·2023-01-11 13:20
閱讀 4241·2023-01-11 13:20
閱讀 2948·2023-01-11 13:20
閱讀 1580·2023-01-11 13:20
閱讀 3852·2023-01-11 13:20