{"id":91618,"date":"2024-10-18T22:43:17","date_gmt":"2024-10-18T14:43:17","guid":{"rendered":"https:\/\/server.hk\/cnblog\/91618\/"},"modified":"2024-10-18T22:43:17","modified_gmt":"2024-10-18T14:43:17","slug":"ora-31182-%e6%8c%87%e5%ae%9a%e7%9a%84-pl-sql-dom-%e8%99%95%e7%90%86%e5%8f%a5%e6%9f%84%e9%81%8e%e5%a4%9a-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","status":"publish","type":"post","link":"https:\/\/server.hk\/cnblog\/91618\/","title":{"rendered":"ORA-31182: \u6307\u5b9a\u7684 PL\/SQL DOM \u8655\u7406\u53e5\u67c4\u904e\u591a ORACLE \u5831\u932f \u6545\u969c\u4fee\u5fa9 \u9060\u7a0b\u8655\u7406"},"content":{"rendered":"<h1 id=\"ora-31182-%e6%8c%87%e5%ae%9a%e7%9a%84-pl-sql-dom-%e8%99%95%e7%90%86%e5%8f%a5%e6%9f%84%e9%81%8e%e5%a4%9a-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-SyQoTeGNxo\">ORA-31182: \u6307\u5b9a\u7684 PL\/SQL DOM \u8655\u7406\u53e5\u67c4\u904e\u591a 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-31182<\/code>\u3002\u9019\u500b\u932f\u8aa4\u901a\u5e38\u8868\u793a\u300c\u6307\u5b9a\u7684 PL\/SQL DOM \u8655\u7406\u53e5\u67c4\u904e\u591a\u300d\uff0c\u9019\u610f\u5473\u8457\u5728 PL\/SQL \u57f7\u884c\u904e\u7a0b\u4e2d\uff0c\u8d85\u51fa\u4e86 Oracle \u6578\u64da\u5eab\u6240\u80fd\u8655\u7406\u7684 DOM\uff08\u6587\u6a94\u5c0d\u8c61\u6a21\u578b\uff09\u53e5\u67c4\u7684\u6578\u91cf\u9650\u5236\u3002<\/p>\n<h2 id=\"%e9%8c%af%e8%aa%a4%e5%8e%9f%e5%9b%a0-SyQoTeGNxo\">\u932f\u8aa4\u539f\u56e0<\/h2>\n<p>\u7576\u4f60\u5728 Oracle \u6578\u64da\u5eab\u4e2d\u57f7\u884c PL\/SQL \u7a0b\u5e8f\u6642\uff0c\u53ef\u80fd\u6703\u5275\u5efa\u591a\u500b DOM \u8655\u7406\u53e5\u67c4\u3002\u9019\u4e9b\u53e5\u67c4\u7528\u65bc\u8655\u7406 XML \u6587\u6a94\u6216\u5176\u4ed6\u7d50\u69cb\u5316\u6578\u64da\u3002\u5982\u679c\u540c\u6642\u5b58\u5728\u7684\u53e5\u67c4\u6578\u91cf\u8d85\u904e\u4e86 Oracle \u7684\u9650\u5236\uff0c\u5c31\u6703\u5c0e\u81f4 <code>ORA-31182<\/code> \u932f\u8aa4\u7684\u767c\u751f\u3002<\/p>\n<p>\u5177\u9ad4\u4f86\u8aaa\uff0c\u9019\u500b\u932f\u8aa4\u53ef\u80fd\u7531\u4ee5\u4e0b\u5e7e\u500b\u539f\u56e0\u5f15\u8d77\uff1a<\/p>\n<ul>\n<li>\u904e\u591a\u7684 XML \u6587\u6a94\u88ab\u540c\u6642\u52a0\u8f09\u6216\u8655\u7406\u3002<\/li>\n<li>\u672a\u6b63\u78ba\u91cb\u653e\u5df2\u7d93\u4f7f\u7528\u904e\u7684 DOM \u8655\u7406\u53e5\u67c4\u3002<\/li>\n<li>\u5728 PL\/SQL \u7a0b\u5e8f\u4e2d\u5b58\u5728\u908f\u8f2f\u932f\u8aa4\uff0c\u5c0e\u81f4\u7121\u9650\u5faa\u74b0\u5275\u5efa\u53e5\u67c4\u3002<\/li>\n<\/ul>\n<h2 id=\"%e6%95%85%e9%9a%9c%e4%bf%ae%e5%be%a9%e6%ad%a5%e9%a9%9f-SyQoTeGNxo\">\u6545\u969c\u4fee\u5fa9\u6b65\u9a5f<\/h2>\n<p>\u8981\u4fee\u5fa9 <code>ORA-31182<\/code> \u932f\u8aa4\uff0c\u53ef\u4ee5\u6309\u7167\u4ee5\u4e0b\u6b65\u9a5f\u9032\u884c\uff1a<\/p>\n<h3 id=\"1-%e6%aa%a2%e6%9f%a5%e7%95%b6%e5%89%8d%e7%9a%84-dom-%e8%99%95%e7%90%86%e5%8f%a5%e6%9f%84%e4%bd%bf%e7%94%a8%e6%83%85%e6%b3%81-SyQoTeGNxo\">1. \u6aa2\u67e5\u7576\u524d\u7684 DOM \u8655\u7406\u53e5\u67c4\u4f7f\u7528\u60c5\u6cc1<\/h3>\n<p>\u9996\u5148\uff0c\u4f7f\u7528\u4ee5\u4e0b SQL \u67e5\u8a62\u4f86\u6aa2\u67e5\u7576\u524d\u7684 DOM \u8655\u7406\u53e5\u67c4\u4f7f\u7528\u60c5\u6cc1\uff1a<\/p>\n<pre><code>SELECT COUNT(*) FROM user_xmltype;<\/code><\/pre>\n<h3 id=\"2-%e9%87%8b%e6%94%be%e4%b8%8d%e5%86%8d%e4%bd%bf%e7%94%a8%e7%9a%84%e5%8f%a5%e6%9f%84-SyQoTeGNxo\">2. \u91cb\u653e\u4e0d\u518d\u4f7f\u7528\u7684\u53e5\u67c4<\/h3>\n<p>\u78ba\u4fdd\u5728 PL\/SQL \u7a0b\u5e8f\u4e2d\uff0c\u5c0d\u65bc\u4e0d\u518d\u9700\u8981\u7684 DOM \u8655\u7406\u53e5\u67c4\uff0c\u61c9\u53ca\u6642\u91cb\u653e\u3002\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u4ee3\u78bc\u91cb\u653e\u53e5\u67c4\uff1a<\/p>\n<pre><code>XMLTYPE.delete();<\/code><\/pre>\n<h3 id=\"3-%e5%84%aa%e5%8c%96-pl-sql-%e7%a8%8b%e5%ba%8f%e9%82%8f%e8%bc%af-SyQoTeGNxo\">3. \u512a\u5316 PL\/SQL \u7a0b\u5e8f\u908f\u8f2f<\/h3>\n<p>\u6aa2\u67e5 PL\/SQL \u7a0b\u5e8f\u7684\u908f\u8f2f\uff0c\u78ba\u4fdd\u4e0d\u6703\u56e0\u70ba\u908f\u8f2f\u932f\u8aa4\u800c\u5c0e\u81f4\u7121\u9650\u5275\u5efa\u53e5\u67c4\u3002\u53ef\u4ee5\u901a\u904e\u6dfb\u52a0\u9069\u7576\u7684\u689d\u4ef6\u5224\u65b7\u4f86\u907f\u514d\u9019\u7a2e\u60c5\u6cc1\u3002<\/p>\n<h3 id=\"4-%e5%a2%9e%e5%8a%a0%e5%8f%a5%e6%9f%84%e9%99%90%e5%88%b6-SyQoTeGNxo\">4. \u589e\u52a0\u53e5\u67c4\u9650\u5236<\/h3>\n<p>\u5982\u679c\u78ba\u5be6\u9700\u8981\u8655\u7406\u5927\u91cf\u7684 XML \u6587\u6a94\uff0c\u53ef\u4ee5\u8003\u616e\u589e\u52a0 Oracle \u6578\u64da\u5eab\u7684\u53e5\u67c4\u9650\u5236\u3002\u9019\u53ef\u4ee5\u901a\u904e\u4fee\u6539\u521d\u59cb\u5316\u53c3\u6578\u4f86\u5be6\u73fe\uff0c\u4f46\u9700\u8981\u8b39\u614e\u64cd\u4f5c\uff0c\u4e26\u5728\u9032\u884c\u66f4\u6539\u4e4b\u524d\u9032\u884c\u5145\u5206\u7684\u6e2c\u8a66\u3002<\/p>\n<h2 id=\"%e9%81%a0%e7%a8%8b%e8%99%95%e7%90%86%e7%9a%84%e8%80%83%e9%87%8f-SyQoTeGNxo\">\u9060\u7a0b\u8655\u7406\u7684\u8003\u91cf<\/h2>\n<p>\u5728\u67d0\u4e9b\u60c5\u6cc1\u4e0b\uff0c\u53ef\u80fd\u9700\u8981\u9060\u7a0b\u8655\u7406 Oracle \u6578\u64da\u5eab\u4e2d\u7684 PL\/SQL \u7a0b\u5e8f\u3002\u9019\u6642\uff0c\u78ba\u4fdd\u9060\u7a0b\u9023\u63a5\u7684\u7a69\u5b9a\u6027\u548c\u5b89\u5168\u6027\u662f\u81f3\u95dc\u91cd\u8981\u7684\u3002\u4f7f\u7528\u9069\u7576\u7684\u5de5\u5177\u548c\u6280\u8853\u4f86\u76e3\u63a7\u548c\u7ba1\u7406\u9060\u7a0b\u9023\u63a5\uff0c\u53ef\u4ee5\u6709\u6548\u6e1b\u5c11\u51fa\u73fe <code>ORA-31182<\/code> \u932f\u8aa4\u7684\u6a5f\u6703\u3002<\/p>\n<h2 id=\"%e7%b8%bd%e7%b5%90-SyQoTeGNxo\">\u7e3d\u7d50<\/h2>\n<p>\u5728 Oracle \u6578\u64da\u5eab\u4e2d\u9047\u5230 <code>ORA-31182<\/code> \u932f\u8aa4\u6642\uff0c\u9996\u5148\u8981\u6aa2\u67e5 DOM \u8655\u7406\u53e5\u67c4\u7684\u4f7f\u7528\u60c5\u6cc1\uff0c\u4e26\u78ba\u4fdd\u53ca\u6642\u91cb\u653e\u4e0d\u518d\u4f7f\u7528\u7684\u53e5\u67c4\u3002\u901a\u904e\u512a\u5316 PL\/SQL \u7a0b\u5e8f\u908f\u8f2f\u548c\u5fc5\u8981\u6642\u589e\u52a0\u53e5\u67c4\u9650\u5236\uff0c\u53ef\u4ee5\u6709\u6548\u89e3\u6c7a\u6b64\u554f\u984c\u3002\u6b64\u5916\uff0c\u5c0d\u65bc\u9700\u8981\u9060\u7a0b\u8655\u7406\u7684\u60c5\u6cc1\uff0c\u4fdd\u6301\u9023\u63a5\u7684\u7a69\u5b9a\u6027\u548c\u5b89\u5168\u6027\u4e5f\u975e\u5e38\u91cd\u8981\u3002<\/p>\n<p>\u5982\u9700\u9032\u4e00\u6b65\u4e86\u89e3\u5982\u4f55\u5728\u9999\u6e2f\u63d0\u4f9b\u9ad8\u6548\u7684 <a href=\"https:\/\/server.hk\">VPS<\/a> \u89e3\u6c7a\u65b9\u6848\uff0c\u8acb\u8a2a\u554f\u6211\u5011\u7684\u7db2\u7ad9\u4ee5\u7372\u53d6\u66f4\u591a\u4fe1\u606f\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u89e3\u6c7a ORA-31182 \u932f\u8aa4\uff0c\u8655\u7406\u904e\u591a\u7684 PL\/SQL DOM \u8655\u7406\u53e5\u67c4\uff0c\u63d0\u4f9b\u6545\u969c\u4fee\u5fa9\u548c\u9060\u7a0b\u8655\u7406\u65b9\u6848\uff0c\u63d0\u5347\u7cfb\u7d71\u7a69\u5b9a\u6027\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-91618","post","type-post","status-publish","format-standard","hentry","category-database"],"_links":{"self":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/91618","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=91618"}],"version-history":[{"count":1,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/91618\/revisions"}],"predecessor-version":[{"id":91619,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/91618\/revisions\/91619"}],"wp:attachment":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/media?parent=91618"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/categories?post=91618"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/tags?post=91618"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}