{"id":86088,"date":"2024-10-17T18:21:19","date_gmt":"2024-10-17T10:21:19","guid":{"rendered":"https:\/\/server.hk\/cnblog\/86088\/"},"modified":"2024-10-17T18:21:20","modified_gmt":"2024-10-17T10:21:20","slug":"ora-14277-%e5%9c%a8-exchange-subpartition-%e4%b8%ad%e7%9a%84%e8%a1%a8%e5%bf%85%e9%a0%88%e5%85%b7%e6%9c%89%e7%9b%b8%e5%90%8c%e6%95%b8%e9%87%8f%e7%9a%84%e5%88%97%e3%80%82oracle-%e5%a0%b1%e9%8c%af","status":"publish","type":"post","link":"https:\/\/server.hk\/cnblog\/86088\/","title":{"rendered":"ORA-14277: \u5728 EXCHANGE SUBPARTITION \u4e2d\u7684\u8868\u5fc5\u9808\u5177\u6709\u76f8\u540c\u6578\u91cf\u7684\u5217\u3002ORACLE \u5831\u932f \u6545\u969c\u4fee\u5fa9 \u9060\u7a0b\u8655\u7406"},"content":{"rendered":"<h1 id=\"ora-14277-%e5%9c%a8-exchange-subpartition-%e4%b8%ad%e7%9a%84%e8%a1%a8%e5%bf%85%e9%a0%88%e5%85%b7%e6%9c%89%e7%9b%b8%e5%90%8c%e6%95%b8%e9%87%8f%e7%9a%84%e5%88%97-MWFWhpozpC\">ORA-14277: \u5728 EXCHANGE SUBPARTITION \u4e2d\u7684\u8868\u5fc5\u9808\u5177\u6709\u76f8\u540c\u6578\u91cf\u7684\u5217<\/h1>\n<p>\u5728\u4f7f\u7528 Oracle \u6578\u64da\u5eab\u6642\uff0c\u958b\u767c\u8005\u548c\u6578\u64da\u5eab\u7ba1\u7406\u54e1\u53ef\u80fd\u6703\u9047\u5230\u5404\u7a2e\u932f\u8aa4\u4ee3\u78bc\uff0c\u5176\u4e2d\u4e4b\u4e00\u4fbf\u662f ORA-14277\u3002\u9019\u500b\u932f\u8aa4\u901a\u5e38\u51fa\u73fe\u5728\u5617\u8a66\u9032\u884c\u5b50\u5206\u5340\u4ea4\u63db\u64cd\u4f5c\u6642\uff0c\u5177\u9ad4\u4f86\u8aaa\u662f\u5728 EXCHANGE SUBPARTITION \u7684\u904e\u7a0b\u4e2d\u3002\u672c\u6587\u5c07\u6df1\u5165\u63a2\u8a0e\u9019\u500b\u932f\u8aa4\u7684\u539f\u56e0\u3001\u5f71\u97ff\u4ee5\u53ca\u5982\u4f55\u9032\u884c\u6545\u969c\u4fee\u5fa9\u3002<\/p>\n<h2 id=\"ora-14277-%e9%8c%af%e8%aa%a4%e7%9a%84%e5%8e%9f%e5%9b%a0-MWFWhpozpC\">ORA-14277 \u932f\u8aa4\u7684\u539f\u56e0<\/h2>\n<p>ORA-14277 \u932f\u8aa4\u7684\u4e3b\u8981\u539f\u56e0\u662f\u7576\u4f60\u5617\u8a66\u4ea4\u63db\u7684\u5169\u500b\u5b50\u5206\u5340\u4e4b\u9593\u7684\u5217\u6578\u4e0d\u4e00\u81f4\u3002Oracle \u6578\u64da\u5eab\u8981\u6c42\u5728\u9032\u884c\u5b50\u5206\u5340\u4ea4\u63db\u6642\uff0c\u5169\u500b\u8868\u5fc5\u9808\u64c1\u6709\u76f8\u540c\u7684\u5217\u6578\u548c\u5217\u985e\u578b\u3002\u9019\u662f\u56e0\u70ba\u4ea4\u63db\u64cd\u4f5c\u6d89\u53ca\u5230\u6578\u64da\u7684\u7269\u7406\u79fb\u52d5\uff0c\u82e5\u5217\u6578\u4e0d\u4e00\u81f4\uff0c\u5c07\u7121\u6cd5\u6b63\u78ba\u5730\u6620\u5c04\u6578\u64da\u3002<\/p>\n<h3 id=\"%e7%a4%ba%e4%be%8b-MWFWhpozpC\">\u793a\u4f8b<\/h3>\n<p>\u5047\u8a2d\u4f60\u6709\u5169\u500b\u8868\uff0c\u8868 A \u548c\u8868 B\uff0c\u4e26\u4e14\u5b83\u5011\u7684\u7d50\u69cb\u5982\u4e0b\uff1a<\/p>\n<pre><code>CREATE TABLE A (\n    id NUMBER,\n    name VARCHAR2(50)\n) PARTITION BY RANGE (id) (\n    PARTITION p1 VALUES LESS THAN (100),\n    PARTITION p2 VALUES LESS THAN (200)\n);\n\nCREATE TABLE B (\n    id NUMBER,\n    name VARCHAR2(50),\n    age NUMBER\n) PARTITION BY RANGE (id) (\n    PARTITION p1 VALUES LESS THAN (100),\n    PARTITION p2 VALUES LESS THAN (200)\n);\n<\/code><\/pre>\n<p>\u5728\u9019\u500b\u4f8b\u5b50\u4e2d\uff0c\u8868 A \u6709\u5169\u5217\uff0c\u800c\u8868 B \u6709\u4e09\u5217\u3002\u5982\u679c\u4f60\u5617\u8a66\u57f7\u884c\u4ee5\u4e0b\u4ea4\u63db\u64cd\u4f5c\uff1a<\/p>\n<pre><code>ALTER TABLE A EXCHANGE PARTITION p1 WITH TABLE B;\n<\/code><\/pre>\n<p>\u5247\u6703\u51fa\u73fe ORA-14277 \u932f\u8aa4\uff0c\u56e0\u70ba\u8868 A \u548c\u8868 B \u7684\u5217\u6578\u4e0d\u4e00\u81f4\u3002<\/p>\n<h2 id=\"%e6%95%85%e9%9a%9c%e4%bf%ae%e5%be%a9%e6%ad%a5%e9%a9%9f-MWFWhpozpC\">\u6545\u969c\u4fee\u5fa9\u6b65\u9a5f<\/h2>\n<p>\u8981\u4fee\u5fa9 ORA-14277 \u932f\u8aa4\uff0c\u9996\u5148\u9700\u8981\u78ba\u4fdd\u8981\u4ea4\u63db\u7684\u5169\u500b\u8868\u5177\u6709\u76f8\u540c\u7684\u5217\u6578\u548c\u5217\u985e\u578b\u3002\u4ee5\u4e0b\u662f\u4e00\u4e9b\u5177\u9ad4\u7684\u6b65\u9a5f\uff1a<\/p>\n<ul>\n<li><strong>\u6aa2\u67e5\u8868\u7d50\u69cb\uff1a<\/strong>\u4f7f\u7528\u4ee5\u4e0b SQL \u67e5\u8a62\u6aa2\u67e5\u8868\u7684\u7d50\u69cb\uff1a<\/li>\n<pre><code>DESC A;\nDESC B;\n<\/code><\/pre>\n<li><strong>\u8abf\u6574\u8868\u7d50\u69cb\uff1a<\/strong>\u5982\u679c\u767c\u73fe\u5217\u6578\u4e0d\u4e00\u81f4\uff0c\u53ef\u4ee5\u901a\u904e\u6dfb\u52a0\u6216\u522a\u9664\u5217\u4f86\u8abf\u6574\u8868\u7d50\u69cb\u3002\u4f8b\u5982\uff0c\u82e5\u8981\u5728\u8868 A \u4e2d\u6dfb\u52a0\u4e00\u500b age \u5217\uff0c\u53ef\u4ee5\u4f7f\u7528\uff1a<\/li>\n<pre><code>ALTER TABLE A ADD (age NUMBER);\n<\/code><\/pre>\n<li><strong>\u91cd\u65b0\u57f7\u884c\u4ea4\u63db\u64cd\u4f5c\uff1a<\/strong>\u5728\u78ba\u4fdd\u5169\u500b\u8868\u7684\u7d50\u69cb\u4e00\u81f4\u5f8c\uff0c\u91cd\u65b0\u57f7\u884c\u4ea4\u63db\u64cd\u4f5c\u3002<\/li>\n<\/ul>\n<h2 id=\"%e5%85%b6%e4%bb%96%e6%b3%a8%e6%84%8f%e4%ba%8b%e9%a0%85-MWFWhpozpC\">\u5176\u4ed6\u6ce8\u610f\u4e8b\u9805<\/h2>\n<p>\u5728\u9032\u884c\u5b50\u5206\u5340\u4ea4\u63db\u6642\uff0c\u9084\u9700\u6ce8\u610f\u4ee5\u4e0b\u5e7e\u9ede\uff1a<\/p>\n<ul>\n<li>\u78ba\u4fdd\u4ea4\u63db\u7684\u5b50\u5206\u5340\u4e0d\u5305\u542b\u4efb\u4f55\u7d04\u675f\u689d\u4ef6\uff0c\u9019\u53ef\u80fd\u6703\u5f71\u97ff\u4ea4\u63db\u64cd\u4f5c\u7684\u6210\u529f\u3002<\/li>\n<li>\u5728\u9032\u884c\u5927\u898f\u6a21\u6578\u64da\u64cd\u4f5c\u6642\uff0c\u5efa\u8b70\u5728\u975e\u9ad8\u5cf0\u6642\u6bb5\u9032\u884c\uff0c\u4ee5\u6e1b\u5c11\u5c0d\u7cfb\u7d71\u6027\u80fd\u7684\u5f71\u97ff\u3002<\/li>\n<li>\u5728\u9032\u884c\u4efb\u4f55\u7d50\u69cb\u8abf\u6574\u4e4b\u524d\uff0c\u52d9\u5fc5\u5099\u4efd\u6578\u64da\uff0c\u4ee5\u9632\u6b62\u6578\u64da\u4e1f\u5931\u3002<\/li>\n<\/ul>\n<h2 id=\"%e7%b8%bd%e7%b5%90-MWFWhpozpC\">\u7e3d\u7d50<\/h2>\n<p>ORA-14277 \u932f\u8aa4\u901a\u5e38\u662f\u7531\u65bc\u5728 EXCHANGE SUBPARTITION \u64cd\u4f5c\u4e2d\u8868\u7684\u5217\u6578\u4e0d\u4e00\u81f4\u6240\u5f15\u8d77\u7684\u3002\u901a\u904e\u6aa2\u67e5\u548c\u8abf\u6574\u8868\u7d50\u69cb\uff0c\u53ef\u4ee5\u6709\u6548\u5730\u89e3\u6c7a\u6b64\u554f\u984c\u3002\u4e86\u89e3\u9019\u4e9b\u932f\u8aa4\u53ca\u5176\u4fee\u5fa9\u65b9\u6cd5\u5c0d\u65bc\u6578\u64da\u5eab\u7ba1\u7406\u54e1\u4f86\u8aaa\u81f3\u95dc\u91cd\u8981\uff0c\u9019\u6a23\u53ef\u4ee5\u78ba\u4fdd\u6578\u64da\u5eab\u7684\u7a69\u5b9a\u6027\u548c\u6027\u80fd\u3002<\/p>\n<p>\u5982\u679c\u60a8\u6b63\u5728\u5c0b\u627e\u9ad8\u6548\u7684 <a href=\"https:\/\/server.hk\">\u9999\u6e2f VPS<\/a> \u89e3\u6c7a\u65b9\u6848\uff0cServer.HK \u63d0\u4f9b\u591a\u7a2e\u9078\u64c7\u4ee5\u6eff\u8db3\u60a8\u7684\u9700\u6c42\u3002\u6211\u5011\u7684 <a href=\"https:\/\/server.hk\">\u4e91\u670d\u52a1\u5668<\/a> \u670d\u52d9\u80fd\u5920\u652f\u6301\u5404\u7a2e\u61c9\u7528\uff0c\u7121\u8ad6\u662f\u5c0f\u578b\u4f01\u696d\u9084\u662f\u5927\u578b\u4f01\u696d\uff0c\u5747\u53ef\u7372\u5f97\u7a69\u5b9a\u7684\u6027\u80fd\u548c\u53ef\u9760\u7684\u652f\u6301\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u89e3\u6c7a ORA-14277 \u932f\u8aa4\uff1a\u5728 EXCHANGE SUBPARTITION \u64cd\u4f5c\u4e2d\uff0c\u78ba\u4fdd\u8868\u5177\u6709\u76f8\u540c\u6578\u91cf\u7684\u5217\u4ee5\u907f\u514d\u6545\u969c\u3002\u9060\u7a0b\u8655\u7406\u6307\u5357\u3002<\/p>\n","protected":false},"author":0,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[101],"tags":[],"class_list":["post-86088","post","type-post","status-publish","format-standard","hentry","category-database"],"_links":{"self":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/86088","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/types\/post"}],"replies":[{"embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/comments?post=86088"}],"version-history":[{"count":1,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/86088\/revisions"}],"predecessor-version":[{"id":86089,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/86088\/revisions\/86089"}],"wp:attachment":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/media?parent=86088"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/categories?post=86088"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/tags?post=86088"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}