{"id":90538,"date":"2024-10-18T15:02:21","date_gmt":"2024-10-18T07:02:21","guid":{"rendered":"https:\/\/server.hk\/cnblog\/90538\/"},"modified":"2024-10-18T15:02:22","modified_gmt":"2024-10-18T07:02:22","slug":"ora-27472-invalid-metadata-attribute-string-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\/90538\/","title":{"rendered":"ORA-27472: invalid metadata attribute string ORACLE\u5831\u932f \u6545\u969c\u4fee\u5fa9 \u9060\u7a0b\u8655\u7406"},"content":{"rendered":"<h1 id=\"ora-27472-invalid-metadata-attribute-string-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-GVcTPlUsrU\">ORA-27472: invalid metadata attribute string ORACLE\u5831\u932f \u6545\u969c\u4fee\u5fa9 \u9060\u7a0b\u8655\u7406<\/h1>\n<p>\u5728\u4f7f\u7528Oracle\u6578\u64da\u5eab\u7684\u904e\u7a0b\u4e2d\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\u662fORA-27472\u3002\u9019\u500b\u932f\u8aa4\u901a\u5e38\u8207Oracle\u7684\u4f5c\u696d\u6392\u7a0b\u5668\uff08Scheduler\uff09\u6709\u95dc\uff0c\u7279\u5225\u662f\u5728\u8a2d\u7f6e\u6216\u4fee\u6539\u4f5c\u696d\u6642\u3002\u672c\u6587\u5c07\u6df1\u5165\u63a2\u8a0eORA-27472\u7684\u539f\u56e0\u3001\u5f71\u97ff\u4ee5\u53ca\u5982\u4f55\u9032\u884c\u6545\u969c\u4fee\u5fa9\u3002<\/p>\n<h2 id=\"ora-27472%e7%9a%84%e5%8e%9f%e5%9b%a0-GVcTPlUsrU\">ORA-27472\u7684\u539f\u56e0<\/h2>\n<p>ORA-27472\u932f\u8aa4\u7684\u4e3b\u8981\u539f\u56e0\u662f\u7121\u6548\u7684\u5143\u6578\u64da\u5c6c\u6027\u5b57\u7b26\u4e32\u3002\u9019\u901a\u5e38\u767c\u751f\u5728\u4ee5\u4e0b\u60c5\u6cc1\uff1a<\/p>\n<ul>\n<li>\u5728\u5275\u5efa\u6216\u4fee\u6539\u4f5c\u696d\u6642\uff0c\u63d0\u4f9b\u4e86\u4e0d\u6b63\u78ba\u7684\u5c6c\u6027\u503c\u3002<\/li>\n<li>\u4f7f\u7528\u4e86\u4e0d\u652f\u6301\u7684\u5b57\u7b26\u6216\u683c\u5f0f\u3002<\/li>\n<li>\u6578\u64da\u5eab\u7248\u672c\u4e0d\u517c\u5bb9\uff0c\u5c0e\u81f4\u67d0\u4e9b\u5c6c\u6027\u7121\u6cd5\u8b58\u5225\u3002<\/li>\n<\/ul>\n<p>\u4f8b\u5982\uff0c\u7576\u7528\u6236\u5617\u8a66\u4f7f\u7528\u4ee5\u4e0bSQL\u8a9e\u53e5\u5275\u5efa\u4e00\u500b\u4f5c\u696d\u6642\uff1a<\/p>\n<pre><code>BEGIN\n    DBMS_SCHEDULER.CREATE_JOB (\n        job_name =&gt; 'my_job',\n        job_type =&gt; 'PLSQL_BLOCK',\n        job_action =&gt; 'BEGIN my_procedure; END;',\n        start_date =&gt; SYSTIMESTAMP,\n        enabled =&gt; TRUE,\n        metadata_attribute =&gt; 'invalid_value'  -- \u9019\u88e1\u7684\u503c\u53ef\u80fd\u5c0e\u81f4\u932f\u8aa4\n    );\nEND;\n<\/code><\/pre>\n<p>\u5982\u679cmetadata_attribute\u7684\u503c\u4e0d\u7b26\u5408Oracle\u7684\u8981\u6c42\uff0c\u5c31\u6703\u5f15\u767cORA-27472\u932f\u8aa4\u3002<\/p>\n<h2 id=\"%e5%a6%82%e4%bd%95%e4%bf%ae%e5%be%a9ora-27472%e9%8c%af%e8%aa%a4-GVcTPlUsrU\">\u5982\u4f55\u4fee\u5fa9ORA-27472\u932f\u8aa4<\/h2>\n<p>\u4fee\u5fa9ORA-27472\u932f\u8aa4\u7684\u904e\u7a0b\u901a\u5e38\u5305\u62ec\u4ee5\u4e0b\u5e7e\u500b\u6b65\u9a5f\uff1a<\/p>\n<h3 id=\"1-%e6%aa%a2%e6%9f%a5%e4%bd%9c%e6%a5%ad%e5%b1%ac%e6%80%a7-GVcTPlUsrU\">1. \u6aa2\u67e5\u4f5c\u696d\u5c6c\u6027<\/h3>\n<p>\u9996\u5148\uff0c\u6aa2\u67e5\u5275\u5efa\u6216\u4fee\u6539\u4f5c\u696d\u6642\u6240\u4f7f\u7528\u7684\u6240\u6709\u5c6c\u6027\u3002\u78ba\u4fdd\u6240\u6709\u5c6c\u6027\u503c\u90fd\u662f\u6b63\u78ba\u7684\uff0c\u4e26\u4e14\u7b26\u5408Oracle\u7684\u8981\u6c42\u3002\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u67e5\u8a62\u4f86\u6aa2\u67e5\u4f5c\u696d\u7684\u5c6c\u6027\uff1a<\/p>\n<pre><code>SELECT * FROM DBA_SCHEDULER_JOBS WHERE job_name = 'my_job';\n<\/code><\/pre>\n<h3 id=\"2-%e6%9b%b4%e6%96%b0%e4%b8%8d%e6%ad%a3%e7%a2%ba%e7%9a%84%e5%b1%ac%e6%80%a7-GVcTPlUsrU\">2. \u66f4\u65b0\u4e0d\u6b63\u78ba\u7684\u5c6c\u6027<\/h3>\n<p>\u5982\u679c\u767c\u73fe\u67d0\u500b\u5c6c\u6027\u503c\u4e0d\u6b63\u78ba\uff0c\u53ef\u4ee5\u4f7f\u7528ALTER\u8a9e\u53e5\u4f86\u66f4\u65b0\u4f5c\u696d\u3002\u4f8b\u5982\uff1a<\/p>\n<pre><code>BEGIN\n    DBMS_SCHEDULER.SET_ATTRIBUTE (\n        name =&gt; 'my_job',\n        attribute =&gt; 'metadata_attribute',\n        value =&gt; 'correct_value'  -- \u5c07\u5176\u66f4\u6539\u70ba\u6b63\u78ba\u7684\u503c\n    );\nEND;\n<\/code><\/pre>\n<h3 id=\"3-%e6%b8%ac%e8%a9%a6%e4%bd%9c%e6%a5%ad-GVcTPlUsrU\">3. \u6e2c\u8a66\u4f5c\u696d<\/h3>\n<p>\u5728\u4fee\u5fa9\u4e86\u5c6c\u6027\u4e4b\u5f8c\uff0c\u91cd\u65b0\u555f\u7528\u4f5c\u696d\u4e26\u9032\u884c\u6e2c\u8a66\uff0c\u4ee5\u78ba\u4fdd\u554f\u984c\u5df2\u7d93\u89e3\u6c7a\u3002\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u8a9e\u53e5\u4f86\u555f\u7528\u4f5c\u696d\uff1a<\/p>\n<pre><code>BEGIN\n    DBMS_SCHEDULER.ENABLE('my_job');\nEND;\n<\/code><\/pre>\n<h2 id=\"%e9%81%a0%e7%a8%8b%e8%99%95%e7%90%86ora-27472%e9%8c%af%e8%aa%a4-GVcTPlUsrU\">\u9060\u7a0b\u8655\u7406ORA-27472\u932f\u8aa4<\/h2>\n<p>\u5728\u67d0\u4e9b\u60c5\u6cc1\u4e0b\uff0c\u6578\u64da\u5eab\u7ba1\u7406\u54e1\u53ef\u80fd\u7121\u6cd5\u76f4\u63a5\u8a2a\u554f\u6578\u64da\u5eab\u9032\u884c\u6545\u969c\u6392\u9664\u3002\u9019\u6642\uff0c\u53ef\u4ee5\u8003\u616e\u4f7f\u7528\u9060\u7a0b\u8655\u7406\u5de5\u5177\u4f86\u89e3\u6c7a\u554f\u984c\u3002\u4ee5\u4e0b\u662f\u4e00\u4e9b\u5e38\u7528\u7684\u9060\u7a0b\u8655\u7406\u65b9\u6cd5\uff1a<\/p>\n<ul>\n<li><strong>\u4f7f\u7528Oracle SQL Developer\uff1a<\/strong>\u9019\u662f\u4e00\u500b\u5f37\u5927\u7684\u5de5\u5177\uff0c\u53ef\u4ee5\u5e6b\u52a9\u7528\u6236\u9060\u7a0b\u9023\u63a5\u5230Oracle\u6578\u64da\u5eab\uff0c\u4e26\u57f7\u884cSQL\u67e5\u8a62\u548cPL\/SQL\u4ee3\u78bc\u3002<\/li>\n<li><strong>\u4f7f\u7528SSH\u9023\u63a5\uff1a<\/strong>\u5982\u679c\u6578\u64da\u5eab\u90e8\u7f72\u5728VPS\u4e0a\uff0c\u53ef\u4ee5\u901a\u904eSSH\u9023\u63a5\u5230\u4f3a\u670d\u5668\uff0c\u7136\u5f8c\u4f7f\u7528SQL*Plus\u6216\u5176\u4ed6\u5de5\u5177\u9032\u884c\u6545\u969c\u6392\u9664\u3002<\/li>\n<li><strong>\u4f7f\u7528Oracle Enterprise Manager\uff1a<\/strong>\u9019\u662f\u4e00\u500b\u96c6\u6210\u7684\u7ba1\u7406\u5de5\u5177\uff0c\u53ef\u4ee5\u5e6b\u52a9\u7528\u6236\u76e3\u63a7\u548c\u7ba1\u7406Oracle\u6578\u64da\u5eab\uff0c\u5305\u62ec\u4f5c\u696d\u6392\u7a0b\u5668\u7684\u72c0\u614b\u3002<\/li>\n<\/ul>\n<h2 id=\"%e7%b8%bd%e7%b5%90-GVcTPlUsrU\">\u7e3d\u7d50<\/h2>\n<p>ORA-27472\u932f\u8aa4\u901a\u5e38\u662f\u7531\u65bc\u7121\u6548\u7684\u5143\u6578\u64da\u5c6c\u6027\u5b57\u7b26\u4e32\u5f15\u8d77\u7684\uff0c\u901a\u904e\u4ed4\u7d30\u6aa2\u67e5\u548c\u66f4\u65b0\u4f5c\u696d\u5c6c\u6027\uff0c\u53ef\u4ee5\u6709\u6548\u5730\u89e3\u6c7a\u6b64\u554f\u984c\u3002\u5c0d\u65bc\u9700\u8981\u9060\u7a0b\u8655\u7406\u7684\u60c5\u6cc1\uff0c\u4f7f\u7528\u5408\u9069\u7684\u5de5\u5177\u548c\u65b9\u6cd5\u53ef\u4ee5\u5e6b\u52a9\u6578\u64da\u5eab\u7ba1\u7406\u54e1\u5feb\u901f\u5b9a\u4f4d\u548c\u4fee\u5fa9\u554f\u984c\u3002\u82e5\u60a8\u9700\u8981\u9032\u4e00\u6b65\u7684\u652f\u6301\u6216\u5c0b\u627e\u53ef\u9760\u7684 <a href=\"https:\/\/server.hk\">\u9999\u6e2fVPS<\/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>Learn how to troubleshoot and fix the ORA-27472 error in Oracle, addressing invalid metadata attribute strings with effective remote handling solutions.<\/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-90538","post","type-post","status-publish","format-standard","hentry","category-database"],"_links":{"self":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/90538","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=90538"}],"version-history":[{"count":1,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/90538\/revisions"}],"predecessor-version":[{"id":90539,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/90538\/revisions\/90539"}],"wp:attachment":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/media?parent=90538"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/categories?post=90538"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/tags?post=90538"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}