{"id":90964,"date":"2024-10-18T17:11:16","date_gmt":"2024-10-18T09:11:16","guid":{"rendered":"https:\/\/server.hk\/cnblog\/90964\/"},"modified":"2024-10-18T17:11:17","modified_gmt":"2024-10-18T09:11:17","slug":"ora-29255-cursor-contains-both-bind-and-define-arrays-which-is-not-permissible-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\/90964\/","title":{"rendered":"ORA-29255: Cursor contains both bind and define arrays which is not permissible ORACLE\u5831\u932f \u6545\u969c\u4fee\u5fa9 \u9060\u7a0b\u8655\u7406"},"content":{"rendered":"<h1 id=\"ora-29255-cursor-contains-both-bind-and-define-arrays-which-is-not-permissible-LHGqJPoZsP\">ORA-29255: Cursor contains both bind and define arrays which is not permissible<\/h1>\n<p>\u5728\u4f7f\u7528Oracle\u8cc7\u6599\u5eab\u6642\uff0c\u958b\u767c\u8005\u53ef\u80fd\u6703\u9047\u5230\u5404\u7a2e\u932f\u8aa4\u4ee3\u78bc\uff0c\u5176\u4e2d\u4e4b\u4e00\u4fbf\u662fORA-29255\u3002\u9019\u500b\u932f\u8aa4\u901a\u5e38\u51fa\u73fe\u5728\u4f7f\u7528\u6e38\u6a19\u6642\uff0c\u7576\u6e38\u6a19\u540c\u6642\u5305\u542b\u7d81\u5b9a\u6578\u7d44\uff08bind arrays\uff09\u548c\u5b9a\u7fa9\u6578\u7d44\uff08define arrays\uff09\u6642\uff0cOracle\u6703\u5831\u544a\u6b64\u932f\u8aa4\u3002\u672c\u6587\u5c07\u6df1\u5165\u63a2\u8a0eORA-29255\u7684\u539f\u56e0\u3001\u5f71\u97ff\u4ee5\u53ca\u5982\u4f55\u9032\u884c\u6545\u969c\u4fee\u5fa9\u3002<\/p>\n<h2 id=\"ora-29255%e7%9a%84%e5%8e%9f%e5%9b%a0-LHGqJPoZsP\">ORA-29255\u7684\u539f\u56e0<\/h2>\n<p>ORA-29255\u932f\u8aa4\u7684\u4e3b\u8981\u539f\u56e0\u662f\u6e38\u6a19\u7684\u4f7f\u7528\u4e0d\u7576\u3002\u5728Oracle\u4e2d\uff0c\u6e38\u6a19\u662f\u4e00\u7a2e\u7528\u65bc\u5b58\u53d6\u67e5\u8a62\u7d50\u679c\u7684\u6578\u64da\u7d50\u69cb\u3002\u7576\u958b\u767c\u8005\u5728\u540c\u4e00\u6e38\u6a19\u4e2d\u540c\u6642\u4f7f\u7528\u7d81\u5b9a\u8b8a\u91cf\u548c\u5b9a\u7fa9\u8b8a\u91cf\u6642\uff0cOracle\u6703\u7121\u6cd5\u6b63\u78ba\u8655\u7406\u9019\u4e9b\u6578\u64da\uff0c\u5f9e\u800c\u5f15\u767c\u932f\u8aa4\u3002<\/p>\n<p>\u5177\u9ad4\u4f86\u8aaa\uff0c\u7d81\u5b9a\u6578\u7d44\u662f\u7528\u65bc\u5c07\u6578\u64da\u50b3\u905e\u5230SQL\u8a9e\u53e5\u4e2d\u7684\u8b8a\u91cf\uff0c\u800c\u5b9a\u7fa9\u6578\u7d44\u5247\u662f\u7528\u65bc\u63a5\u6536\u67e5\u8a62\u7d50\u679c\u7684\u8b8a\u91cf\u3002\u7576\u9019\u5169\u8005\u6df7\u5408\u4f7f\u7528\u6642\uff0cOracle\u7121\u6cd5\u78ba\u5b9a\u5982\u4f55\u8655\u7406\u9019\u4e9b\u6578\u64da\uff0c\u5c0e\u81f4\u932f\u8aa4\u7684\u767c\u751f\u3002<\/p>\n<h2 id=\"%e5%a6%82%e4%bd%95%e4%bf%ae%e5%be%a9ora-29255%e9%8c%af%e8%aa%a4-LHGqJPoZsP\">\u5982\u4f55\u4fee\u5fa9ORA-29255\u932f\u8aa4<\/h2>\n<p>\u4fee\u5fa9ORA-29255\u932f\u8aa4\u7684\u7b2c\u4e00\u6b65\u662f\u6aa2\u67e5\u6e38\u6a19\u7684\u5b9a\u7fa9\u3002\u4ee5\u4e0b\u662f\u4e00\u4e9b\u5e38\u898b\u7684\u89e3\u6c7a\u65b9\u6848\uff1a<\/p>\n<ul>\n<li><strong>\u5206\u958b\u4f7f\u7528\u7d81\u5b9a\u548c\u5b9a\u7fa9\u6578\u7d44\uff1a<\/strong>\u78ba\u4fdd\u5728\u6e38\u6a19\u4e2d\u53ea\u4f7f\u7528\u4e00\u7a2e\u6578\u7d44\u3002\u5982\u679c\u9700\u8981\u4f7f\u7528\u7d81\u5b9a\u8b8a\u91cf\uff0c\u5247\u4e0d\u61c9\u540c\u6642\u4f7f\u7528\u5b9a\u7fa9\u8b8a\u91cf\uff0c\u53cd\u4e4b\u4ea6\u7136\u3002<\/li>\n<li><strong>\u6aa2\u67e5SQL\u8a9e\u53e5\uff1a<\/strong>\u78ba\u4fddSQL\u8a9e\u53e5\u7684\u8a9e\u6cd5\u6b63\u78ba\uff0c\u4e26\u4e14\u4e0d\u6703\u5c0e\u81f4\u6578\u64da\u985e\u578b\u4e0d\u5339\u914d\u7684\u554f\u984c\u3002<\/li>\n<li><strong>\u4f7f\u7528PL\/SQL\u584a\uff1a<\/strong>\u5728PL\/SQL\u584a\u4e2d\u5b9a\u7fa9\u6e38\u6a19\u6642\uff0c\u78ba\u4fdd\u4f7f\u7528\u6b63\u78ba\u7684\u8a9e\u6cd5\u4f86\u907f\u514d\u6df7\u6dc6\u3002<\/li>\n<\/ul>\n<h3 id=\"%e7%a4%ba%e4%be%8b%e4%bb%a3%e7%a2%bc-LHGqJPoZsP\">\u793a\u4f8b\u4ee3\u78bc<\/h3>\n<p>\u4ee5\u4e0b\u662f\u4e00\u500b\u7c21\u55ae\u7684\u793a\u4f8b\uff0c\u5c55\u793a\u4e86\u5982\u4f55\u6b63\u78ba\u4f7f\u7528\u6e38\u6a19\uff1a<\/p>\n<pre><code>\nDECLARE\n    TYPE emp_rec IS RECORD (\n        emp_id NUMBER,\n        emp_name VARCHAR2(100)\n    );\n    TYPE emp_tab IS TABLE OF emp_rec;\n    \n    emp_data emp_tab;\n    CURSOR emp_cursor IS\n        SELECT employee_id, employee_name FROM employees;\nBEGIN\n    OPEN emp_cursor;\n    LOOP\n        FETCH emp_cursor BULK COLLECT INTO emp_data LIMIT 100;\n        EXIT WHEN emp_cursor%NOTFOUND;\n        \n        -- \u8655\u7406\u6578\u64da\n        FOR i IN 1..emp_data.COUNT LOOP\n            DBMS_OUTPUT.PUT_LINE('ID: ' || emp_data(i).emp_id || ', Name: ' || emp_data(i).emp_name);\n        END LOOP;\n    END LOOP;\n    CLOSE emp_cursor;\nEND;\n<\/code><\/pre>\n<h2 id=\"%e7%b8%bd%e7%b5%90-LHGqJPoZsP\">\u7e3d\u7d50<\/h2>\n<p>ORA-29255\u932f\u8aa4\u901a\u5e38\u662f\u7531\u65bc\u6e38\u6a19\u4e2d\u540c\u6642\u4f7f\u7528\u7d81\u5b9a\u6578\u7d44\u548c\u5b9a\u7fa9\u6578\u7d44\u6240\u5f15\u8d77\u7684\u3002\u901a\u904e\u4ed4\u7d30\u6aa2\u67e5\u6e38\u6a19\u7684\u5b9a\u7fa9\u548cSQL\u8a9e\u53e5\uff0c\u958b\u767c\u8005\u53ef\u4ee5\u6709\u6548\u5730\u4fee\u5fa9\u6b64\u932f\u8aa4\u3002\u4e86\u89e3\u5982\u4f55\u6b63\u78ba\u4f7f\u7528\u6e38\u6a19\u4e0d\u50c5\u80fd\u63d0\u9ad8\u4ee3\u78bc\u7684\u7a69\u5b9a\u6027\uff0c\u9084\u80fd\u589e\u5f37\u6574\u9ad4\u7684\u6578\u64da\u8655\u7406\u6548\u7387\u3002<\/p>\n<p>\u5982\u679c\u60a8\u5728\u5c0b\u627e\u9ad8\u6548\u7684\u89e3\u6c7a\u65b9\u6848\u4f86\u652f\u6301\u60a8\u7684\u6578\u64da\u5eab\u9700\u6c42\uff0c\u8003\u616e\u4f7f\u7528\u6211\u5011\u7684<a href=\"https:\/\/server.hk\">\u9999\u6e2fVPS<\/a>\u670d\u52d9\uff0c\u63d0\u4f9b\u7a69\u5b9a\u7684\u6027\u80fd\u548c\u9748\u6d3b\u7684\u914d\u7f6e\u9078\u9805\uff0c\u52a9\u60a8\u8f15\u9b06\u7ba1\u7406\u6578\u64da\u5eab\u74b0\u5883\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Learn how to troubleshoot ORA-29255: Cursor contains both bind and define arrays in Oracle. Get remote support for effective resolution.<\/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-90964","post","type-post","status-publish","format-standard","hentry","category-database"],"_links":{"self":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/90964","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=90964"}],"version-history":[{"count":1,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/90964\/revisions"}],"predecessor-version":[{"id":90965,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/90964\/revisions\/90965"}],"wp:attachment":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/media?parent=90964"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/categories?post=90964"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/tags?post=90964"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}