{"id":85946,"date":"2024-10-17T17:04:17","date_gmt":"2024-10-17T09:04:17","guid":{"rendered":"https:\/\/server.hk\/cnblog\/85946\/"},"modified":"2024-10-17T17:04:17","modified_gmt":"2024-10-17T09:04:17","slug":"ora-14002-%e5%8f%aa%e8%83%bd%e6%8c%87%e5%ae%9a%e4%b8%80%e5%80%8b-global-%e5%ad%90%e5%8f%a5%e3%80%82oracle-%e5%a0%b1%e9%8c%af-%e6%95%85%e9%9a%9c%e4%bf%ae%e5%be%a9-%e9%81%a0%e7%a8%8b%e8%99%95%e7%90%86","status":"publish","type":"post","link":"https:\/\/server.hk\/cnblog\/85946\/","title":{"rendered":"ORA-14002: \u53ea\u80fd\u6307\u5b9a\u4e00\u500b GLOBAL \u5b50\u53e5\u3002ORACLE \u5831\u932f \u6545\u969c\u4fee\u5fa9 \u9060\u7a0b\u8655\u7406"},"content":{"rendered":"<h1 id=\"ora-14002-%e5%8f%aa%e8%83%bd%e6%8c%87%e5%ae%9a%e4%b8%80%e5%80%8b-global-%e5%ad%90%e5%8f%a5-oracle-%e5%a0%b1%e9%8c%af-%e6%95%85%e9%9a%9c%e4%bf%ae%e5%be%a9-%e9%81%a0%e7%a8%8b%e8%99%95%e7%90%86-PNAVVqzmsp\">ORA-14002: \u53ea\u80fd\u6307\u5b9a\u4e00\u500b GLOBAL \u5b50\u53e5 &#8211; ORACLE \u5831\u932f \u6545\u969c\u4fee\u5fa9 \u9060\u7a0b\u8655\u7406<\/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-14002<\/code>\u3002\u9019\u500b\u932f\u8aa4\u901a\u5e38\u51fa\u73fe\u5728\u5617\u8a66\u5275\u5efa\u6216\u4fee\u6539\u5206\u5340\u8868\u6642\uff0c\u7279\u5225\u662f\u7576\u7528\u6236\u5728 SQL \u8a9e\u53e5\u4e2d\u4e0d\u7576\u5730\u6307\u5b9a\u4e86\u591a\u500b GLOBAL \u5b50\u53e5\u3002\u672c\u6587\u5c07\u6df1\u5165\u63a2\u8a0e <code>ORA-14002<\/code> \u932f\u8aa4\u7684\u539f\u56e0\u3001\u5f71\u97ff\u4ee5\u53ca\u5982\u4f55\u9032\u884c\u6545\u969c\u4fee\u5fa9\u3002<\/p>\n<h2 id=\"ora-14002-%e9%8c%af%e8%aa%a4%e7%9a%84%e5%8e%9f%e5%9b%a0-PNAVVqzmsp\">ORA-14002 \u932f\u8aa4\u7684\u539f\u56e0<\/h2>\n<p>\u7576\u4f60\u5728 Oracle \u6578\u64da\u5eab\u4e2d\u57f7\u884c\u4e00\u500b SQL \u8a9e\u53e5\u6642\uff0c\u5982\u679c\u51fa\u73fe <code>ORA-14002<\/code> \u932f\u8aa4\uff0c\u9019\u901a\u5e38\u610f\u5473\u8457\u4f60\u5728\u5275\u5efa\u6216\u4fee\u6539\u5206\u5340\u8868\u6642\uff0c\u932f\u8aa4\u5730\u6307\u5b9a\u4e86\u591a\u500b GLOBAL \u5b50\u53e5\u3002\u6839\u64da Oracle \u7684\u6587\u6a94\uff0cGLOBAL \u5b50\u53e5\u7528\u65bc\u5b9a\u7fa9\u5206\u5340\u8868\u7684\u5168\u5c40\u5c6c\u6027\uff0c\u9019\u610f\u5473\u8457\u5728\u4e00\u500b SQL \u8a9e\u53e5\u4e2d\u53ea\u80fd\u6709\u4e00\u500b GLOBAL \u5b50\u53e5\u3002<\/p>\n<h3 id=\"%e5%b8%b8%e8%a6%8b%e7%9a%84%e6%83%85%e5%a2%83-PNAVVqzmsp\">\u5e38\u898b\u7684\u60c5\u5883<\/h3>\n<ul>\n<li>\u5728\u5275\u5efa\u5206\u5340\u8868\u6642\uff0c\u4f7f\u7528\u4e86\u591a\u500b GLOBAL \u5b50\u53e5\u3002<\/li>\n<li>\u5728\u4fee\u6539\u73fe\u6709\u7684\u5206\u5340\u8868\u6642\uff0c\u932f\u8aa4\u5730\u6dfb\u52a0\u4e86\u984d\u5916\u7684 GLOBAL \u5b50\u53e5\u3002<\/li>\n<li>\u5728\u4f7f\u7528 PL\/SQL \u7a0b\u5e8f\u6642\uff0c\u672a\u6b63\u78ba\u8655\u7406\u5206\u5340\u8868\u7684\u5c6c\u6027\u3002<\/li>\n<\/ul>\n<h2 id=\"%e5%a6%82%e4%bd%95%e4%bf%ae%e5%be%a9-ora-14002-%e9%8c%af%e8%aa%a4-PNAVVqzmsp\">\u5982\u4f55\u4fee\u5fa9 ORA-14002 \u932f\u8aa4<\/h2>\n<p>\u4fee\u5fa9 <code>ORA-14002<\/code> \u932f\u8aa4\u7684\u7b2c\u4e00\u6b65\u662f\u6aa2\u67e5 SQL \u8a9e\u53e5\uff0c\u78ba\u4fdd\u5728\u4efb\u4f55\u5275\u5efa\u6216\u4fee\u6539\u5206\u5340\u8868\u7684\u8a9e\u53e5\u4e2d\u50c5\u4f7f\u7528\u4e00\u500b GLOBAL \u5b50\u53e5\u3002\u4ee5\u4e0b\u662f\u4e00\u4e9b\u5177\u9ad4\u7684\u6b65\u9a5f\u548c\u793a\u4f8b\uff1a<\/p>\n<h3 id=\"%e6%ad%a5%e9%a9%9f-1-%e6%aa%a2%e6%9f%a5-sql-%e8%aa%9e%e5%8f%a5-PNAVVqzmsp\">\u6b65\u9a5f 1: \u6aa2\u67e5 SQL \u8a9e\u53e5<\/h3>\n<pre><code>CREATE TABLE my_partitioned_table (\n    id NUMBER,\n    name VARCHAR2(100)\n)\nPARTITION BY RANGE (id)\nGLOBAL PARTITION BY (id) -- \u932f\u8aa4\uff1a\u591a\u500b GLOBAL \u5b50\u53e5\nPARTITION p1 VALUES LESS THAN (100),\nPARTITION p2 VALUES LESS THAN (200);\n<\/code><\/pre>\n<p>\u5728\u4e0a\u9762\u7684\u793a\u4f8b\u4e2d\uff0c<code>GLOBAL PARTITION BY<\/code> \u662f\u4e0d\u6b63\u78ba\u7684\uff0c\u56e0\u70ba\u9019\u88e1\u4e0d\u61c9\u8a72\u6709\u591a\u500b GLOBAL \u5b50\u53e5\u3002\u6b63\u78ba\u7684\u5beb\u6cd5\u61c9\u8a72\u662f\uff1a<\/p>\n<pre><code>CREATE TABLE my_partitioned_table (\n    id NUMBER,\n    name VARCHAR2(100)\n)\nPARTITION BY RANGE (id) -- \u6b63\u78ba\uff1a\u50c5\u4f7f\u7528\u4e00\u500b GLOBAL \u5b50\u53e5\nPARTITION p1 VALUES LESS THAN (100),\nPARTITION p2 VALUES LESS THAN (200);\n<\/code><\/pre>\n<h3 id=\"%e6%ad%a5%e9%a9%9f-2-%e6%b8%ac%e8%a9%a6%e5%92%8c%e9%a9%97%e8%ad%89-PNAVVqzmsp\">\u6b65\u9a5f 2: \u6e2c\u8a66\u548c\u9a57\u8b49<\/h3>\n<p>\u5728\u4fee\u6b63 SQL \u8a9e\u53e5\u5f8c\uff0c\u57f7\u884c\u8a72\u8a9e\u53e5\u4ee5\u78ba\u4fdd\u4e0d\u518d\u51fa\u73fe <code>ORA-14002<\/code> \u932f\u8aa4\u3002\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u67e5\u8a62\u4f86\u9a57\u8b49\u5206\u5340\u8868\u7684\u7d50\u69cb\uff1a<\/p>\n<pre><code>SELECT partition_name, high_value\nFROM user_tab_partitions\nWHERE table_name = 'MY_PARTITIONED_TABLE';\n<\/code><\/pre>\n<h2 id=\"%e9%81%a0%e7%a8%8b%e8%99%95%e7%90%86%e5%92%8c%e6%95%85%e9%9a%9c%e6%8e%92%e9%99%a4-PNAVVqzmsp\">\u9060\u7a0b\u8655\u7406\u548c\u6545\u969c\u6392\u9664<\/h2>\n<p>\u5728\u67d0\u4e9b\u60c5\u6cc1\u4e0b\uff0c\u7279\u5225\u662f\u5728\u5927\u578b\u4f01\u696d\u74b0\u5883\u4e2d\uff0c\u53ef\u80fd\u9700\u8981\u9032\u884c\u9060\u7a0b\u8655\u7406\u4f86\u89e3\u6c7a <code>ORA-14002<\/code> \u932f\u8aa4\u3002\u9019\u53ef\u4ee5\u901a\u904e\u4ee5\u4e0b\u65b9\u5f0f\u9032\u884c\uff1a<\/p>\n<ul>\n<li>\u4f7f\u7528\u9060\u7a0b\u684c\u9762\u5de5\u5177\u9023\u63a5\u5230\u6578\u64da\u5eab\u670d\u52d9\u5668\uff0c\u6aa2\u67e5 SQL \u8a9e\u53e5\u7684\u57f7\u884c\u74b0\u5883\u3002<\/li>\n<li>\u5229\u7528 Oracle \u7684\u8a3a\u65b7\u5de5\u5177\uff0c\u5982 AWR \u5831\u544a\uff0c\u4f86\u5206\u6790\u6027\u80fd\u554f\u984c\u3002<\/li>\n<li>\u8207\u6578\u64da\u5eab\u7ba1\u7406\u5718\u968a\u5408\u4f5c\uff0c\u78ba\u4fdd\u6240\u6709\u7684 SQL \u8a9e\u53e5\u90fd\u9075\u5faa\u6700\u4f73\u5be6\u8e10\u3002<\/li>\n<\/ul>\n<h2 id=\"%e7%b8%bd%e7%b5%90-PNAVVqzmsp\">\u7e3d\u7d50<\/h2>\n<p>\u5728 Oracle \u6578\u64da\u5eab\u4e2d\uff0c<code>ORA-14002<\/code> \u932f\u8aa4\u901a\u5e38\u662f\u7531\u65bc\u4e0d\u7576\u4f7f\u7528 GLOBAL \u5b50\u53e5\u6240\u5f15\u8d77\u7684\u3002\u901a\u904e\u4ed4\u7d30\u6aa2\u67e5 SQL \u8a9e\u53e5\u4e26\u78ba\u4fdd\u50c5\u4f7f\u7528\u4e00\u500b GLOBAL \u5b50\u53e5\uff0c\u53ef\u4ee5\u6709\u6548\u5730\u4fee\u5fa9\u6b64\u932f\u8aa4\u3002\u6b64\u5916\uff0c\u9060\u7a0b\u8655\u7406\u548c\u6545\u969c\u6392\u9664\u4e5f\u662f\u89e3\u6c7a\u6b64\u554f\u984c\u7684\u91cd\u8981\u624b\u6bb5\u3002\u82e5\u60a8\u9700\u8981\u66f4\u591a\u6709\u95dc <a href=\"https:\/\/server.hk\">\u9999\u6e2f VPS<\/a> \u548c\u6578\u64da\u5eab\u7ba1\u7406\u7684\u8cc7\u8a0a\uff0c\u8acb\u8a2a\u554f\u6211\u5011\u7684\u7db2\u7ad9\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u89e3\u6c7a ORA-14002 \u932f\u8aa4\uff0c\u4e86\u89e3\u53ea\u80fd\u6307\u5b9a\u4e00\u500b GLOBAL \u5b50\u53e5\u7684\u539f\u56e0\uff0c\u4e26\u638c\u63e1\u6709\u6548\u7684\u6545\u969c\u4fee\u5fa9\u8207\u9060\u7a0b\u8655\u7406\u6280\u5de7\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-85946","post","type-post","status-publish","format-standard","hentry","category-database"],"_links":{"self":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/85946","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=85946"}],"version-history":[{"count":1,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/85946\/revisions"}],"predecessor-version":[{"id":85947,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/85946\/revisions\/85947"}],"wp:attachment":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/media?parent=85946"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/categories?post=85946"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/tags?post=85946"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}