{"id":87996,"date":"2024-10-18T05:43:15","date_gmt":"2024-10-17T21:43:15","guid":{"rendered":"https:\/\/server.hk\/cnblog\/87996\/"},"modified":"2024-10-18T05:43:16","modified_gmt":"2024-10-17T21:43:16","slug":"ora-22923-%e5%9c%a8%e6%b5%81%e5%bc%8f-lob-%e5%af%ab%e5%85%a5%e4%b8%ad%e6%8c%87%e5%ae%9a%e7%9a%84%e6%95%b8%e6%93%9a%e9%87%8f%e7%82%ba-0-oracle-%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\/87996\/","title":{"rendered":"ORA-22923: \u5728\u6d41\u5f0f LOB \u5beb\u5165\u4e2d\u6307\u5b9a\u7684\u6578\u64da\u91cf\u70ba 0 ORACLE \u5831\u932f \u6545\u969c\u4fee\u5fa9 \u9060\u7a0b\u8655\u7406"},"content":{"rendered":"<h1 id=\"ora-22923-%e5%9c%a8%e6%b5%81%e5%bc%8f-lob-%e5%af%ab%e5%85%a5%e4%b8%ad%e6%8c%87%e5%ae%9a%e7%9a%84%e6%95%b8%e6%93%9a%e9%87%8f%e7%82%ba-0-oracle-%e5%a0%b1%e9%8c%af-%e6%95%85%e9%9a%9c%e4%bf%ae%e5%be%a9-CHbYAkEqzl\">ORA-22923: \u5728\u6d41\u5f0f LOB \u5beb\u5165\u4e2d\u6307\u5b9a\u7684\u6578\u64da\u91cf\u70ba 0 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\uff0c\u5176\u4e2d\u4e4b\u4e00\u4fbf\u662f <code>ORA-22923<\/code>\u3002\u9019\u500b\u932f\u8aa4\u901a\u5e38\u51fa\u73fe\u5728\u6d41\u5f0f LOB\uff08Large Object\uff09\u5beb\u5165\u64cd\u4f5c\u4e2d\uff0c\u8868\u793a\u5728\u5beb\u5165\u904e\u7a0b\u4e2d\u6307\u5b9a\u7684\u6578\u64da\u91cf\u70ba 0\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=\"%e4%bb%80%e9%ba%bc%e6%98%af-lob%ef%bc%9f-CHbYAkEqzl\">\u4ec0\u9ebc\u662f LOB\uff1f<\/h2>\n<p>LOB\uff08Large Object\uff09\u662f\u4e00\u7a2e\u7528\u65bc\u5b58\u5132\u5927\u91cf\u6578\u64da\u7684\u6578\u64da\u985e\u578b\uff0c\u901a\u5e38\u7528\u65bc\u5b58\u5132\u5716\u7247\u3001\u97f3\u983b\u3001\u8996\u983b\u6216\u5176\u4ed6\u5927\u578b\u6587\u672c\u6578\u64da\u3002\u5728 Oracle \u6578\u64da\u5eab\u4e2d\uff0cLOB \u5206\u70ba\u4e09\u7a2e\u985e\u578b\uff1aBLOB\uff08Binary Large Object\uff09\u3001CLOB\uff08Character Large Object\uff09\u548c NCLOB\uff08National Character Large Object\uff09\u3002\u9019\u4e9b\u6578\u64da\u985e\u578b\u5141\u8a31\u7528\u6236\u5b58\u5132\u548c\u64cd\u4f5c\u5927\u91cf\u7684\u6578\u64da\u3002<\/p>\n<h2 id=\"ora-22923-%e9%8c%af%e8%aa%a4%e7%9a%84%e5%8e%9f%e5%9b%a0-CHbYAkEqzl\">ORA-22923 \u932f\u8aa4\u7684\u539f\u56e0<\/h2>\n<p>\u7576\u4f60\u5728 Oracle \u6578\u64da\u5eab\u4e2d\u57f7\u884c\u6d41\u5f0f LOB \u5beb\u5165\u64cd\u4f5c\u6642\uff0c\u53ef\u80fd\u6703\u9047\u5230 <code>ORA-22923<\/code> \u932f\u8aa4\u3002\u9019\u500b\u932f\u8aa4\u7684\u4e3b\u8981\u539f\u56e0\u5305\u62ec\uff1a<\/p>\n<ul>\n<li><strong>\u6578\u64da\u91cf\u70ba 0\uff1a<\/strong>\u7576\u4f60\u5617\u8a66\u5beb\u5165\u7684\u6578\u64da\u91cf\u70ba 0 \u6642\uff0cOracle \u5c07\u7121\u6cd5\u57f7\u884c\u8a72\u64cd\u4f5c\uff0c\u5f9e\u800c\u5f15\u767c\u6b64\u932f\u8aa4\u3002<\/li>\n<li><strong>\u6d41\u5f0f LOB \u7684\u72c0\u614b\u4e0d\u6b63\u78ba\uff1a<\/strong>\u5982\u679c LOB \u7684\u72c0\u614b\u4e0d\u6b63\u78ba\uff0c\u4f8b\u5982\u672a\u6b63\u78ba\u521d\u59cb\u5316\u6216\u5df2\u7d93\u95dc\u9589\uff0c\u4e5f\u53ef\u80fd\u5c0e\u81f4\u6b64\u932f\u8aa4\u3002<\/li>\n<li><strong>\u6578\u64da\u5eab\u9023\u63a5\u554f\u984c\uff1a<\/strong>\u5728\u67d0\u4e9b\u60c5\u6cc1\u4e0b\uff0c\u6578\u64da\u5eab\u9023\u63a5\u4e0d\u7a69\u5b9a\u6216\u4e2d\u65b7\u4e5f\u53ef\u80fd\u5c0e\u81f4\u5beb\u5165\u64cd\u4f5c\u5931\u6557\u3002<\/li>\n<\/ul>\n<h2 id=\"%e5%a6%82%e4%bd%95%e4%bf%ae%e5%be%a9-ora-22923-%e9%8c%af%e8%aa%a4-CHbYAkEqzl\">\u5982\u4f55\u4fee\u5fa9 ORA-22923 \u932f\u8aa4<\/h2>\n<p>\u4fee\u5fa9 <code>ORA-22923<\/code> \u932f\u8aa4\u7684\u904e\u7a0b\u901a\u5e38\u6d89\u53ca\u4ee5\u4e0b\u5e7e\u500b\u6b65\u9a5f\uff1a<\/p>\n<h3 id=\"1-%e6%aa%a2%e6%9f%a5%e6%95%b8%e6%93%9a%e9%87%8f-CHbYAkEqzl\">1. \u6aa2\u67e5\u6578\u64da\u91cf<\/h3>\n<p>\u9996\u5148\uff0c\u78ba\u4fdd\u4f60\u5617\u8a66\u5beb\u5165\u7684\u6578\u64da\u91cf\u4e0d\u70ba 0\u3002\u53ef\u4ee5\u901a\u904e\u4ee5\u4e0b SQL \u67e5\u8a62\u4f86\u6aa2\u67e5\uff1a<\/p>\n<pre><code>SELECT LENGTH(your_lob_column) FROM your_table WHERE your_condition;<\/code><\/pre>\n<p>\u5982\u679c\u8fd4\u56de\u7684\u9577\u5ea6\u70ba 0\uff0c\u5247\u9700\u8981\u6aa2\u67e5\u6578\u64da\u4f86\u6e90\uff0c\u78ba\u4fdd\u6709\u6709\u6548\u7684\u6578\u64da\u53ef\u4f9b\u5beb\u5165\u3002<\/p>\n<h3 id=\"2-%e7%a2%ba%e4%bf%9d-lob-%e7%8b%80%e6%85%8b%e6%ad%a3%e7%a2%ba-CHbYAkEqzl\">2. \u78ba\u4fdd LOB \u72c0\u614b\u6b63\u78ba<\/h3>\n<p>\u5728\u9032\u884c\u5beb\u5165\u64cd\u4f5c\u4e4b\u524d\uff0c\u78ba\u4fdd LOB \u5c0d\u8c61\u5df2\u6b63\u78ba\u521d\u59cb\u5316\u4e26\u8655\u65bc\u53ef\u5beb\u72c0\u614b\u3002\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u4ee3\u78bc\u4f86\u6aa2\u67e5 LOB \u7684\u72c0\u614b\uff1a<\/p>\n<pre><code>DBMS_LOB.OPEN(your_lob_column, DBMS_LOB.LOB_READWRITE);<\/code><\/pre>\n<p>\u5982\u679c LOB \u5df2\u7d93\u95dc\u9589\uff0c\u5247\u9700\u8981\u91cd\u65b0\u6253\u958b\u5b83\u3002<\/p>\n<h3 id=\"3-%e6%aa%a2%e6%9f%a5%e6%95%b8%e6%93%9a%e5%ba%ab%e9%80%a3%e6%8e%a5-CHbYAkEqzl\">3. \u6aa2\u67e5\u6578\u64da\u5eab\u9023\u63a5<\/h3>\n<p>\u5982\u679c\u4ee5\u4e0a\u6b65\u9a5f\u90fd\u7121\u6cd5\u89e3\u6c7a\u554f\u984c\uff0c\u5247\u9700\u8981\u6aa2\u67e5\u6578\u64da\u5eab\u7684\u9023\u63a5\u72c0\u614b\u3002\u78ba\u4fdd\u9023\u63a5\u7a69\u5b9a\uff0c\u4e26\u4e14\u6c92\u6709\u4efb\u4f55\u7db2\u7d61\u554f\u984c\u5f71\u97ff\u5230\u6578\u64da\u5eab\u7684\u64cd\u4f5c\u3002<\/p>\n<h2 id=\"%e7%b5%90%e8%ab%96-CHbYAkEqzl\">\u7d50\u8ad6<\/h2>\n<p>\u5728\u4f7f\u7528 Oracle \u6578\u64da\u5eab\u6642\uff0c<code>ORA-22923<\/code> \u932f\u8aa4\u53ef\u80fd\u6703\u5f71\u97ff\u5230\u6d41\u5f0f LOB \u7684\u5beb\u5165\u64cd\u4f5c\u3002\u901a\u904e\u6aa2\u67e5\u6578\u64da\u91cf\u3001\u78ba\u4fdd LOB \u72c0\u614b\u6b63\u78ba\u4ee5\u53ca\u6aa2\u67e5\u6578\u64da\u5eab\u9023\u63a5\uff0c\u53ef\u4ee5\u6709\u6548\u5730\u89e3\u6c7a\u6b64\u554f\u984c\u3002\u5c0d\u65bc\u9700\u8981\u9ad8\u6548\u6578\u64da\u8655\u7406\u7684\u61c9\u7528\uff0c\u9078\u64c7\u5408\u9069\u7684 <a href=\"https:\/\/server.hk\">VPS<\/a> \u6216 <a href=\"https:\/\/server.hk\">\u9999\u6e2f\u4f3a\u670d\u5668<\/a> \u4f86\u904b\u884c Oracle \u6578\u64da\u5eab\u5c07\u662f\u660e\u667a\u7684\u9078\u64c7\uff0c\u9019\u6a23\u53ef\u4ee5\u78ba\u4fdd\u7cfb\u7d71\u7684\u7a69\u5b9a\u6027\u548c\u6027\u80fd\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u89e3\u6c7a ORA-22923 \u932f\u8aa4\uff1a\u6d41\u5f0f LOB \u5beb\u5165\u4e2d\u6578\u64da\u91cf\u70ba 0 \u7684\u554f\u984c\uff0c\u63d0\u4f9b\u6545\u969c\u4fee\u5fa9\u548c\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-87996","post","type-post","status-publish","format-standard","hentry","category-database"],"_links":{"self":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/87996","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=87996"}],"version-history":[{"count":1,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/87996\/revisions"}],"predecessor-version":[{"id":87997,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/87996\/revisions\/87997"}],"wp:attachment":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/media?parent=87996"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/categories?post=87996"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/tags?post=87996"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}