{"id":83621,"date":"2024-10-17T00:40:16","date_gmt":"2024-10-16T16:40:16","guid":{"rendered":"https:\/\/server.hk\/cnblog\/83621\/"},"modified":"2024-10-17T00:40:16","modified_gmt":"2024-10-16T16:40:16","slug":"ora-02456-hash-is-%e5%88%97%e8%a6%8f%e7%af%84%e5%bf%85%e9%a0%88%e7%82%ba-number0-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","status":"publish","type":"post","link":"https:\/\/server.hk\/cnblog\/83621\/","title":{"rendered":"ORA-02456: HASH IS \u5217\u898f\u7bc4\u5fc5\u9808\u70ba NUMBER(*,0) ORACLE\u5831\u932f\u6545\u969c\u4fee\u5fa9\u9060\u7a0b\u8655\u7406"},"content":{"rendered":"<h1 id=\"ora-02456-hash-is-%e5%88%97%e8%a6%8f%e7%af%84%e5%bf%85%e9%a0%88%e7%82%ba-number0-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-WMgrLGxvEJ\">ORA-02456: HASH IS \u5217\u898f\u7bc4\u5fc5\u9808\u70ba NUMBER(*,0) ORACLE\u5831\u932f\u6545\u969c\u4fee\u5fa9\u9060\u7a0b\u8655\u7406<\/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\u662f <code>ORA-02456<\/code>\u3002\u9019\u500b\u932f\u8aa4\u901a\u5e38\u8207HASH\u7d22\u5f15\u7684\u5217\u898f\u7bc4\u6709\u95dc\uff0c\u7279\u5225\u662f\u7576\u8a72\u5217\u7684\u6578\u64da\u985e\u578b\u4e0d\u7b26\u5408\u8981\u6c42\u6642\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=\"%e9%8c%af%e8%aa%a4%e5%8e%9f%e5%9b%a0%e5%88%86%e6%9e%90-WMgrLGxvEJ\">\u932f\u8aa4\u539f\u56e0\u5206\u6790<\/h2>\n<p>\u7576\u4f60\u5728Oracle\u6578\u64da\u5eab\u4e2d\u5275\u5efaHASH\u7d22\u5f15\u6642\uff0c\u7cfb\u7d71\u8981\u6c42\u7d22\u5f15\u7684\u5217\u5fc5\u9808\u662f <code>NUMBER(*,0)<\/code> \u985e\u578b\u3002\u9019\u610f\u5473\u8457\u8a72\u5217\u5fc5\u9808\u662f\u6574\u6578\u985e\u578b\uff0c\u4e14\u4e0d\u5141\u8a31\u5c0f\u6578\u90e8\u5206\u3002\u5982\u679c\u4f60\u5617\u8a66\u5728\u5176\u4ed6\u6578\u64da\u985e\u578b\u7684\u5217\u4e0a\u5275\u5efaHASH\u7d22\u5f15\uff0c\u5247\u6703\u51fa\u73fe <code>ORA-02456<\/code> \u932f\u8aa4\u3002<\/p>\n<h3 id=\"%e7%a4%ba%e4%be%8b-WMgrLGxvEJ\">\u793a\u4f8b<\/h3>\n<pre><code>CREATE TABLE example_table (\n    id NUMBER,\n    name VARCHAR2(100)\n);\n\nCREATE INDEX example_index ON example_table (name) HASH;\n<\/code><\/pre>\n<p>\u5728\u4e0a\u8ff0\u793a\u4f8b\u4e2d\uff0c\u56e0\u70ba <code>name<\/code> \u5217\u7684\u6578\u64da\u985e\u578b\u662f <code>VARCHAR2<\/code>\uff0c\u6240\u4ee5\u7576\u4f60\u5617\u8a66\u5275\u5efaHASH\u7d22\u5f15\u6642\uff0c\u5c07\u6703\u5f15\u767c <code>ORA-02456<\/code> \u932f\u8aa4\u3002<\/p>\n<h2 id=\"%e5%bd%b1%e9%9f%bf-WMgrLGxvEJ\">\u5f71\u97ff<\/h2>\n<p>\u9019\u500b\u932f\u8aa4\u6703\u5c0e\u81f4\u6578\u64da\u5eab\u64cd\u4f5c\u5931\u6557\uff0c\u5f71\u97ff\u61c9\u7528\u7a0b\u5e8f\u7684\u6027\u80fd\u548c\u7a69\u5b9a\u6027\u3002\u7279\u5225\u662f\u5728\u9ad8\u4e26\u767c\u7684\u74b0\u5883\u4e2d\uff0c\u9019\u7a2e\u932f\u8aa4\u53ef\u80fd\u6703\u5c0e\u81f4\u67e5\u8a62\u5ef6\u9072\uff0c\u751a\u81f3\u7cfb\u7d71\u5d29\u6f70\u3002\u56e0\u6b64\uff0c\u53ca\u6642\u4fee\u5fa9\u9019\u500b\u932f\u8aa4\u662f\u975e\u5e38\u91cd\u8981\u7684\u3002<\/p>\n<h2 id=\"%e6%95%85%e9%9a%9c%e4%bf%ae%e5%be%a9%e6%ad%a5%e9%a9%9f-WMgrLGxvEJ\">\u6545\u969c\u4fee\u5fa9\u6b65\u9a5f<\/h2>\n<p>\u8981\u4fee\u5fa9 <code>ORA-02456<\/code> \u932f\u8aa4\uff0c\u53ef\u4ee5\u6309\u7167\u4ee5\u4e0b\u6b65\u9a5f\u9032\u884c\uff1a<\/p>\n<ul>\n<li><strong>\u6aa2\u67e5\u6578\u64da\u985e\u578b\uff1a<\/strong>\u9996\u5148\uff0c\u6aa2\u67e5\u4f60\u8981\u5275\u5efaHASH\u7d22\u5f15\u7684\u5217\u7684\u6578\u64da\u985e\u578b\u3002\u78ba\u4fdd\u5b83\u662f <code>NUMBER(*,0)<\/code> \u985e\u578b\u3002<\/li>\n<li><strong>\u4fee\u6539\u6578\u64da\u985e\u578b\uff1a<\/strong>\u5982\u679c\u5217\u7684\u6578\u64da\u985e\u578b\u4e0d\u7b26\u5408\u8981\u6c42\uff0c\u53ef\u4ee5\u8003\u616e\u4fee\u6539\u6578\u64da\u985e\u578b\u3002\u4f8b\u5982\uff1a<\/li>\n<\/ul>\n<pre><code>ALTER TABLE example_table MODIFY (name NUMBER(*,0));\n<\/code><\/pre>\n<li><strong>\u91cd\u65b0\u5275\u5efa\u7d22\u5f15\uff1a<\/strong>\u5728\u4fee\u6539\u6578\u64da\u985e\u578b\u5f8c\uff0c\u91cd\u65b0\u5275\u5efaHASH\u7d22\u5f15\uff1a<\/li>\n<pre><code>CREATE INDEX example_index ON example_table (name) HASH;\n<\/code><\/pre>\n<li><strong>\u6e2c\u8a66\uff1a<\/strong>\u6700\u5f8c\uff0c\u9032\u884c\u6e2c\u8a66\u4ee5\u78ba\u4fdd\u554f\u984c\u5df2\u7d93\u89e3\u6c7a\uff0c\u4e26\u4e14\u7cfb\u7d71\u904b\u884c\u6b63\u5e38\u3002<\/li>\n<\/ul>\n<h2 id=\"%e7%b5%90%e8%ab%96-WMgrLGxvEJ\">\u7d50\u8ad6<\/h2>\n<p>\u5728Oracle\u6578\u64da\u5eab\u4e2d\uff0c<code>ORA-02456<\/code> \u932f\u8aa4\u901a\u5e38\u662f\u7531\u65bcHASH\u7d22\u5f15\u7684\u5217\u6578\u64da\u985e\u578b\u4e0d\u6b63\u78ba\u6240\u5f15\u8d77\u7684\u3002\u901a\u904e\u6aa2\u67e5\u548c\u4fee\u6539\u6578\u64da\u985e\u578b\uff0c\u4e26\u91cd\u65b0\u5275\u5efa\u7d22\u5f15\uff0c\u53ef\u4ee5\u6709\u6548\u5730\u89e3\u6c7a\u9019\u500b\u554f\u984c\u3002\u4fdd\u6301\u6578\u64da\u5eab\u7684\u5065\u5eb7\u904b\u884c\u5c0d\u65bc\u4efb\u4f55\u61c9\u7528\u7a0b\u5e8f\u7684\u6027\u80fd\u81f3\u95dc\u91cd\u8981\uff0c\u56e0\u6b64\u53ca\u6642\u8655\u7406\u9019\u985e\u932f\u8aa4\u662f\u5fc5\u8981\u7684\u3002<\/p>\n<p>\u5982\u9700\u9032\u4e00\u6b65\u4e86\u89e3\u5982\u4f55\u512a\u5316\u60a8\u7684\u6578\u64da\u5eab\u74b0\u5883\uff0c\u60a8\u53ef\u4ee5\u8003\u616e\u4f7f\u7528\u6211\u5011\u7684 <a href=\"https:\/\/server.hk\">\u9999\u6e2fVPS<\/a> \u670d\u52d9\uff0c\u9019\u5c07\u70ba\u60a8\u7684\u61c9\u7528\u7a0b\u5e8f\u63d0\u4f9b\u7a69\u5b9a\u548c\u9ad8\u6548\u7684\u652f\u6301\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u89e3\u6c7aORA-02456\u932f\u8aa4\uff0c\u78ba\u4fddHASH\u5217\u898f\u7bc4\u70baNUMBER(*,0)\u3002\u63d0\u4f9bOracle\u5831\u932f\u6545\u969c\u4fee\u5fa9\u7684\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-83621","post","type-post","status-publish","format-standard","hentry","category-database"],"_links":{"self":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/83621","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=83621"}],"version-history":[{"count":1,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/83621\/revisions"}],"predecessor-version":[{"id":83622,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/83621\/revisions\/83622"}],"wp:attachment":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/media?parent=83621"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/categories?post=83621"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/tags?post=83621"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}