{"id":82201,"date":"2024-10-16T18:45:17","date_gmt":"2024-10-16T10:45:17","guid":{"rendered":"https:\/\/server.hk\/cnblog\/82201\/"},"modified":"2024-10-16T18:45:18","modified_gmt":"2024-10-16T10:45:18","slug":"ora-00847-memory_target-memory_max_target-and-lock_sga-cannot-be-set-together-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\/82201\/","title":{"rendered":"ORA-00847: MEMORY_TARGET\/MEMORY_MAX_TARGET and LOCK_SGA cannot be set together ORACLE\u5831\u932f\u6545\u969c\u4fee\u5fa9\u9060\u7a0b\u8655\u7406"},"content":{"rendered":"<h1 id=\"ora-00847-memory_target-memory_max_target-%e5%92%8c-lock_sga-%e4%b8%8d%e8%83%bd%e4%b8%80%e8%b5%b7%e8%ae%be%e7%bd%ae%e7%9a%84%e6%95%85%e9%9a%9c%e5%a4%84%e7%90%86-trBqAYMEgD\">ORA-00847: MEMORY_TARGET\/MEMORY_MAX_TARGET \u548c LOCK_SGA \u4e0d\u80fd\u4e00\u8d77\u8bbe\u7f6e\u7684\u6545\u969c\u5904\u7406<\/h1>\n<p>\u5728\u4f7f\u7528 Oracle \u6570\u636e\u5e93\u65f6\uff0c\u7528\u6237\u53ef\u80fd\u4f1a\u9047\u5230\u9519\u8bef\u4ee3\u7801 <code>ORA-00847<\/code>\uff0c\u8be5\u9519\u8bef\u63d0\u793a\u201c<code>MEMORY_TARGET<\/code> \u548c <code>MEMORY_MAX_TARGET<\/code> \u4ee5\u53ca <code>LOCK_SGA<\/code> \u4e0d\u80fd\u4e00\u8d77\u8bbe\u7f6e\u201d\u3002\u8fd9\u4e2a\u95ee\u9898\u901a\u5e38\u51fa\u73b0\u5728\u6570\u636e\u5e93\u7684\u5185\u5b58\u914d\u7f6e\u8fc7\u7a0b\u4e2d\uff0c\u5c24\u5176\u662f\u5728\u4f7f\u7528\u81ea\u52a8\u5185\u5b58\u7ba1\u7406\uff08AMM\uff09\u65f6\u3002\u672c\u6587\u5c06\u6df1\u5165\u63a2\u8ba8\u8be5\u9519\u8bef\u7684\u539f\u56e0\u53ca\u5176\u89e3\u51b3\u65b9\u6848\u3002<\/p>\n<h2 id=\"%e9%94%99%e8%af%af%e5%8e%9f%e5%9b%a0%e5%88%86%e6%9e%90-trBqAYMEgD\">\u9519\u8bef\u539f\u56e0\u5206\u6790<\/h2>\n<p>Oracle \u6570\u636e\u5e93\u7684\u5185\u5b58\u7ba1\u7406\u662f\u4e00\u4e2a\u590d\u6742\u7684\u8fc7\u7a0b\uff0c\u6d89\u53ca\u591a\u4e2a\u53c2\u6570\u7684\u914d\u7f6e\u3002<code>MEMORY_TARGET<\/code> \u548c <code>MEMORY_MAX_TARGET<\/code> \u662f\u7528\u4e8e\u81ea\u52a8\u5185\u5b58\u7ba1\u7406\u7684\u4e24\u4e2a\u91cd\u8981\u53c2\u6570\u3002\u5b83\u4eec\u7684\u4f5c\u7528\u662f\u5b9a\u4e49\u6570\u636e\u5e93\u53ef\u4ee5\u4f7f\u7528\u7684\u603b\u5185\u5b58\u91cf\uff0c\u800c <code>LOCK_SGA<\/code> \u5219\u662f\u4e00\u4e2a\u7528\u4e8e\u9501\u5b9a\u7cfb\u7edf\u5168\u5c40\u533a\uff08SGA\uff09\u5185\u5b58\u7684\u53c2\u6570\u3002<\/p>\n<p>\u5f53 <code>LOCK_SGA<\/code> \u88ab\u8bbe\u7f6e\u4e3a <code>TRUE<\/code> \u65f6\uff0cOracle \u5c06\u4e0d\u5141\u8bb8\u52a8\u6001\u8c03\u6574 SGA \u7684\u5927\u5c0f\u3002\u8fd9\u4e0e <code>MEMORY_TARGET<\/code> \u548c <code>MEMORY_MAX_TARGET<\/code> \u7684\u52a8\u6001\u8c03\u6574\u7279\u6027\u76f8\u51b2\u7a81\uff0c\u56e0\u6b64\u4f1a\u5bfc\u81f4 <code>ORA-00847<\/code> \u9519\u8bef\u7684\u53d1\u751f\u3002<\/p>\n<h2 id=\"%e8%a7%a3%e5%86%b3%e6%96%b9%e6%a1%88-trBqAYMEgD\">\u89e3\u51b3\u65b9\u6848<\/h2>\n<p>\u8981\u89e3\u51b3 <code>ORA-00847<\/code> \u9519\u8bef\uff0c\u7528\u6237\u9700\u8981\u6839\u636e\u5b9e\u9645\u9700\u6c42\u8c03\u6574\u6570\u636e\u5e93\u7684\u5185\u5b58\u914d\u7f6e\u3002\u4ee5\u4e0b\u662f\u51e0\u79cd\u5e38\u89c1\u7684\u89e3\u51b3\u65b9\u6848\uff1a<\/p>\n<h3 id=\"1-%e7%a6%81%e7%94%a8-lock_sga-trBqAYMEgD\">1. \u7981\u7528 LOCK_SGA<\/h3>\n<ul>\n<li>\u5982\u679c\u60a8\u5e0c\u671b\u4f7f\u7528 <code>MEMORY_TARGET<\/code> \u548c <code>MEMORY_MAX_TARGET<\/code>\uff0c\u53ef\u4ee5\u9009\u62e9\u7981\u7528 <code>LOCK_SGA<\/code>\u3002\u8fd9\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b SQL \u547d\u4ee4\u5b9e\u73b0\uff1a<\/li>\n<\/ul>\n<pre><code>ALTER SYSTEM SET LOCK_SGA=FALSE SCOPE=SPFILE;<\/code><\/pre>\n<p>\u6267\u884c\u5b8c\u4e0a\u8ff0\u547d\u4ee4\u540e\uff0c\u60a8\u9700\u8981\u91cd\u542f\u6570\u636e\u5e93\u4ee5\u4f7f\u66f4\u6539\u751f\u6548\u3002<\/p>\n<h3 id=\"2-%e4%bd%bf%e7%94%a8%e4%bc%a0%e7%bb%9f%e7%9a%84%e5%86%85%e5%ad%98%e7%ae%a1%e7%90%86-trBqAYMEgD\">2. \u4f7f\u7528\u4f20\u7edf\u7684\u5185\u5b58\u7ba1\u7406<\/h3>\n<ul>\n<li>\u5982\u679c\u60a8\u5e0c\u671b\u4fdd\u7559 <code>LOCK_SGA<\/code> \u7684\u8bbe\u7f6e\uff0c\u53ef\u4ee5\u9009\u62e9\u4e0d\u4f7f\u7528 <code>MEMORY_TARGET<\/code> \u548c <code>MEMORY_MAX_TARGET<\/code>\uff0c\u800c\u662f\u624b\u52a8\u914d\u7f6e <code>SGA_TARGET<\/code> \u548c <code>PGA_AGGREGATE_TARGET<\/code>\u3002\u4f8b\u5982\uff1a<\/li>\n<\/ul>\n<pre><code>ALTER SYSTEM SET SGA_TARGET=2G SCOPE=SPFILE;<\/code><\/pre>\n<pre><code>ALTER SYSTEM SET PGA_AGGREGATE_TARGET=1G SCOPE=SPFILE;<\/code><\/pre>\n<p>\u540c\u6837\uff0c\u6267\u884c\u5b8c\u8fd9\u4e9b\u547d\u4ee4\u540e\uff0c\u60a8\u9700\u8981\u91cd\u542f\u6570\u636e\u5e93\u3002<\/p>\n<h3 id=\"3-%e6%a3%80%e6%9f%a5%e5%8f%82%e6%95%b0%e8%ae%be%e7%bd%ae-trBqAYMEgD\">3. \u68c0\u67e5\u53c2\u6570\u8bbe\u7f6e<\/h3>\n<ul>\n<li>\u5728\u8fdb\u884c\u4efb\u4f55\u66f4\u6539\u4e4b\u524d\uff0c\u5efa\u8bae\u68c0\u67e5\u5f53\u524d\u7684\u53c2\u6570\u8bbe\u7f6e\uff0c\u4ee5\u786e\u4fdd\u6ca1\u6709\u5176\u4ed6\u51b2\u7a81\u3002\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u67e5\u770b\u5f53\u524d\u7684\u5185\u5b58\u8bbe\u7f6e\uff1a<\/li>\n<\/ul>\n<pre><code>SHOW PARAMETER MEMORY;<\/code><\/pre>\n<h2 id=\"%e6%80%bb%e7%bb%93-trBqAYMEgD\">\u603b\u7ed3<\/h2>\n<p>\u5728 Oracle \u6570\u636e\u5e93\u4e2d\uff0c<code>ORA-00847<\/code> \u9519\u8bef\u901a\u5e38\u662f\u7531\u4e8e <code>MEMORY_TARGET<\/code>\u3001<code>MEMORY_MAX_TARGET<\/code> \u548c <code>LOCK_SGA<\/code> \u4e4b\u95f4\u7684\u51b2\u7a81\u5f15\u8d77\u7684\u3002\u901a\u8fc7\u7981\u7528 <code>LOCK_SGA<\/code> \u6216\u8005\u9009\u62e9\u4f20\u7edf\u7684\u5185\u5b58\u7ba1\u7406\u65b9\u5f0f\uff0c\u7528\u6237\u53ef\u4ee5\u6709\u6548\u5730\u89e3\u51b3\u8fd9\u4e00\u95ee\u9898\u3002\u5bf9\u4e8e\u9700\u8981\u9ad8\u6548\u5185\u5b58\u7ba1\u7406\u7684\u7528\u6237\uff0c\u9009\u62e9\u5408\u9002\u7684\u5185\u5b58\u914d\u7f6e\u81f3\u5173\u91cd\u8981\u3002<\/p>\n<p>\u5982\u679c\u60a8\u5728\u5bfb\u627e\u9ad8\u6027\u80fd\u7684 <a href=\"https:\/\/server.hk\">\u9999\u6e2fVPS<\/a> \u89e3\u51b3\u65b9\u6848\uff0cServer.HK \u63d0\u4f9b\u591a\u79cd\u7075\u6d3b\u7684\u9009\u9879\uff0c\u6ee1\u8db3\u4e0d\u540c\u7528\u6237\u7684\u9700\u6c42\u3002\u65e0\u8bba\u662f\u4f01\u4e1a\u7ea7\u5e94\u7528\u8fd8\u662f\u4e2a\u4eba\u9879\u76ee\uff0c\u6211\u4eec\u7684 <a href=\"https:\/\/server.hk\">\u4e91\u670d\u52a1\u5668<\/a> \u90fd\u80fd\u4e3a\u60a8\u63d0\u4f9b\u7a33\u5b9a\u7684\u652f\u6301\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Learn how to resolve ORA-00847: MEMORY_TARGET\/MEMORY_MAX_TARGET and LOCK_SGA conflicts in Oracle. Expert remote troubleshooting tips included.<\/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-82201","post","type-post","status-publish","format-standard","hentry","category-database"],"_links":{"self":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/82201","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=82201"}],"version-history":[{"count":1,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/82201\/revisions"}],"predecessor-version":[{"id":82202,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/82201\/revisions\/82202"}],"wp:attachment":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/media?parent=82201"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/categories?post=82201"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/tags?post=82201"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}