{"id":319780,"date":"2024-01-21T12:45:44","date_gmt":"2024-01-21T04:45:44","guid":{"rendered":"https:\/\/www.idc.net\/help\/319780\/"},"modified":"2024-01-21T12:45:44","modified_gmt":"2024-01-21T04:45:44","slug":"%e5%a4%a7%e6%95%b0%e6%8d%aedb2%e8%a1%a8%e5%bf%ab%e9%80%9f%e6%b8%85%e7%a9%ba%e6%96%b9%e6%b3%95","status":"publish","type":"post","link":"https:\/\/idc.net\/help\/319780\/","title":{"rendered":"\u5927\u6570\u636eDB2\u8868\u5feb\u901f\u6e05\u7a7a\u65b9\u6cd5"},"content":{"rendered":"<p>\u5728\u6211\u4eec\u4f7f\u7528DB2\u6570\u636e\u5e93\u7684\u8fc7\u7a0b\u4e2d\uff0c\u6709\u65f6\u9700\u8981\u5c06DB2\u8868\u5feb\u901f\u6e05\u7a7a\uff0c\u4e0b\u9762\u5c31\u6559\u60a8\u51e0\u79cdDB2\u8868\u5feb\u901f\u6e05\u7a7a\u7684\u65b9\u6cd5\uff0c\u5e0c\u671b\u5bf9\u60a8\u5b66\u4e60DB2\u8868\u5feb\u901f\u6e05\u7a7a\u65b9\u9762\u6709\u6240\u542f\u8fea\u3002<\/p>\n<p><font>\u5728DB2\u6570\u636e\u5e93\u4e2d\uff0c\u5982\u679c\u60f3\u5feb\u901f\u6e05\u7a7a\u4e00\u5f20\u5927\u8868\uff08\u7c7b\u4f3c\u5728 ORACLE \u4e2d\u4f7f\u7528 TRUNCATE TABLE \u5feb\u901f\u6e05\u7a7a\u4e00\u5f20\u5927\u8868\uff09\uff0c\u6709\u4e24\u79cd\u65b9\u6cd5\uff1a<\/p>\n<p> 1. \u4f7f\u7528 \u201c ALTER TABLE \u8868\u540d ACTIVATE NOT LOGGED INITIALLY WITH EMPTY TABLE \u201d \u547d\u4ee4\u3002<br \/> 2. \u4f7f\u7528\u7a7a\u6587\u4ef6\u4e3a\u6570\u636e\u6587\u4ef6\u5bfc\u5165\u5e76\u66ff\u6362\u8868\u4e2d\u6570\u636e\u3002<\/p>\n<p> * \u5728 windows \u5e73\u53f0\uff0c\u53ef\u4ee5\u5148\u4f7f\u7528 EXPORT \u5bfc\u51fa\u4e00\u4e2a\u7a7a\u6587\u4ef6\uff0c\u518d\u4f7f\u7528 IMPORT \u547d\u4ee4\u4ece\u7a7a\u6587\u4ef6\u4e2d\u5bfc\u5165\u5e76\u66ff\u6362\u8be5\u8868\u4e2d\u6570\u636e\uff0c\u6bd4\u5982\uff1a<br \/> export to test.ixf of ixf messages log.txt select * from test where 1=2<br \/> import from test.ixf of ixf messages log1.txt replace into test<br \/> * \u5728 UNIX \u5e73\u53f0\uff0c\u9664\u4e86\u4f7f\u7528 A \u65b9\u6cd5\u4ee5\u5916\uff0c\u8fd8\u53ef\u4ee5\u4f7f\u7528\u4ece\u7a7a\uff08NULL\uff09\u4e2d\u5bfc\u5165\u5e76\u66ff\u6362\u8be5\u8868\u6570\u636e\uff0c\u6bd4\u5982\uff1a<br \/> import from \/home\/null of del replace into test<\/p>\n<p> \u5982\u679c\u4f7f\u7528\u201c DELETE TABLE \u201d\u547d\u4ee4\u5220\u9664\u6574\u4e2a\u5927\u8868\u4e2d\u7684\u6570\u636e\uff0c\u7531\u4e8e\u8fd9\u4e2a\u547d\u4ee4\u91c7\u7528\u9010\u6761\u5220\u9664\uff0c\u5e76\u628a\u8be5\u64cd\u4f5c\u8bb0\u5165\u6d3b\u52a8\u7684\u4ea4\u6613\u65e5\u5fd7\uff0c\u5c06\u4f1a\u8017\u8d39\u5927\u91cf\u7684\u6d3b\u52a8\u65e5\u5fd7\u7a7a\u95f4\uff0c\u6709\u53ef\u80fd\u9020\u6210\u6570\u636e\u5e93\u4ea4\u6613\u65e5\u5fd7\u5df2\u6ee1\u9519\u8bef\uff0c\u53e6\u5916\uff0c\u8fd9\u6837\u5220\u9664\u5927\u8868\u6570\u636e\u8017\u8d39\u7684\u65f6\u95f4\u4e5f\u5f88\u957f\u3002\u5bf9\u4e8e\u5c5e\u4e8e DMS \u8868\u7a7a\u95f4\u7684\u8868\u6765\u8bf4\uff0c\u5220\u9664\u547d\u4ee4\u9010\u6761\u626b\u63cf\u8bb0\u5f55\uff0c\u6240\u5360\u7684\u8bb0\u5f55\u7a7a\u95f4\u4ecd\u6807\u8bb0\u4e3a\u8be5\u8868\u6240\u7528\uff0c\u800c\u4e0d\u7acb\u5373\u91ca\u653e\u7a7a\u95f4\uff0c\u9700\u8981\u7528 REORG \u547d\u4ee4\u624d\u53ef\u4ee5\u91ca\u653e\u5269\u4f59\u7a7a\u95f4\u3002<\/p>\n<p> \u4f7f\u7528\u4ee5\u4e0a\u4e24\u79cdDB2\u8868\u5feb\u901f\u6e05\u7a7a\u65b9\u6cd5\u8fdb\u884c\u5feb\u901f\u6e05\u7a7a\u4e00\u5f20\u5927\u8868\uff0c\u5c06\u4f7f DB2 \u4ea4\u6613\u65e5\u5fd7\u53ea\u8bb0\u5f55\u8be5\u6761\u547d\u4ee4\uff0c\u5e76\u7acb\u5373\u91ca\u653e\u6240\u5360\u7528\u7684\u7a7a\u95f4\uff0c\u800c\u4e0d\u4f1a\u50cf\u5220\u9664\u547d\u4ee4\u4e00\u6837\u9010\u6761\u626b\u63cf\u8bb0\u5f55\uff0c\u4ece\u800c\u8282\u7701\u5927\u91cf\u7684\u6570\u636e\u5e93\u4ea4\u6613\u65e5\u5fd7\u548c\u5904\u7406\u65f6\u95f4\u3002\u7528 LOAD \u547d\u4ee4\u52a0 REPLACE \u53c2\u6570\u53ef\u4ee5\u8fbe\u5230\u7c7b\u4f3c IMPORT \u547d\u4ee4\u52a0 REPLACE \u7684\u6548\u679c\uff0c\u4f46\u662f\u7531\u4e8e LOAD \u672c\u8eab\u4e0d\u8bb0\u65e5\u5fd7\uff0c\u6240\u4ee5\u5bf9\u4e8e\u53ef\u6062\u590d\u7684\u6570\u636e\u5e93\uff0cLOAD \u5b8c\u6210\u540e\u5efa\u8bae\u9a6c\u4e0a\u505a\u4e00\u4e0b\u8054\u673a\u5907\u4efd\u7684\uff0c\u76f8\u6bd4\u4e4b\u4e0b\uff0cIMPORT \u547d\u4ee4\u52a0 REPLACE \u64cd\u4f5c\u4e0a\u6bd4\u8f83\u7b80\u5355\u4e00\u4e9b\u3002<\/font><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p><font>\u3010\u7f16\u8f91\u63a8\u8350\u3011<\/font><\/p>\n<p><font>\u4e09\u79cdDB2\u8868\u9759\u9ed8\u72b6\u6001<\/font><\/p>\n<p><font>DB2\u6570\u636e\u5e93\u5378\u8f7d\u7684\u95ee\u9898\u8bca\u65ad<\/font><\/p>\n<p><font>\u6559\u60a8\u5982\u4f55\u5c06DB2\u6570\u636e\u5e93\u5378\u8f7d<\/font><\/p>\n<p><font>\u624b\u52a8\u5378\u8f7dDB2\u6570\u636e\u5e93\u7684\u65b9\u6cd5<\/font><\/p>\n<p><font>\u5e26\u60a8\u4e86\u89e3DB2\u8868\u7ba1\u7406\u8bed\u53e5<\/font><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5728\u6211\u4eec\u4f7f\u7528DB2\u6570\u636e\u5e93\u7684\u8fc7\u7a0b\u4e2d\uff0c\u6709\u65f6\u9700\u8981\u5c06DB2\u8868\u5feb\u901f\u6e05\u7a7a\uff0c\u4e0b\u9762\u5c31\u6559\u60a8\u51e0\u79cdDB2\u8868\u5feb\u901f\u6e05\u7a7a\u7684\u65b9\u6cd5\uff0c\u5e0c\u671b\u5bf9\u60a8\u5b66\u4e60 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7038],"tags":[],"class_list":["post-319780","post","type-post","status-publish","format-standard","hentry","category-database"],"_links":{"self":[{"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/posts\/319780","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/comments?post=319780"}],"version-history":[{"count":0,"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/posts\/319780\/revisions"}],"wp:attachment":[{"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/media?parent=319780"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/categories?post=319780"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/tags?post=319780"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}