{"id":91632,"date":"2024-10-18T22:50:25","date_gmt":"2024-10-18T14:50:25","guid":{"rendered":"https:\/\/server.hk\/cnblog\/91632\/"},"modified":"2024-10-18T22:50:26","modified_gmt":"2024-10-18T14:50:26","slug":"ora-31203-dbms_ldap-pl-sql-%e5%88%9d%e5%a7%8b%e5%8c%96%e5%a4%b1%e6%95%97%e3%80%82-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\/91632\/","title":{"rendered":"ORA-31203: DBMS_LDAP: PL\/SQL \u2013 \u521d\u59cb\u5316\u5931\u6557\u3002 ORACLE \u5831\u932f \u6545\u969c\u4fee\u5fa9 \u9060\u7a0b\u8655\u7406"},"content":{"rendered":"<h1 id=\"ora-31203-dbms_ldap-pl-sql-%e5%88%9d%e5%a7%8b%e5%8c%96%e5%a4%b1%e6%95%97-LCBRZgXyiG\">ORA-31203: DBMS_LDAP: PL\/SQL \u2013 \u521d\u59cb\u5316\u5931\u6557<\/h1>\n<p>\u5728\u4f7f\u7528Oracle\u6578\u64da\u5eab\u6642\uff0c\u958b\u767c\u8005\u548c\u7cfb\u7d71\u7ba1\u7406\u54e1\u53ef\u80fd\u6703\u9047\u5230\u5404\u7a2e\u932f\u8aa4\u4ee3\u78bc\uff0c\u5176\u4e2d\u4e4b\u4e00\u4fbf\u662fORA-31203\u3002\u9019\u500b\u932f\u8aa4\u901a\u5e38\u8207DBMS_LDAP\u5305\u7684\u521d\u59cb\u5316\u5931\u6557\u6709\u95dc\uff0c\u9019\u53ef\u80fd\u6703\u5f71\u97ff\u5230\u8207LDAP\uff08\u8f15\u91cf\u7d1a\u76ee\u9304\u8a2a\u554f\u5354\u8b70\uff09\u670d\u52d9\u7684\u4ea4\u4e92\u3002\u672c\u6587\u5c07\u6df1\u5165\u63a2\u8a0eORA-31203\u932f\u8aa4\u7684\u539f\u56e0\u3001\u89e3\u6c7a\u65b9\u6848\u4ee5\u53ca\u5982\u4f55\u9032\u884c\u9060\u7a0b\u8655\u7406\u3002<\/p>\n<h2 id=\"ora-31203%e9%8c%af%e8%aa%a4%e7%9a%84%e5%8e%9f%e5%9b%a0-LCBRZgXyiG\">ORA-31203\u932f\u8aa4\u7684\u539f\u56e0<\/h2>\n<p>ORA-31203\u932f\u8aa4\u901a\u5e38\u51fa\u73fe\u5728\u4ee5\u4e0b\u5e7e\u7a2e\u60c5\u6cc1\u4e0b\uff1a<\/p>\n<ul>\n<li><strong>LDAP\u670d\u52d9\u5668\u4e0d\u53ef\u7528\uff1a<\/strong>\u5982\u679cLDAP\u670d\u52d9\u5668\u7121\u6cd5\u8a2a\u554f\uff0c\u5247DBMS_LDAP\u7121\u6cd5\u521d\u59cb\u5316\uff0c\u5f9e\u800c\u5c0e\u81f4\u932f\u8aa4\u3002<\/li>\n<li><strong>\u7db2\u7d61\u554f\u984c\uff1a<\/strong>\u7db2\u7d61\u9023\u63a5\u4e0d\u7a69\u5b9a\u6216\u914d\u7f6e\u932f\u8aa4\u53ef\u80fd\u6703\u5c0e\u81f4\u7121\u6cd5\u9023\u63a5\u5230LDAP\u670d\u52d9\u5668\u3002<\/li>\n<li><strong>\u914d\u7f6e\u932f\u8aa4\uff1a<\/strong>DBMS_LDAP\u7684\u914d\u7f6e\u53c3\u6578\u4e0d\u6b63\u78ba\uff0c\u4f8b\u5982\u4e3b\u6a5f\u540d\u3001\u7aef\u53e3\u865f\u6216\u7528\u6236\u6191\u8b49\u7b49\u3002<\/li>\n<li><strong>Oracle\u7248\u672c\u554f\u984c\uff1a<\/strong>\u67d0\u4e9bOracle\u7248\u672c\u53ef\u80fd\u5b58\u5728\u8207DBMS_LDAP\u76f8\u95dc\u7684\u5df2\u77e5\u554f\u984c\uff0c\u9019\u53ef\u80fd\u9700\u8981\u66f4\u65b0\u6216\u6253\u88dc\u4e01\u3002<\/li>\n<\/ul>\n<h2 id=\"%e8%a7%a3%e6%b1%baora-31203%e9%8c%af%e8%aa%a4%e7%9a%84%e6%96%b9%e6%b3%95-LCBRZgXyiG\">\u89e3\u6c7aORA-31203\u932f\u8aa4\u7684\u65b9\u6cd5<\/h2>\n<p>\u70ba\u4e86\u89e3\u6c7aORA-31203\u932f\u8aa4\uff0c\u53ef\u4ee5\u63a1\u53d6\u4ee5\u4e0b\u6b65\u9a5f\uff1a<\/p>\n<h3 id=\"1-%e6%aa%a2%e6%9f%a5ldap%e6%9c%8d%e5%8b%99%e5%99%a8%e7%8b%80%e6%85%8b-LCBRZgXyiG\">1. \u6aa2\u67e5LDAP\u670d\u52d9\u5668\u72c0\u614b<\/h3>\n<p>\u9996\u5148\uff0c\u78ba\u4fddLDAP\u670d\u52d9\u5668\u6b63\u5728\u904b\u884c\u4e26\u4e14\u53ef\u4ee5\u8a2a\u554f\u3002\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u4f86\u6aa2\u67e5\u670d\u52d9\u5668\u7684\u72c0\u614b\uff1a<\/p>\n<pre><code>ping ldap_server_hostname<\/code><\/pre>\n<h3 id=\"2-%e9%a9%97%e8%ad%89%e7%b6%b2%e7%b5%a1%e9%80%a3%e6%8e%a5-LCBRZgXyiG\">2. \u9a57\u8b49\u7db2\u7d61\u9023\u63a5<\/h3>\n<p>\u6aa2\u67e5\u7db2\u7d61\u9023\u63a5\u662f\u5426\u6b63\u5e38\uff0c\u78ba\u4fdd\u9632\u706b\u7246\u6216\u5176\u4ed6\u5b89\u5168\u8a2d\u7f6e\u4e0d\u6703\u963b\u6b62\u5c0dLDAP\u670d\u52d9\u5668\u7684\u8a2a\u554f\u3002\u53ef\u4ee5\u4f7f\u7528telnet\u547d\u4ee4\u4f86\u6e2c\u8a66\u7aef\u53e3\u9023\u63a5\uff1a<\/p>\n<pre><code>telnet ldap_server_hostname port_number<\/code><\/pre>\n<h3 id=\"3-%e6%aa%a2%e6%9f%a5dbms_ldap%e9%85%8d%e7%bd%ae-LCBRZgXyiG\">3. \u6aa2\u67e5DBMS_LDAP\u914d\u7f6e<\/h3>\n<p>\u78ba\u4fddDBMS_LDAP\u7684\u914d\u7f6e\u6b63\u78ba\u3002\u6aa2\u67e5\u4ee5\u4e0b\u53c3\u6578\uff1a<\/p>\n<ul>\n<li>\u4e3b\u6a5f\u540d<\/li>\n<li>\u7aef\u53e3\u865f<\/li>\n<li>\u7528\u6236\u540d\u548c\u5bc6\u78bc<\/li>\n<\/ul>\n<p>\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0bPL\/SQL\u4ee3\u78bc\u4f86\u6e2c\u8a66LDAP\u9023\u63a5\uff1a<\/p>\n<pre><code>\nDECLARE\n    l_ldap_handle DBMS_LDAP.LDAP_HANDLE;\nBEGIN\n    l_ldap_handle := DBMS_LDAP.init('ldap_server_hostname', port_number);\n    DBMS_OUTPUT.put_line('LDAP initialized successfully.');\n    DBMS_LDAP.unbind(l_ldap_handle);\nEXCEPTION\n    WHEN OTHERS THEN\n        DBMS_OUTPUT.put_line('Error initializing LDAP: ' || SQLERRM);\nEND;\n<\/code><\/pre>\n<h3 id=\"4-%e6%9b%b4%e6%96%b0oracle%e7%89%88%e6%9c%ac-LCBRZgXyiG\">4. \u66f4\u65b0Oracle\u7248\u672c<\/h3>\n<p>\u5982\u679c\u4ee5\u4e0a\u6b65\u9a5f\u7121\u6cd5\u89e3\u6c7a\u554f\u984c\uff0c\u8003\u616e\u66f4\u65b0Oracle\u6578\u64da\u5eab\u5230\u6700\u65b0\u7248\u672c\uff0c\u56e0\u70ba\u67d0\u4e9b\u7248\u672c\u53ef\u80fd\u5b58\u5728\u5df2\u77e5\u7684\u932f\u8aa4\u3002<\/p>\n<h2 id=\"%e9%81%a0%e7%a8%8b%e8%99%95%e7%90%86ora-31203%e9%8c%af%e8%aa%a4-LCBRZgXyiG\">\u9060\u7a0b\u8655\u7406ORA-31203\u932f\u8aa4<\/h2>\n<p>\u5728\u67d0\u4e9b\u60c5\u6cc1\u4e0b\uff0c\u53ef\u80fd\u9700\u8981\u9032\u884c\u9060\u7a0b\u8655\u7406\u4f86\u89e3\u6c7aORA-31203\u932f\u8aa4\u3002\u9019\u53ef\u4ee5\u901a\u904e\u4ee5\u4e0b\u65b9\u5f0f\u5be6\u73fe\uff1a<\/p>\n<ul>\n<li><strong>\u4f7f\u7528\u9060\u7a0b\u684c\u9762\u5de5\u5177\uff1a<\/strong>\u53ef\u4ee5\u4f7f\u7528\u9060\u7a0b\u684c\u9762\u5de5\u5177\u9023\u63a5\u5230\u51fa\u73fe\u554f\u984c\u7684\u4f3a\u670d\u5668\uff0c\u9032\u884c\u76f4\u63a5\u7684\u6545\u969c\u6392\u9664\u3002<\/li>\n<li><strong>\u9060\u7a0b\u65e5\u8a8c\u6aa2\u67e5\uff1a<\/strong>\u6aa2\u67e5Oracle\u548cLDAP\u7684\u65e5\u8a8c\u6587\u4ef6\uff0c\u4ee5\u7372\u53d6\u66f4\u591a\u7684\u932f\u8aa4\u4fe1\u606f\u548c\u4e0a\u4e0b\u6587\u3002<\/li>\n<li><strong>\u806f\u7e6b\u6280\u8853\u652f\u6301\uff1a<\/strong>\u5982\u679c\u7121\u6cd5\u81ea\u884c\u89e3\u6c7a\u554f\u984c\uff0c\u5efa\u8b70\u806f\u7e6bOracle\u6216LDAP\u7684\u6280\u8853\u652f\u6301\u5718\u968a\u4ee5\u7372\u53d6\u5e6b\u52a9\u3002<\/li>\n<\/ul>\n<h2 id=\"%e7%b8%bd%e7%b5%90-LCBRZgXyiG\">\u7e3d\u7d50<\/h2>\n<p>ORA-31203\u932f\u8aa4\u901a\u5e38\u8207DBMS_LDAP\u7684\u521d\u59cb\u5316\u5931\u6557\u6709\u95dc\uff0c\u53ef\u80fd\u7531\u591a\u7a2e\u56e0\u7d20\u5f15\u8d77\uff0c\u5305\u62ecLDAP\u670d\u52d9\u5668\u4e0d\u53ef\u7528\u3001\u7db2\u7d61\u554f\u984c\u6216\u914d\u7f6e\u932f\u8aa4\u3002\u901a\u904e\u6aa2\u67e5\u670d\u52d9\u5668\u72c0\u614b\u3001\u9a57\u8b49\u7db2\u7d61\u9023\u63a5\u3001\u6aa2\u67e5\u914d\u7f6e\u4ee5\u53ca\u66f4\u65b0Oracle\u7248\u672c\uff0c\u53ef\u4ee5\u6709\u6548\u5730\u89e3\u6c7a\u6b64\u554f\u984c\u3002\u5728\u67d0\u4e9b\u60c5\u6cc1\u4e0b\uff0c\u9060\u7a0b\u8655\u7406\u53ef\u80fd\u662f\u5fc5\u8981\u7684\u3002\u5c0d\u65bc\u9700\u8981\u7a69\u5b9a\u548c\u9ad8\u6548\u7684\u6578\u64da\u5eab\u89e3\u6c7a\u65b9\u6848\uff0c\u8003\u616e\u4f7f\u7528<a href=\"https:\/\/server.hk\">\u9999\u6e2fVPS<\/a>\u6216<a href=\"https:\/\/server.hk\">\u9999\u6e2f\u4f3a\u670d\u5668<\/a>\u4f86\u652f\u6301\u60a8\u7684\u696d\u52d9\u9700\u6c42\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u89e3\u6c7a ORA-31203 \u932f\u8aa4\uff0cDBMS_LDAP \u521d\u59cb\u5316\u5931\u6557\u7684\u554f\u984c\uff0c\u63d0\u4f9b Oracle \u6545\u969c\u4fee\u5fa9\u548c\u9060\u7a0b\u8655\u7406\u7684\u6709\u6548\u65b9\u6cd5\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-91632","post","type-post","status-publish","format-standard","hentry","category-database"],"_links":{"self":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/91632","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=91632"}],"version-history":[{"count":1,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/91632\/revisions"}],"predecessor-version":[{"id":91633,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/91632\/revisions\/91633"}],"wp:attachment":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/media?parent=91632"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/categories?post=91632"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/tags?post=91632"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}