{"id":129365,"date":"2024-10-26T21:04:43","date_gmt":"2024-10-26T13:04:43","guid":{"rendered":"https:\/\/server.hk\/cnblog\/129365\/"},"modified":"2024-10-26T21:04:43","modified_gmt":"2024-10-26T13:04:43","slug":"ora-14095-alter-table-exchange-%e9%9c%80%e8%a6%81%e9%9d%9e%e5%88%86%e5%8d%80%e7%9a%84%e9%9d%9e%e9%9b%86%e7%be%a4%e8%a1%a8%e3%80%82oracle-%e5%a0%b1%e9%8c%af-%e6%95%85%e9%9a%9c%e4%bf%ae%e5%be%a9","status":"publish","type":"post","link":"https:\/\/server.hk\/cnblog\/129365\/","title":{"rendered":"ORA-14095: ALTER TABLE EXCHANGE \u9700\u8981\u975e\u5206\u5340\u7684\u975e\u96c6\u7fa4\u8868\u3002ORACLE \u5831\u932f \u6545\u969c\u4fee\u5fa9 \u9060\u7a0b\u8655\u7406"},"content":{"rendered":"<h1 id=\"ora-14095-alter-table-exchange-%e9%9c%80%e8%a6%81%e9%9d%9e%e5%88%86%e5%8d%80%e7%9a%84%e9%9d%9e%e9%9b%86%e7%be%a4%e8%a1%a8-BMpmNJvlGM\">ORA-14095: ALTER TABLE EXCHANGE \u9700\u8981\u975e\u5206\u5340\u7684\u975e\u96c6\u7fa4\u8868<\/h1>\n<p>\u5728\u4f7f\u7528Oracle\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\u662fORA-14095\u3002\u9019\u500b\u932f\u8aa4\u901a\u5e38\u51fa\u73fe\u5728\u5617\u8a66\u4f7f\u7528ALTER TABLE EXCHANGE\u547d\u4ee4\u6642\uff0c\u7576\u6240\u6d89\u53ca\u7684\u8868\u4e0d\u7b26\u5408\u8981\u6c42\u6642\uff0c\u4fbf\u6703\u5f15\u767c\u6b64\u932f\u8aa4\u3002\u672c\u6587\u5c07\u6df1\u5165\u63a2\u8a0eORA-14095\u7684\u539f\u56e0\u3001\u89e3\u6c7a\u65b9\u6848\u4ee5\u53ca\u5982\u4f55\u9032\u884c\u9060\u7a0b\u8655\u7406\u3002<\/p>\n<h2 id=\"ora-14095%e7%9a%84%e5%8e%9f%e5%9b%a0-BMpmNJvlGM\">ORA-14095\u7684\u539f\u56e0<\/h2>\n<p>ORA-14095\u932f\u8aa4\u7684\u4e3b\u8981\u539f\u56e0\u662f\u5617\u8a66\u5c07\u4e00\u500b\u5206\u5340\u8868\u8207\u4e00\u500b\u975e\u5206\u5340\u8868\u9032\u884c\u4ea4\u63db\uff0c\u800cOracle\u6578\u64da\u5eab\u8981\u6c42\u9032\u884c\u4ea4\u63db\u7684\u8868\u5fc5\u9808\u662f\u975e\u5206\u5340\u7684\u975e\u96c6\u7fa4\u8868\u3002\u5177\u9ad4\u4f86\u8aaa\uff0c\u7576\u4f60\u57f7\u884c\u4ee5\u4e0b\u985e\u4f3c\u7684SQL\u8a9e\u53e5\u6642\uff0c\u53ef\u80fd\u6703\u9047\u5230\u6b64\u932f\u8aa4\uff1a<\/p>\n<pre><code>ALTER TABLE partitioned_table EXCHANGE PARTITION partition_name \nWITH TABLE non_partitioned_table;<\/code><\/pre>\n<p>\u5728\u9019\u500b\u4f8b\u5b50\u4e2d\uff0c\u5982\u679cnon_partitioned_table\u5be6\u969b\u4e0a\u662f\u4e00\u500b\u5206\u5340\u8868\u6216\u96c6\u7fa4\u8868\uff0c\u5247\u6703\u5f15\u767cORA-14095\u932f\u8aa4\u3002<\/p>\n<h2 id=\"%e8%a7%a3%e6%b1%ba%e6%96%b9%e6%a1%88-BMpmNJvlGM\">\u89e3\u6c7a\u65b9\u6848<\/h2>\n<p>\u8981\u89e3\u6c7aORA-14095\u932f\u8aa4\uff0c\u9996\u5148\u9700\u8981\u78ba\u4fdd\u4f60\u6240\u4f7f\u7528\u7684\u8868\u7b26\u5408Oracle\u7684\u8981\u6c42\u3002\u4ee5\u4e0b\u662f\u4e00\u4e9b\u6b65\u9a5f\u4f86\u5e6b\u52a9\u4f60\u4fee\u5fa9\u6b64\u932f\u8aa4\uff1a<\/p>\n<ul>\n<li><strong>\u6aa2\u67e5\u8868\u985e\u578b\uff1a<\/strong>\u78ba\u4fdd\u4f60\u8981\u4ea4\u63db\u7684\u8868\u662f\u975e\u5206\u5340\u7684\u975e\u96c6\u7fa4\u8868\u3002\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0bSQL\u67e5\u8a62\u4f86\u6aa2\u67e5\u8868\u7684\u5c6c\u6027\uff1a<\/li>\n<\/ul>\n<pre><code>SELECT table_name, partitioned, cluster_name \nFROM user_tables \nWHERE table_name IN ('PARTITIONED_TABLE', 'NON_PARTITIONED_TABLE');<\/code><\/pre>\n<ul>\n<li><strong>\u5275\u5efa\u975e\u5206\u5340\u8868\uff1a<\/strong>\u5982\u679cnon_partitioned_table\u662f\u4e00\u500b\u5206\u5340\u8868\uff0c\u5247\u9700\u8981\u5275\u5efa\u4e00\u500b\u65b0\u7684\u975e\u5206\u5340\u8868\uff0c\u7136\u5f8c\u5c07\u6578\u64da\u5f9e\u5206\u5340\u8868\u63d2\u5165\u5230\u9019\u500b\u65b0\u8868\u4e2d\u3002<\/li>\n<\/ul>\n<pre><code>CREATE TABLE new_non_partitioned_table AS \nSELECT * FROM partitioned_table WHERE 1=0; -- \u5275\u5efa\u7d50\u69cb\u76f8\u540c\u4f46\u7121\u6578\u64da\u7684\u8868\nINSERT INTO new_non_partitioned_table SELECT * FROM partitioned_table;<\/code><\/pre>\n<ul>\n<li><strong>\u91cd\u65b0\u57f7\u884c\u4ea4\u63db\u64cd\u4f5c\uff1a<\/strong>\u5728\u78ba\u4fddnon_partitioned_table\u7b26\u5408\u8981\u6c42\u5f8c\uff0c\u91cd\u65b0\u57f7\u884cALTER TABLE EXCHANGE\u547d\u4ee4\u3002<\/li>\n<\/ul>\n<pre><code>ALTER TABLE partitioned_table EXCHANGE PARTITION partition_name \nWITH TABLE new_non_partitioned_table;<\/code><\/pre>\n<h2 id=\"%e9%81%a0%e7%a8%8b%e8%99%95%e7%90%86ora-14095%e9%8c%af%e8%aa%a4-BMpmNJvlGM\">\u9060\u7a0b\u8655\u7406ORA-14095\u932f\u8aa4<\/h2>\n<p>\u5728\u67d0\u4e9b\u60c5\u6cc1\u4e0b\uff0c\u6578\u64da\u5eab\u7ba1\u7406\u54e1\u53ef\u80fd\u7121\u6cd5\u76f4\u63a5\u8a2a\u554f\u6578\u64da\u5eab\u9032\u884c\u4fee\u5fa9\u3002\u9019\u6642\uff0c\u9060\u7a0b\u8655\u7406\u6210\u70ba\u4e00\u500b\u6709\u6548\u7684\u89e3\u6c7a\u65b9\u6848\u3002\u4ee5\u4e0b\u662f\u4e00\u4e9b\u9060\u7a0b\u8655\u7406\u7684\u5efa\u8b70\uff1a<\/p>\n<ul>\n<li><strong>\u4f7f\u7528\u9060\u7a0b\u684c\u9762\u5de5\u5177\uff1a<\/strong>\u901a\u904e\u9060\u7a0b\u684c\u9762\u9023\u63a5\u5230\u6578\u64da\u5eab\u670d\u52d9\u5668\uff0c\u57f7\u884c\u5fc5\u8981\u7684SQL\u547d\u4ee4\u3002<\/li>\n<li><strong>\u5229\u7528\u6578\u64da\u5eab\u7ba1\u7406\u5de5\u5177\uff1a<\/strong>\u4f7f\u7528\u5982Oracle SQL Developer\u7b49\u5de5\u5177\uff0c\u901a\u904e\u5716\u5f62\u754c\u9762\u9032\u884c\u64cd\u4f5c\uff0c\u9019\u6a23\u53ef\u4ee5\u66f4\u76f4\u89c0\u5730\u6aa2\u67e5\u8868\u7684\u5c6c\u6027\u3002<\/li>\n<li><strong>\u8acb\u6c42\u6280\u8853\u652f\u6301\uff1a<\/strong>\u5982\u679c\u554f\u984c\u7121\u6cd5\u89e3\u6c7a\uff0c\u53ef\u4ee5\u8003\u616e\u8acb\u6c42\u5c08\u696d\u7684\u6280\u8853\u652f\u6301\uff0c\u5e6b\u52a9\u8a3a\u65b7\u548c\u4fee\u5fa9\u554f\u984c\u3002<\/li>\n<\/ul>\n<h2 id=\"%e7%b8%bd%e7%b5%90-BMpmNJvlGM\">\u7e3d\u7d50<\/h2>\n<p>ORA-14095\u932f\u8aa4\u901a\u5e38\u662f\u7531\u65bc\u4e0d\u7b26\u5408\u8981\u6c42\u7684\u8868\u985e\u578b\u5f15\u8d77\u7684\u3002\u901a\u904e\u6aa2\u67e5\u8868\u7684\u5c6c\u6027\u3001\u5275\u5efa\u5408\u9069\u7684\u975e\u5206\u5340\u8868\u4ee5\u53ca\u91cd\u65b0\u57f7\u884c\u4ea4\u63db\u64cd\u4f5c\uff0c\u53ef\u4ee5\u6709\u6548\u5730\u89e3\u6c7a\u6b64\u554f\u984c\u3002\u6b64\u5916\uff0c\u9060\u7a0b\u8655\u7406\u65b9\u6cd5\u4e5f\u80fd\u5e6b\u52a9\u6578\u64da\u5eab\u7ba1\u7406\u54e1\u5728\u7121\u6cd5\u76f4\u63a5\u8a2a\u554f\u6578\u64da\u5eab\u7684\u60c5\u6cc1\u4e0b\u9032\u884c\u6545\u969c\u4fee\u5fa9\u3002\u5c0d\u65bc\u9700\u8981\u7a69\u5b9a\u548c\u9ad8\u6548\u7684\u6578\u64da\u5eab\u670d\u52d9\u7684\u7528\u6236\uff0c\u9078\u64c7\u5408\u9069\u7684<a href=\"https:\/\/server.hk\">\u9999\u6e2fVPS<\/a>\u6216<a href=\"https:\/\/server.hk\">\u9999\u6e2f\u4f3a\u670d\u5668<\/a>\u89e3\u6c7a\u65b9\u6848\u5c07\u662f\u660e\u667a\u4e4b\u8209\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u89e3\u6c7a ORA-14095 \u932f\u8aa4\uff1aALTER TABLE EXCHANGE \u9700\u975e\u5206\u5340\u975e\u96c6\u7fa4\u8868\u3002\u63d0\u4f9b\u6545\u969c\u4fee\u5fa9\u8207\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-129365","post","type-post","status-publish","format-standard","hentry","category-database"],"_links":{"self":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/129365","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=129365"}],"version-history":[{"count":1,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/129365\/revisions"}],"predecessor-version":[{"id":129366,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/129365\/revisions\/129366"}],"wp:attachment":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/media?parent=129365"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/categories?post=129365"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/tags?post=129365"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}