小程序容器助力企业在金融与物联网领域实现高效合规运营,带来的新机遇与挑战如何管理?
780
2022-10-08
IBM Q复制新增QSUB
1.新增QSUB名称为SUB0002,目的是为了同步db2inst1.t2表到目标端的db2inst1.t2表。t2表需要提前创建。
[db2inst1@node01 scripts]$ cat add_new_qsub ASNCLP SESSION SET TO Q REPLICATION;SET SERVER CAPTURE TO DBALIAS DB110 ID db2inst1 PASSWORD "SERVER TARGET TO DBALIAS DB111 ID db2inst1 PASSWORD "RUN SCRIPT NOW STOP ON SQL ERROR ON;CREATE QSUB USING REPLQMAP SAMPLE_ASN_TO_TARGETDB_ASN (SUBNAME SUB0002 DB2INST1.T2 OPTIONS HAS LOAD PHASE I exist TARGET NAME DB2INST1.T2 LOAD TYPE 2);QUIT;
2.执行命令导入SUB0002
[db2inst1@node01 scripts]$ asnclp -f add_new_qsub ====CMD: ASNCLP SESSION SET TO Q REPLICATION;========CMD: SET SERVER CAPTURE TO DBALIAS DB110 ID db2inst1 PASSWORD "SET SERVER TARGET TO DBALIAS DB111 ID db2inst1 PASSWORD "SET RUN SCRIPT NOW STOP ON SQL ERROR ON;========CMD: CREATE QSUB USING REPLQMAP SAMPLE_ASN_TO_TARGETDB_ASN (SUBNAME SUB0002 DB2INST1.T2 OPTIONS HAS LOAD PHASE I exist TARGET NAME DB2INST1.T2 LOAD TYPE 2);====ASN1956I ASNCLP : Generating SQL script files for action: "CREATE Q SUBSCRIPTION".ASN1955I ASNCLP : Using the following files: "qreplcap.sql" for the Capture SQL script, "replctl.sql" for the control SQL script, "qreplapp.sql" for the target SQL script, and "qreplmsg.log" for the log file.--- ASNCLP Version 11.01.00 Build date 2021-02-19 21:15:14
3.查看SUB0002是否添加成功
[db2inst1@node01 scripts]$ db2 connect to sourcedb[db2inst1@node01 scripts]$ db2 "select char(subname,20)subname,state from asn.ibmqrep_subs"SUBNAME STATE-------------------- -----SUB0001 L SUB0002 N 2 record(s) selected.
4.重启Q capture和Q apply
QREP
版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。
发表评论
暂时没有评论,来抢沙发吧~