{"id":90970,"date":"2024-10-18T17:14:17","date_gmt":"2024-10-18T09:14:17","guid":{"rendered":"https:\/\/server.hk\/cnblog\/90970\/"},"modified":"2024-10-18T17:14:18","modified_gmt":"2024-10-18T09:14:18","slug":"ora-29262-bad-url-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\/90970\/","title":{"rendered":"ORA-29262: bad URL ORACLE\u5831\u932f \u6545\u969c\u4fee\u5fa9 \u9060\u7a0b\u8655\u7406"},"content":{"rendered":"<h1 id=\"ora-29262-bad-url-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-lLYxUWRKxu\">ORA-29262: bad URL 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\u5c31\u662fORA-29262\u3002\u9019\u500b\u932f\u8aa4\u901a\u5e38\u8207URL\u7684\u683c\u5f0f\u6216\u53ef\u8a2a\u554f\u6027\u6709\u95dc\uff0c\u7279\u5225\u662f\u5728\u4f7f\u7528Oracle\u7684UTL_HTTP\u5305\u9032\u884cHTTP\u8acb\u6c42\u6642\u3002\u672c\u6587\u5c07\u6df1\u5165\u63a2\u8a0eORA-29262\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-29262%e9%8c%af%e8%aa%a4%e7%9a%84%e5%8e%9f%e5%9b%a0-lLYxUWRKxu\">ORA-29262\u932f\u8aa4\u7684\u539f\u56e0<\/h2>\n<p>ORA-29262\u932f\u8aa4\u7684\u4e3b\u8981\u539f\u56e0\u901a\u5e38\u5305\u62ec\uff1a<\/p>\n<ul>\n<li><strong>URL\u683c\u5f0f\u4e0d\u6b63\u78ba\uff1a<\/strong>\u7576\u63d0\u4f9b\u7684URL\u4e0d\u7b26\u5408\u6a19\u6e96\u683c\u5f0f\u6642\uff0cOracle\u5c07\u7121\u6cd5\u89e3\u6790\u8a72URL\u3002<\/li>\n<li><strong>\u7db2\u7d61\u9023\u63a5\u554f\u984c\uff1a<\/strong>\u5982\u679cOracle\u6578\u64da\u5eab\u7121\u6cd5\u8a2a\u554f\u6307\u5b9a\u7684URL\uff0c\u5247\u6703\u5f15\u767c\u6b64\u932f\u8aa4\u3002\u9019\u53ef\u80fd\u662f\u7531\u65bc\u9632\u706b\u7246\u8a2d\u7f6e\u6216\u7db2\u7d61\u914d\u7f6e\u554f\u984c\u3002<\/li>\n<li><strong>\u7f3a\u5c11\u5fc5\u8981\u7684\u6b0a\u9650\uff1a<\/strong>\u5728\u67d0\u4e9b\u60c5\u6cc1\u4e0b\uff0cOracle\u7528\u6236\u53ef\u80fd\u6c92\u6709\u8db3\u5920\u7684\u6b0a\u9650\u4f86\u8a2a\u554f\u5916\u90e8URL\u3002<\/li>\n<\/ul>\n<h2 id=\"%e8%a7%a3%e6%b1%baora-29262%e9%8c%af%e8%aa%a4%e7%9a%84%e6%96%b9%e6%b3%95-lLYxUWRKxu\">\u89e3\u6c7aORA-29262\u932f\u8aa4\u7684\u65b9\u6cd5<\/h2>\n<p>\u8981\u89e3\u6c7aORA-29262\u932f\u8aa4\uff0c\u53ef\u4ee5\u6309\u7167\u4ee5\u4e0b\u6b65\u9a5f\u9032\u884c\uff1a<\/p>\n<h3 id=\"1-%e6%aa%a2%e6%9f%a5url%e6%a0%bc%e5%bc%8f-lLYxUWRKxu\">1. \u6aa2\u67e5URL\u683c\u5f0f<\/h3>\n<p>\u9996\u5148\uff0c\u78ba\u4fdd\u63d0\u4f9b\u7684URL\u683c\u5f0f\u6b63\u78ba\u3002URL\u61c9\u8a72\u4ee5http:\/\/\u6216https:\/\/\u958b\u982d\uff0c\u4e26\u4e14\u4e0d\u61c9\u5305\u542b\u7a7a\u683c\u6216\u4e0d\u5408\u6cd5\u7684\u5b57\u7b26\u3002\u4f8b\u5982\uff1a<\/p>\n<pre><code>http:\/\/www.example.com\/resource<\/code><\/pre>\n<h3 id=\"2-%e6%b8%ac%e8%a9%a6%e7%b6%b2%e7%b5%a1%e9%80%a3%e6%8e%a5-lLYxUWRKxu\">2. \u6e2c\u8a66\u7db2\u7d61\u9023\u63a5<\/h3>\n<p>\u4f7f\u7528ping\u547d\u4ee4\u6216curl\u547d\u4ee4\u4f86\u6e2c\u8a66Oracle\u6578\u64da\u5eab\u662f\u5426\u80fd\u5920\u8a2a\u554f\u8a72URL\u3002\u4f8b\u5982\uff1a<\/p>\n<pre><code>ping www.example.com<\/code><\/pre>\n<p>\u5982\u679c\u7121\u6cd5\u8a2a\u554f\uff0c\u5247\u9700\u8981\u6aa2\u67e5\u7db2\u7d61\u8a2d\u7f6e\u6216\u9632\u706b\u7246\u898f\u5247\u3002<\/p>\n<h3 id=\"3-%e6%aa%a2%e6%9f%a5%e7%94%a8%e6%88%b6%e6%ac%8a%e9%99%90-lLYxUWRKxu\">3. \u6aa2\u67e5\u7528\u6236\u6b0a\u9650<\/h3>\n<p>\u78ba\u4fddOracle\u7528\u6236\u64c1\u6709\u8a2a\u554f\u5916\u90e8URL\u7684\u6b0a\u9650\u3002\u53ef\u4ee5\u901a\u904e\u4ee5\u4e0bSQL\u547d\u4ee4\u6aa2\u67e5\u7528\u6236\u7684\u6b0a\u9650\uff1a<\/p>\n<pre><code>SELECT * FROM user_privileges WHERE privilege = 'CREATE ANY DIRECTORY';<\/code><\/pre>\n<h2 id=\"%e9%81%a0%e7%a8%8b%e8%99%95%e7%90%86ora-29262%e9%8c%af%e8%aa%a4-lLYxUWRKxu\">\u9060\u7a0b\u8655\u7406ORA-29262\u932f\u8aa4<\/h2>\n<p>\u5728\u67d0\u4e9b\u60c5\u6cc1\u4e0b\uff0c\u60a8\u53ef\u80fd\u9700\u8981\u9032\u884c\u9060\u7a0b\u8655\u7406\u4f86\u89e3\u6c7aORA-29262\u932f\u8aa4\u3002\u9019\u53ef\u4ee5\u901a\u904e\u4ee5\u4e0b\u6b65\u9a5f\u5be6\u73fe\uff1a<\/p>\n<h3 id=\"1-%e4%bd%bf%e7%94%a8dbms_scheduler%e9%80%b2%e8%a1%8c%e9%81%a0%e7%a8%8b%e4%bd%9c%e6%a5%ad-lLYxUWRKxu\">1. \u4f7f\u7528DBMS_SCHEDULER\u9032\u884c\u9060\u7a0b\u4f5c\u696d<\/h3>\n<p>\u60a8\u53ef\u4ee5\u4f7f\u7528DBMS_SCHEDULER\u5305\u4f86\u5275\u5efa\u4e00\u500b\u9060\u7a0b\u4f5c\u696d\uff0c\u8a72\u4f5c\u696d\u53ef\u4ee5\u5728\u53e6\u4e00\u53f0\u4f3a\u670d\u5668\u4e0a\u57f7\u884c\uff0c\u5f9e\u800c\u907f\u514d\u7576\u524d\u4f3a\u670d\u5668\u7684\u7db2\u7d61\u9650\u5236\u3002<\/p>\n<pre><code>BEGIN\n    DBMS_SCHEDULER.create_job (\n        job_name =&gt; 'remote_http_request',\n        job_type =&gt; 'PLSQL_BLOCK',\n        job_action =&gt; 'BEGIN UTL_HTTP.request(''http:\/\/www.example.com\/resource''); END;',\n        enabled =&gt; TRUE\n    );\nEND;<\/code><\/pre>\n<h3 id=\"2-%e4%bd%bf%e7%94%a8oracle%e7%9a%84apex_web_service%e5%8c%85-lLYxUWRKxu\">2. \u4f7f\u7528Oracle\u7684APEX_WEB_SERVICE\u5305<\/h3>\n<p>\u5982\u679c\u60a8\u4f7f\u7528\u7684\u662fOracle APEX\uff0c\u5247\u53ef\u4ee5\u4f7f\u7528APEX_WEB_SERVICE\u5305\u4f86\u9032\u884cHTTP\u8acb\u6c42\uff0c\u9019\u6a23\u53ef\u4ee5\u66f4\u597d\u5730\u8655\u7406\u932f\u8aa4\u548c\u7570\u5e38\u3002<\/p>\n<pre><code>DECLARE\n    l_response CLOB;\nBEGIN\n    l_response := APEX_WEB_SERVICE.make_rest_request(\n        p_url =&gt; 'http:\/\/www.example.com\/resource',\n        p_http_method =&gt; 'GET'\n    );\n    DBMS_OUTPUT.put_line(l_response);\nEXCEPTION\n    WHEN OTHERS THEN\n        DBMS_OUTPUT.put_line(SQLERRM);\nEND;<\/code><\/pre>\n<h2 id=\"%e7%b8%bd%e7%b5%90-lLYxUWRKxu\">\u7e3d\u7d50<\/h2>\n<p>ORA-29262\u932f\u8aa4\u901a\u5e38\u8207URL\u7684\u683c\u5f0f\u3001\u7db2\u7d61\u9023\u63a5\u6216\u7528\u6236\u6b0a\u9650\u6709\u95dc\u3002\u901a\u904e\u6aa2\u67e5URL\u683c\u5f0f\u3001\u6e2c\u8a66\u7db2\u7d61\u9023\u63a5\u548c\u78ba\u8a8d\u7528\u6236\u6b0a\u9650\uff0c\u53ef\u4ee5\u6709\u6548\u5730\u89e3\u6c7a\u6b64\u554f\u984c\u3002\u6b64\u5916\uff0c\u4f7f\u7528DBMS_SCHEDULER\u548cAPEX_WEB_SERVICE\u5305\u9032\u884c\u9060\u7a0b\u8655\u7406\u4e5f\u662f\u4e00\u7a2e\u53ef\u884c\u7684\u89e3\u6c7a\u65b9\u6848\u3002\u5c0d\u65bc\u9700\u8981\u7a69\u5b9a\u548c\u9ad8\u6548\u7684\u6578\u64da\u5eab\u670d\u52d9\u7684\u7528\u6236\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> \u662f\u81f3\u95dc\u91cd\u8981\u7684\uff0c\u4ee5\u78ba\u4fdd\u696d\u52d9\u7684\u9806\u5229\u904b\u884c\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Learn how to troubleshoot and fix ORA-29262: bad URL errors in Oracle with remote handling techniques for efficient 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-90970","post","type-post","status-publish","format-standard","hentry","category-database"],"_links":{"self":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/90970","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=90970"}],"version-history":[{"count":1,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/90970\/revisions"}],"predecessor-version":[{"id":90971,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/90970\/revisions\/90971"}],"wp:attachment":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/media?parent=90970"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/categories?post=90970"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/tags?post=90970"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}