{"id":90012,"date":"2024-10-18T14:11:17","date_gmt":"2024-10-18T06:11:17","guid":{"rendered":"https:\/\/server.hk\/cnblog\/90012\/"},"modified":"2024-10-18T14:11:17","modified_gmt":"2024-10-18T06:11:17","slug":"ora-27127-unable-to-unlock-shared-memory-segment-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\/90012\/","title":{"rendered":"ORA-27127: unable to unlock shared memory segment ORACLE\u5831\u932f \u6545\u969c\u4fee\u5fa9 \u9060\u7a0b\u8655\u7406"},"content":{"rendered":"<h1 id=\"ora-27127-unable-to-unlock-shared-memory-segment-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-kwyxQEIdKl\">ORA-27127: unable to unlock shared memory segment ORACLE\u5831\u932f \u6545\u969c\u4fee\u5fa9 \u9060\u7a0b\u8655\u7406<\/h1>\n<p>\u5728\u4f7f\u7528Oracle\u6578\u64da\u5eab\u6642\uff0c\u9047\u5230\u932f\u8aa4\u4ee3\u78bcORA-27127\u662f\u76f8\u5c0d\u5e38\u898b\u7684\u554f\u984c\u3002\u9019\u500b\u932f\u8aa4\u901a\u5e38\u8868\u793a\u7cfb\u7d71\u7121\u6cd5\u89e3\u9396\u5171\u4eab\u5167\u5b58\u6bb5\uff0c\u9019\u53ef\u80fd\u6703\u5c0e\u81f4\u6578\u64da\u5eab\u7121\u6cd5\u6b63\u5e38\u555f\u52d5\u6216\u904b\u884c\u3002\u672c\u6587\u5c07\u6df1\u5165\u63a2\u8a0eORA-27127\u7684\u539f\u56e0\u3001\u5f71\u97ff\u4ee5\u53ca\u89e3\u6c7a\u65b9\u6848\uff0c\u5e6b\u52a9\u7528\u6236\u66f4\u597d\u5730\u7406\u89e3\u548c\u8655\u7406\u9019\u4e00\u554f\u984c\u3002<\/p>\n<h2 id=\"ora-27127%e7%9a%84%e5%8e%9f%e5%9b%a0-kwyxQEIdKl\">ORA-27127\u7684\u539f\u56e0<\/h2>\n<p>ORA-27127\u932f\u8aa4\u901a\u5e38\u8207\u64cd\u4f5c\u7cfb\u7d71\u7684\u5171\u4eab\u5167\u5b58\u914d\u7f6e\u6709\u95dc\u3002\u4ee5\u4e0b\u662f\u4e00\u4e9b\u53ef\u80fd\u7684\u539f\u56e0\uff1a<\/p>\n<ul>\n<li><strong>\u5171\u4eab\u5167\u5b58\u914d\u7f6e\u4e0d\u8db3\uff1a<\/strong>\u5982\u679c\u7cfb\u7d71\u7684\u5171\u4eab\u5167\u5b58\u8a2d\u7f6e\u4e0d\u5920\uff0cOracle\u6578\u64da\u5eab\u5c07\u7121\u6cd5\u5206\u914d\u6240\u9700\u7684\u5167\u5b58\u6bb5\u3002<\/li>\n<li><strong>\u5167\u5b58\u6bb5\u88ab\u9396\u5b9a\uff1a<\/strong>\u5728\u67d0\u4e9b\u60c5\u6cc1\u4e0b\uff0c\u5167\u5b58\u6bb5\u53ef\u80fd\u56e0\u70ba\u5176\u4ed6\u9032\u7a0b\u7684\u9396\u5b9a\u800c\u7121\u6cd5\u89e3\u9396\u3002<\/li>\n<li><strong>\u64cd\u4f5c\u7cfb\u7d71\u9650\u5236\uff1a<\/strong>\u67d0\u4e9b\u64cd\u4f5c\u7cfb\u7d71\u5c0d\u5171\u4eab\u5167\u5b58\u7684\u4f7f\u7528\u6709\u56b4\u683c\u7684\u9650\u5236\uff0c\u9019\u53ef\u80fd\u6703\u5c0e\u81f4\u6b64\u932f\u8aa4\u3002<\/li>\n<li><strong>Oracle\u914d\u7f6e\u932f\u8aa4\uff1a<\/strong>\u5982\u679cOracle\u7684\u521d\u59cb\u5316\u53c3\u6578\u914d\u7f6e\u4e0d\u6b63\u78ba\uff0c\u4e5f\u53ef\u80fd\u5c0e\u81f4\u6b64\u932f\u8aa4\u3002<\/li>\n<\/ul>\n<h2 id=\"%e5%bd%b1%e9%9f%bf-kwyxQEIdKl\">\u5f71\u97ff<\/h2>\n<p>\u7576\u51fa\u73feORA-27127\u932f\u8aa4\u6642\uff0c\u6578\u64da\u5eab\u5c07\u7121\u6cd5\u555f\u52d5\uff0c\u9019\u6703\u5f71\u97ff\u5230\u4f9d\u8cf4\u8a72\u6578\u64da\u5eab\u7684\u61c9\u7528\u7a0b\u5e8f\u548c\u670d\u52d9\u3002\u9019\u53ef\u80fd\u5c0e\u81f4\u696d\u52d9\u4e2d\u65b7\uff0c\u5f71\u97ff\u7528\u6236\u7684\u6b63\u5e38\u64cd\u4f5c\u3002\u56e0\u6b64\uff0c\u53ca\u6642\u89e3\u6c7a\u6b64\u554f\u984c\u81f3\u95dc\u91cd\u8981\u3002<\/p>\n<h2 id=\"%e6%95%85%e9%9a%9c%e4%bf%ae%e5%be%a9%e6%ad%a5%e9%a9%9f-kwyxQEIdKl\">\u6545\u969c\u4fee\u5fa9\u6b65\u9a5f<\/h2>\n<p>\u4ee5\u4e0b\u662f\u4e00\u4e9b\u89e3\u6c7aORA-27127\u932f\u8aa4\u7684\u6b65\u9a5f\uff1a<\/p>\n<h3 id=\"1-%e6%aa%a2%e6%9f%a5%e5%85%b1%e4%ba%ab%e5%85%a7%e5%ad%98%e9%85%8d%e7%bd%ae-kwyxQEIdKl\">1. \u6aa2\u67e5\u5171\u4eab\u5167\u5b58\u914d\u7f6e<\/h3>\n<p>\u9996\u5148\uff0c\u6aa2\u67e5\u64cd\u4f5c\u7cfb\u7d71\u7684\u5171\u4eab\u5167\u5b58\u914d\u7f6e\u3002\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u4f86\u67e5\u770b\u7576\u524d\u7684\u5171\u4eab\u5167\u5b58\u8a2d\u7f6e\uff1a<\/p>\n<pre><code>ipcs -lm<\/code><\/pre>\n<p>\u78ba\u4fdd\u5171\u4eab\u5167\u5b58\u7684\u5927\u5c0f\u548c\u6578\u91cf\u7b26\u5408Oracle\u7684\u8981\u6c42\u3002\u6839\u64da\u9700\u8981\u8abf\u6574\u7cfb\u7d71\u7684\u5171\u4eab\u5167\u5b58\u8a2d\u7f6e\uff0c\u901a\u5e38\u9700\u8981\u4fee\u6539\/etc\/sysctl.conf\u6587\u4ef6\uff0c\u4e26\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u4f7f\u66f4\u6539\u751f\u6548\uff1a<\/p>\n<pre><code>sysctl -p<\/code><\/pre>\n<h3 id=\"2-%e6%aa%a2%e6%9f%a5oracle%e5%88%9d%e5%a7%8b%e5%8c%96%e5%8f%83%e6%95%b8-kwyxQEIdKl\">2. \u6aa2\u67e5Oracle\u521d\u59cb\u5316\u53c3\u6578<\/h3>\n<p>\u6aa2\u67e5Oracle\u7684\u521d\u59cb\u5316\u53c3\u6578\uff0c\u7279\u5225\u662f\u4ee5\u4e0b\u5e7e\u500b\u53c3\u6578\uff1a<\/p>\n<ul>\n<li><strong>SGA_TARGET\uff1a<\/strong>\u78ba\u4fdd\u6b64\u53c3\u6578\u7684\u503c\u8db3\u5920\u5927\uff0c\u4ee5\u5bb9\u7d0d\u6240\u9700\u7684\u5171\u4eab\u5167\u5b58\u3002<\/li>\n<li><strong>SGA_MAX_SIZE\uff1a<\/strong>\u6b64\u53c3\u6578\u61c9\u8a2d\u7f6e\u70ba\u7cfb\u7d71\u53ef\u7528\u7684\u6700\u5927\u5171\u4eab\u5167\u5b58\u5927\u5c0f\u3002<\/li>\n<\/ul>\n<p>\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0bSQL\u67e5\u8a62\u4f86\u6aa2\u67e5\u9019\u4e9b\u53c3\u6578\uff1a<\/p>\n<pre><code>SHOW PARAMETER SGA;<\/code><\/pre>\n<h3 id=\"3-%e9%87%8b%e6%94%be%e8%a2%ab%e9%8e%96%e5%ae%9a%e7%9a%84%e5%85%a7%e5%ad%98%e6%ae%b5-kwyxQEIdKl\">3. \u91cb\u653e\u88ab\u9396\u5b9a\u7684\u5167\u5b58\u6bb5<\/h3>\n<p>\u5982\u679c\u767c\u73fe\u6709\u9032\u7a0b\u9396\u5b9a\u4e86\u5171\u4eab\u5167\u5b58\u6bb5\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u67e5\u627e\u4e26\u7d42\u6b62\u9019\u4e9b\u9032\u7a0b\uff1a<\/p>\n<pre><code>ps -ef | grep ora_<\/code><\/pre>\n<p>\u7136\u5f8c\u4f7f\u7528kill\u547d\u4ee4\u7d42\u6b62\u76f8\u95dc\u9032\u7a0b\uff1a<\/p>\n<pre><code>kill -9 <\/code><\/pre>\n<h3 id=\"4-%e9%87%8d%e5%95%9foracle%e6%95%b8%e6%93%9a%e5%ba%ab-kwyxQEIdKl\">4. \u91cd\u555fOracle\u6578\u64da\u5eab<\/h3>\n<p>\u5728\u5b8c\u6210\u4e0a\u8ff0\u6b65\u9a5f\u5f8c\uff0c\u5617\u8a66\u91cd\u555fOracle\u6578\u64da\u5eab\u4ee5\u6aa2\u67e5\u554f\u984c\u662f\u5426\u5df2\u89e3\u6c7a\uff1a<\/p>\n<pre><code>sqlplus \/ as sysdba\nSHUTDOWN IMMEDIATE;\nSTARTUP;<\/code><\/pre>\n<h2 id=\"%e7%b5%90%e8%ab%96-kwyxQEIdKl\">\u7d50\u8ad6<\/h2>\n<p>ORA-27127\u932f\u8aa4\u53ef\u80fd\u6703\u5c0dOracle\u6578\u64da\u5eab\u7684\u904b\u884c\u9020\u6210\u56b4\u91cd\u5f71\u97ff\uff0c\u4f46\u901a\u904e\u6aa2\u67e5\u5171\u4eab\u5167\u5b58\u914d\u7f6e\u3001Oracle\u521d\u59cb\u5316\u53c3\u6578\u4ee5\u53ca\u91cb\u653e\u88ab\u9396\u5b9a\u7684\u5167\u5b58\u6bb5\uff0c\u901a\u5e38\u53ef\u4ee5\u6709\u6548\u89e3\u6c7a\u6b64\u554f\u984c\u3002\u5c0d\u65bc\u9700\u8981\u7a69\u5b9a\u904b\u884c\u7684\u696d\u52d9\u74b0\u5883\uff0c\u5efa\u8b70\u5b9a\u671f\u6aa2\u67e5\u548c\u512a\u5316\u7cfb\u7d71\u914d\u7f6e\uff0c\u4ee5\u907f\u514d\u985e\u4f3c\u554f\u984c\u7684\u767c\u751f\u3002<\/p>\n<p>\u5982\u9700\u9032\u4e00\u6b65\u4e86\u89e3\u5982\u4f55\u9078\u64c7\u5408\u9069\u7684 <a href=\"https:\/\/server.hk\">VPS<\/a> \u89e3\u6c7a\u65b9\u6848\u4ee5\u652f\u6301\u60a8\u7684Oracle\u6578\u64da\u5eab\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 resolve the ORA-27127 error: &#8220;unable to unlock shared memory segment&#8221; in Oracle with 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-90012","post","type-post","status-publish","format-standard","hentry","category-database"],"_links":{"self":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/90012","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=90012"}],"version-history":[{"count":1,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/90012\/revisions"}],"predecessor-version":[{"id":90013,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/90012\/revisions\/90013"}],"wp:attachment":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/media?parent=90012"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/categories?post=90012"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/tags?post=90012"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}