DB2 SQL複製知識點
密碼檔案的建立
asnpwd INIT ENCRYPT PASSWORD using "C:\mq\dprop\asnpwd.aut"
asnpwd ADD ALIAS SOURCE ID suserid PASSWORD suserpwd using "C:\mq\dprop\asnpwd.aut"
asnpwd ADD ALIAS TARGET ID tuserid PASSWORD tuserpwd using "C:\mq\dprop\asnpwd.aut"
asnpwd LIST using "C:\mq\dprop\asnpwd.aut"
capture和apply啟停
start capture
set db2codepage=1208
asncap CAPTURE_SERVER=GSDB CAPTURE_SCHEMA=ASN CAPTURE_PATH=C:\mq\dprop\cap startmode=COLD
Start Apply
asnapply CONTROL_SERVER=SAMPLE APPLY_QUAL=aq00 APPLY_PATH=C:\mq\dprop\app
Stop Capture
asnccmd CAPTURE_SERVER=GSDB CAPTURE_SCHEMA=ASN STOP
Stop Apply
asnacmd CONTROL_SERVER=SAMPLE APPLY_QUAL=aq00 STOP
比較兩個資料庫同一個表的資料
asntdiff db=SAMPLE where="target_table = 'CTMTCAP' and apply_qual = 'AQ00' and set_name = 'SET00'"
讓Target表的資料和Source表的資料一致
asntrep DB=SAMPLE SCHEMA=ASN where="target_table = 'CTMTCAP' and apply_qual = 'AQ00' and set_name = 'SET00'"
檢視複製狀態
asnacmd apply_qual=AQ00 control_server=SAMPLE status
asnpwd INIT ENCRYPT PASSWORD using "C:\mq\dprop\asnpwd.aut"
asnpwd ADD ALIAS SOURCE ID suserid PASSWORD suserpwd using "C:\mq\dprop\asnpwd.aut"
asnpwd ADD ALIAS TARGET ID tuserid PASSWORD tuserpwd using "C:\mq\dprop\asnpwd.aut"
asnpwd LIST using "C:\mq\dprop\asnpwd.aut"
capture和apply啟停
start capture
set db2codepage=1208
asncap CAPTURE_SERVER=GSDB CAPTURE_SCHEMA=ASN CAPTURE_PATH=C:\mq\dprop\cap startmode=COLD
Start Apply
asnapply CONTROL_SERVER=SAMPLE APPLY_QUAL=aq00 APPLY_PATH=C:\mq\dprop\app
Stop Capture
asnccmd CAPTURE_SERVER=GSDB CAPTURE_SCHEMA=ASN STOP
Stop Apply
asnacmd CONTROL_SERVER=SAMPLE APPLY_QUAL=aq00 STOP
比較兩個資料庫同一個表的資料
asntdiff db=SAMPLE where="target_table = 'CTMTCAP' and apply_qual = 'AQ00' and set_name = 'SET00'"
讓Target表的資料和Source表的資料一致
asntrep DB=SAMPLE SCHEMA=ASN where="target_table = 'CTMTCAP' and apply_qual = 'AQ00' and set_name = 'SET00'"
檢視複製狀態
asnacmd apply_qual=AQ00 control_server=SAMPLE status
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/725820/viewspace-1873449/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- iOS 複製知識點總結iOS
- SQL知識點(+)SQL
- Sql Server 知識點SQLServer
- Kafka基本知識回顧及複製Kafka
- C 語言複雜知識點
- JavaWeb複習小知識點(一)JavaWeb
- 每天學點C++知識:複製貼上程式碼千萬要小心C++
- Android知識點複習2(Service)Android
- python複習。知識點小記Python
- Java基礎複習,整理知識點Java
- Spark SQL知識點與實戰SparkSQL
- 作業系統概念知識點複習作業系統
- Android知識點複習3(BroadcastReceiver)AndroidAST
- java面試重要知識點複習大綱Java面試
- HTTP應知應會知識點複習手冊(下)HTTP
- HTTP應知應會知識點複習手冊(上)HTTP
- Spark SQL知識點大全與實戰SparkSQL
- c++基礎知識(十一)檔案的複製C++
- HTTP 的15個常見知識點複習HTTP
- MySQL 資料庫基礎知識點複習MySql資料庫
- Android知識點複習1(Activity與Fragment)AndroidFragment
- Android知識點複習4(ContentProvider)AndroidIDE
- SQL語法的重要知識點總結SQL
- oracle,db2,mysql類比之一常用類似知識點OracleDB2MySql
- mysql:sql as 複製表MySql
- MySQL主從複製原理及必備知識總結MySql
- RMAN 複製目標資料庫的理論知識資料庫
- SRE 必備知識 - Kafka 探秘之零複製技術Kafka
- 知識點
- Java併發知識點快速複習手冊(上)Java
- Java併發知識點快速複習手冊(下)Java
- 【Struts2複習知識點二】-namespace的配置namespace
- MY SQL 知識SQL
- SQL Server 複製訂閱SQLServer
- SQL Server 複製故障排除SQLServer
- SQL複製的工作原理SQL
- Java容器(List、Set、Map)知識點快速複習手冊Java
- Linux複習知識Linux