{"id":85948,"date":"2024-10-17T17:05:24","date_gmt":"2024-10-17T09:05:24","guid":{"rendered":"https:\/\/server.hk\/cnblog\/85948\/"},"modified":"2024-10-17T17:05:24","modified_gmt":"2024-10-17T09:05:24","slug":"ora-14003-global-%e5%ad%90%e5%8f%a5%e8%88%87%e4%b9%8b%e5%89%8d%e6%8c%87%e5%ae%9a%e7%9a%84-local-%e5%ad%90%e5%8f%a5%e7%9b%b8%e7%9f%9b%e7%9b%be%e3%80%82oracle-%e5%a0%b1%e9%8c%af-%e6%95%85%e9%9a%9c","status":"publish","type":"post","link":"https:\/\/server.hk\/cnblog\/85948\/","title":{"rendered":"ORA-14003: GLOBAL \u5b50\u53e5\u8207\u4e4b\u524d\u6307\u5b9a\u7684 LOCAL \u5b50\u53e5\u76f8\u77db\u76fe\u3002ORACLE \u5831\u932f \u6545\u969c\u4fee\u5fa9 \u9060\u7a0b\u8655\u7406"},"content":{"rendered":"<h1 id=\"ora-14003-global-%e5%ad%90%e5%8f%a5%e8%88%87%e4%b9%8b%e5%89%8d%e6%8c%87%e5%ae%9a%e7%9a%84-local-%e5%ad%90%e5%8f%a5%e7%9b%b8%e7%9f%9b%e7%9b%be-EIoTLCzGkF\">ORA-14003: GLOBAL \u5b50\u53e5\u8207\u4e4b\u524d\u6307\u5b9a\u7684 LOCAL \u5b50\u53e5\u76f8\u77db\u76fe<\/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 <code>ORA-14003<\/code>\u3002\u9019\u500b\u932f\u8aa4\u901a\u5e38\u51fa\u73fe\u5728\u4f7f\u7528\u5206\u5340\u8868\u6642\uff0c\u7279\u5225\u662f\u5728\u5b9a\u7fa9\u5206\u5340\u6642\u4f7f\u7528\u4e86\u4e0d\u4e00\u81f4\u7684\u5b50\u53e5\u3002\u672c\u6587\u5c07\u6df1\u5165\u63a2\u8a0e <code>ORA-14003<\/code> \u7684\u6210\u56e0\u3001\u89e3\u6c7a\u65b9\u6848\u4ee5\u53ca\u5982\u4f55\u9032\u884c\u9060\u7a0b\u6545\u969c\u6392\u9664\u3002<\/p>\n<h2 id=\"%e9%8c%af%e8%aa%a4%e5%8e%9f%e5%9b%a0%e5%88%86%e6%9e%90-EIoTLCzGkF\">\u932f\u8aa4\u539f\u56e0\u5206\u6790<\/h2>\n<p>\u7576\u4f60\u5728\u5275\u5efa\u6216\u4fee\u6539\u5206\u5340\u8868\u6642\uff0c\u53ef\u80fd\u6703\u4f7f\u7528 <code>GLOBAL<\/code> \u548c <code>LOCAL<\/code> \u5b50\u53e5\u4f86\u5b9a\u7fa9\u5206\u5340\u7684\u7bc4\u570d\u3002<code>ORA-14003<\/code> \u932f\u8aa4\u7684\u51fa\u73fe\uff0c\u901a\u5e38\u662f\u56e0\u70ba\u9019\u5169\u500b\u5b50\u53e5\u4e4b\u9593\u5b58\u5728\u77db\u76fe\u3002\u4f8b\u5982\uff0c\u5982\u679c\u4f60\u5728\u5275\u5efa\u4e00\u500b\u5206\u5340\u8868\u6642\uff0c\u6307\u5b9a\u4e86 <code>GLOBAL<\/code> \u5206\u5340\uff0c\u4f46\u5728\u67d0\u4e9b\u5206\u5340\u4e2d\u537b\u4f7f\u7528\u4e86 <code>LOCAL<\/code>\uff0c\u9019\u5c07\u5c0e\u81f4 Oracle \u7121\u6cd5\u6b63\u78ba\u89e3\u6790\u5206\u5340\u7684\u7d50\u69cb\u3002<\/p>\n<h3 id=\"%e7%a4%ba%e4%be%8b-EIoTLCzGkF\">\u793a\u4f8b<\/h3>\n<pre><code>CREATE TABLE sales (\n    sale_id NUMBER,\n    sale_date DATE,\n    amount NUMBER\n)\nPARTITION BY RANGE (sale_date)\n(\n    PARTITION p1 VALUES LESS THAN (TO_DATE('2023-01-01', 'YYYY-MM-DD')) GLOBAL,\n    PARTITION p2 VALUES LESS THAN (TO_DATE('2024-01-01', 'YYYY-MM-DD')) LOCAL\n);\n<\/code><\/pre>\n<p>\u5728\u4e0a\u8ff0\u793a\u4f8b\u4e2d\uff0c<code>p1<\/code> \u5206\u5340\u4f7f\u7528\u4e86 <code>GLOBAL<\/code> \u5b50\u53e5\uff0c\u800c <code>p2<\/code> \u5206\u5340\u537b\u4f7f\u7528\u4e86 <code>LOCAL<\/code> \u5b50\u53e5\uff0c\u9019\u5c07\u5c0e\u81f4 <code>ORA-14003<\/code> \u932f\u8aa4\u7684\u7522\u751f\u3002<\/p>\n<h2 id=\"%e6%95%85%e9%9a%9c%e4%bf%ae%e5%be%a9%e6%ad%a5%e9%a9%9f-EIoTLCzGkF\">\u6545\u969c\u4fee\u5fa9\u6b65\u9a5f<\/h2>\n<p>\u8981\u4fee\u5fa9 <code>ORA-14003<\/code> \u932f\u8aa4\uff0c\u9996\u5148\u9700\u8981\u6aa2\u67e5\u5206\u5340\u8868\u7684\u5b9a\u7fa9\uff0c\u78ba\u4fdd\u6240\u6709\u5206\u5340\u7684\u5b50\u53e5\u4e00\u81f4\u3002\u4ee5\u4e0b\u662f\u4e00\u4e9b\u5177\u9ad4\u7684\u4fee\u5fa9\u6b65\u9a5f\uff1a<\/p>\n<ul>\n<li><strong>\u6aa2\u67e5\u5206\u5340\u5b9a\u7fa9\uff1a<\/strong> \u78ba\u4fdd\u6240\u6709\u5206\u5340\u90fd\u4f7f\u7528\u76f8\u540c\u7684\u5b50\u53e5\uff08\u8981\u9ebc\u5168\u90e8\u4f7f\u7528 <code>GLOBAL<\/code>\uff0c\u8981\u9ebc\u5168\u90e8\u4f7f\u7528 <code>LOCAL<\/code>\uff09\u3002<\/li>\n<li><strong>\u4fee\u6539\u5206\u5340\u8868\uff1a<\/strong> \u5982\u679c\u767c\u73fe\u4e0d\u4e00\u81f4\uff0c\u5247\u9700\u8981\u4fee\u6539\u5206\u5340\u8868\u7684\u5b9a\u7fa9\u3002\u4f8b\u5982\uff0c\u53ef\u4ee5\u5c07\u6240\u6709\u5206\u5340\u90fd\u6539\u70ba <code>LOCAL<\/code>\u3002<\/li>\n<li><strong>\u91cd\u65b0\u57f7\u884c SQL \u8a9e\u53e5\uff1a<\/strong> \u5728\u4fee\u6b63\u4e86\u5206\u5340\u5b9a\u7fa9\u5f8c\uff0c\u91cd\u65b0\u57f7\u884c\u539f\u59cb\u7684 SQL \u8a9e\u53e5\uff0c\u6aa2\u67e5\u662f\u5426\u4ecd\u7136\u51fa\u73fe\u932f\u8aa4\u3002<\/li>\n<\/ul>\n<h3 id=\"%e4%bf%ae%e6%ad%a3%e7%a4%ba%e4%be%8b-EIoTLCzGkF\">\u4fee\u6b63\u793a\u4f8b<\/h3>\n<pre><code>CREATE TABLE sales (\n    sale_id NUMBER,\n    sale_date DATE,\n    amount NUMBER\n)\nPARTITION BY RANGE (sale_date)\n(\n    PARTITION p1 VALUES LESS THAN (TO_DATE('2023-01-01', 'YYYY-MM-DD')) LOCAL,\n    PARTITION p2 VALUES LESS THAN (TO_DATE('2024-01-01', 'YYYY-MM-DD')) LOCAL\n);\n<\/code><\/pre>\n<p>\u5728\u9019\u500b\u4fee\u6b63\u5f8c\u7684\u793a\u4f8b\u4e2d\uff0c\u6240\u6709\u5206\u5340\u90fd\u4f7f\u7528\u4e86 <code>LOCAL<\/code> \u5b50\u53e5\uff0c\u9019\u6a23\u5c31\u4e0d\u6703\u518d\u51fa\u73fe <code>ORA-14003<\/code> \u932f\u8aa4\u3002<\/p>\n<h2 id=\"%e9%81%a0%e7%a8%8b%e6%95%85%e9%9a%9c%e6%8e%92%e9%99%a4-EIoTLCzGkF\">\u9060\u7a0b\u6545\u969c\u6392\u9664<\/h2>\n<p>\u5728\u67d0\u4e9b\u60c5\u6cc1\u4e0b\uff0c\u7279\u5225\u662f\u7576\u4f60\u7121\u6cd5\u76f4\u63a5\u8a2a\u554f\u6578\u64da\u5eab\u6642\uff0c\u9060\u7a0b\u6545\u969c\u6392\u9664\u53ef\u80fd\u662f\u5fc5\u8981\u7684\u3002\u4ee5\u4e0b\u662f\u4e00\u4e9b\u5efa\u8b70\uff1a<\/p>\n<ul>\n<li><strong>\u4f7f\u7528\u9060\u7a0b\u684c\u9762\u5de5\u5177\uff1a<\/strong> \u5229\u7528\u9060\u7a0b\u684c\u9762\u5de5\u5177\u9023\u63a5\u5230\u6578\u64da\u5eab\u6240\u5728\u7684\u4f3a\u670d\u5668\uff0c\u6aa2\u67e5\u5206\u5340\u8868\u7684\u5b9a\u7fa9\u3002<\/li>\n<li><strong>\u67e5\u95b1\u65e5\u8a8c\u6587\u4ef6\uff1a<\/strong> \u6aa2\u67e5 Oracle \u7684\u65e5\u8a8c\u6587\u4ef6\uff0c\u5c0b\u627e\u8207 <code>ORA-14003<\/code> \u76f8\u95dc\u7684\u8a73\u7d30\u4fe1\u606f\u3002<\/li>\n<li><strong>\u8acb\u6c42\u6280\u8853\u652f\u6301\uff1a<\/strong> \u5982\u679c\u554f\u984c\u4ecd\u7136\u7121\u6cd5\u89e3\u6c7a\uff0c\u53ef\u4ee5\u8003\u616e\u8acb\u6c42\u5c08\u696d\u7684\u6280\u8853\u652f\u6301\uff0c\u5354\u52a9\u9032\u884c\u6545\u969c\u6392\u9664\u3002<\/li>\n<\/ul>\n<h2 id=\"%e7%b8%bd%e7%b5%90-EIoTLCzGkF\">\u7e3d\u7d50<\/h2>\n<p>\u5728\u4f7f\u7528 Oracle \u6578\u64da\u5eab\u6642\uff0c<code>ORA-14003<\/code> \u932f\u8aa4\u901a\u5e38\u662f\u7531\u65bc <code>GLOBAL<\/code> \u548c <code>LOCAL<\/code> \u5b50\u53e5\u4e4b\u9593\u7684\u4e0d\u4e00\u81f4\u6240\u5f15\u8d77\u7684\u3002\u901a\u904e\u4ed4\u7d30\u6aa2\u67e5\u5206\u5340\u8868\u7684\u5b9a\u7fa9\u4e26\u9032\u884c\u5fc5\u8981\u7684\u4fee\u6539\uff0c\u53ef\u4ee5\u6709\u6548\u5730\u89e3\u6c7a\u6b64\u554f\u984c\u3002\u5c0d\u65bc\u9700\u8981\u9060\u7a0b\u6545\u969c\u6392\u9664\u7684\u60c5\u6cc1\uff0c\u4f7f\u7528\u5408\u9069\u7684\u5de5\u5177\u548c\u6280\u8853\u652f\u6301\u5c07\u6709\u52a9\u65bc\u5feb\u901f\u5b9a\u4f4d\u548c\u89e3\u6c7a\u554f\u984c\u3002<\/p>\n<p>\u5982\u9700\u4e86\u89e3\u66f4\u591a\u6709\u95dc <a href=\"https:\/\/server.hk\">\u9999\u6e2f VPS<\/a> \u548c\u5176\u4ed6\u4f3a\u670d\u5668\u89e3\u6c7a\u65b9\u6848\u7684\u4fe1\u606f\uff0c\u8acb\u8a2a\u554f\u6211\u5011\u7684\u7db2\u7ad9\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u89e3\u6c7a ORA-14003 \u932f\u8aa4\uff1aGLOBAL \u5b50\u53e5\u8207 LOCAL \u5b50\u53e5\u885d\u7a81\u7684\u6545\u969c\u4fee\u5fa9\u6307\u5357\uff0c\u63d0\u4f9b\u6709\u6548\u7684\u9060\u7a0b\u8655\u7406\u65b9\u6848\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-85948","post","type-post","status-publish","format-standard","hentry","category-database"],"_links":{"self":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/85948","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=85948"}],"version-history":[{"count":1,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/85948\/revisions"}],"predecessor-version":[{"id":85949,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/85948\/revisions\/85949"}],"wp:attachment":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/media?parent=85948"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/categories?post=85948"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/tags?post=85948"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}