{"id":82066,"date":"2024-10-16T18:37:18","date_gmt":"2024-10-16T10:37:18","guid":{"rendered":"https:\/\/server.hk\/cnblog\/82066\/"},"modified":"2024-10-16T18:37:19","modified_gmt":"2024-10-16T10:37:19","slug":"ora-00825-cannot-set-db_block_buffers-if-sga_target-or-memory_target-is-set-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\/82066\/","title":{"rendered":"ORA-00825: cannot set DB_BLOCK_BUFFERS if SGA_TARGET or MEMORY_TARGET is set ORACLE\u5831\u932f\u6545\u969c\u4fee\u5fa9\u9060\u7a0b\u8655\u7406"},"content":{"rendered":"<h1 id=\"ora-00825-%e7%84%a1%e6%b3%95%e8%a8%ad%e7%bd%ae-db_block_buffers-%e5%a6%82%e6%9e%9c-sga_target-%e6%88%96-memory_target-%e8%a2%ab%e8%a8%ad%e7%bd%ae-gOMLtnsbAi\">ORA-00825: \u7121\u6cd5\u8a2d\u7f6e DB_BLOCK_BUFFERS \u5982\u679c SGA_TARGET \u6216 MEMORY_TARGET \u88ab\u8a2d\u7f6e<\/h1>\n<p>\u5728\u4f7f\u7528 Oracle \u6578\u64da\u5eab\u6642\uff0c\u7ba1\u7406\u5167\u5b58\u914d\u7f6e\u662f\u78ba\u4fdd\u7cfb\u7d71\u7a69\u5b9a\u6027\u548c\u6027\u80fd\u7684\u95dc\u9375\u3002\u7576\u7528\u6236\u5617\u8a66\u8a2d\u7f6e <code>DB_BLOCK_BUFFERS<\/code> \u53c3\u6578\u6642\uff0c\u53ef\u80fd\u6703\u9047\u5230\u932f\u8aa4\u4fe1\u606f <strong>ORA-00825<\/strong>\uff0c\u8a72\u932f\u8aa4\u63d0\u793a\u300c\u7121\u6cd5\u8a2d\u7f6e DB_BLOCK_BUFFERS \u5982\u679c SGA_TARGET \u6216 MEMORY_TARGET \u88ab\u8a2d\u7f6e\u300d\u3002\u9019\u7bc7\u6587\u7ae0\u5c07\u6df1\u5165\u63a2\u8a0e\u8a72\u932f\u8aa4\u7684\u539f\u56e0\u53ca\u5176\u89e3\u6c7a\u65b9\u6848\u3002<\/p>\n<h2 id=\"%e9%8c%af%e8%aa%a4%e5%8e%9f%e5%9b%a0%e5%88%86%e6%9e%90-gOMLtnsbAi\">\u932f\u8aa4\u539f\u56e0\u5206\u6790<\/h2>\n<p>Oracle \u6578\u64da\u5eab\u4f7f\u7528\u7cfb\u7d71\u5168\u5c40\u5340\uff08SGA\uff09\u4f86\u7ba1\u7406\u5167\u5b58\u3002SGA \u5305\u542b\u591a\u500b\u7d44\u4ef6\uff0c\u5176\u4e2d\u5305\u62ec\u6578\u64da\u7de9\u885d\u5340\u3001\u5171\u4eab\u7de9\u885d\u5340\u548c\u5176\u4ed6\u5167\u5b58\u7d50\u69cb\u3002\u5f9e Oracle 11g \u958b\u59cb\uff0cOracle \u5f15\u5165\u4e86\u81ea\u52d5\u5167\u5b58\u7ba1\u7406\uff08AMM\uff09\uff0c\u9019\u4f7f\u5f97\u7528\u6236\u53ef\u4ee5\u901a\u904e\u8a2d\u7f6e <code>SGA_TARGET<\/code> \u6216 <code>MEMORY_TARGET<\/code> \u4f86\u81ea\u52d5\u8abf\u6574 SGA \u548c PGA\uff08\u7a0b\u5e8f\u5168\u5c40\u5340\uff09\u7684\u5927\u5c0f\u3002<\/p>\n<p>\u7576 <code>SGA_TARGET<\/code> \u6216 <code>MEMORY_TARGET<\/code> \u88ab\u8a2d\u7f6e\u6642\uff0cOracle \u5c07\u81ea\u52d5\u7ba1\u7406\u5167\u5b58\u7684\u5206\u914d\uff0c\u9019\u610f\u5473\u8457\u7528\u6236\u7121\u6cd5\u624b\u52d5\u8a2d\u7f6e <code>DB_BLOCK_BUFFERS<\/code> \u53c3\u6578\u3002\u9019\u662f\u56e0\u70ba <code>DB_BLOCK_BUFFERS<\/code> \u662f\u4e00\u500b\u904e\u6642\u7684\u53c3\u6578\uff0c\u8207\u81ea\u52d5\u5167\u5b58\u7ba1\u7406\u7684\u6a5f\u5236\u4e0d\u517c\u5bb9\u3002<\/p>\n<h2 id=\"%e8%a7%a3%e6%b1%ba%e6%96%b9%e6%a1%88-gOMLtnsbAi\">\u89e3\u6c7a\u65b9\u6848<\/h2>\n<p>\u8981\u89e3\u6c7a <strong>ORA-00825<\/strong> \u932f\u8aa4\uff0c\u60a8\u53ef\u4ee5\u9078\u64c7\u4ee5\u4e0b\u5e7e\u7a2e\u65b9\u6cd5\uff1a<\/p>\n<ul>\n<li><strong>\u7981\u7528\u81ea\u52d5\u5167\u5b58\u7ba1\u7406\uff1a<\/strong>\u5982\u679c\u60a8\u5e0c\u671b\u624b\u52d5\u8a2d\u7f6e <code>DB_BLOCK_BUFFERS<\/code>\uff0c\u5247\u9700\u8981\u7981\u7528 <code>SGA_TARGET<\/code> \u548c <code>MEMORY_TARGET<\/code>\u3002\u53ef\u4ee5\u901a\u904e\u4ee5\u4e0b SQL \u8a9e\u53e5\u4f86\u5be6\u73fe\uff1a<\/li>\n<pre><code>ALTER SYSTEM SET SGA_TARGET=0 SCOPE=SPFILE;\nALTER SYSTEM SET MEMORY_TARGET=0 SCOPE=SPFILE;<\/code><\/pre>\n<li><strong>\u4f7f\u7528\u81ea\u52d5\u5167\u5b58\u7ba1\u7406\uff1a<\/strong>\u5982\u679c\u60a8\u5e0c\u671b\u7e7c\u7e8c\u4f7f\u7528\u81ea\u52d5\u5167\u5b58\u7ba1\u7406\uff0c\u5247\u61c9\u8a72\u522a\u9664 <code>DB_BLOCK_BUFFERS<\/code> \u7684\u8a2d\u7f6e\u3002\u53ef\u4ee5\u901a\u904e\u4ee5\u4e0b SQL \u8a9e\u53e5\u4f86\u5be6\u73fe\uff1a<\/li>\n<pre><code>ALTER SYSTEM RESET DB_BLOCK_BUFFERS SCOPE=SPFILE;<\/code><\/pre>\n<li><strong>\u8abf\u6574\u5176\u4ed6\u5167\u5b58\u53c3\u6578\uff1a<\/strong>\u5728\u4f7f\u7528\u81ea\u52d5\u5167\u5b58\u7ba1\u7406\u6642\uff0c\u60a8\u53ef\u4ee5\u901a\u904e\u8abf\u6574 <code>SGA_TARGET<\/code> \u548c <code>PGA_AGGREGATE_TARGET<\/code> \u4f86\u512a\u5316\u6027\u80fd\uff0c\u800c\u4e0d\u9700\u8981\u8a2d\u7f6e <code>DB_BLOCK_BUFFERS<\/code>\u3002<\/li>\n<\/ul>\n<h2 id=\"%e6%9c%80%e4%bd%b3%e5%af%a6%e8%b8%90-gOMLtnsbAi\">\u6700\u4f73\u5be6\u8e10<\/h2>\n<p>\u5728\u914d\u7f6e Oracle \u6578\u64da\u5eab\u7684\u5167\u5b58\u6642\uff0c\u5efa\u8b70\u9075\u5faa\u4ee5\u4e0b\u6700\u4f73\u5be6\u8e10\uff1a<\/p>\n<ul>\n<li>\u5b9a\u671f\u76e3\u63a7\u5167\u5b58\u4f7f\u7528\u60c5\u6cc1\uff0c\u78ba\u4fdd\u7cfb\u7d71\u6027\u80fd\u6700\u4f73\u3002<\/li>\n<li>\u6839\u64da\u61c9\u7528\u7a0b\u5e8f\u7684\u9700\u6c42\u8abf\u6574 <code>SGA_TARGET<\/code> \u548c <code>PGA_AGGREGATE_TARGET<\/code>\u3002<\/li>\n<li>\u5728\u9032\u884c\u4efb\u4f55\u5167\u5b58\u914d\u7f6e\u66f4\u6539\u4e4b\u524d\uff0c\u52d9\u5fc5\u5099\u4efd\u6578\u64da\u5eab\u3002<\/li>\n<\/ul>\n<h2 id=\"%e7%b8%bd%e7%b5%90-gOMLtnsbAi\">\u7e3d\u7d50<\/h2>\n<p>\u5728 Oracle \u6578\u64da\u5eab\u4e2d\uff0c\u9047\u5230 <strong>ORA-00825<\/strong> \u932f\u8aa4\u901a\u5e38\u662f\u7531\u65bc <code>DB_BLOCK_BUFFERS<\/code> \u8207\u81ea\u52d5\u5167\u5b58\u7ba1\u7406\u7684\u885d\u7a81\u6240\u5f15\u8d77\u7684\u3002\u901a\u904e\u7981\u7528\u81ea\u52d5\u5167\u5b58\u7ba1\u7406\u6216\u522a\u9664 <code>DB_BLOCK_BUFFERS<\/code> \u7684\u8a2d\u7f6e\uff0c\u53ef\u4ee5\u6709\u6548\u89e3\u6c7a\u6b64\u554f\u984c\u3002\u4e86\u89e3\u5167\u5b58\u914d\u7f6e\u7684\u6700\u4f73\u5be6\u8e10\u5c07\u6709\u52a9\u65bc\u63d0\u9ad8\u6578\u64da\u5eab\u7684\u6027\u80fd\u548c\u7a69\u5b9a\u6027\u3002<\/p>\n<p>\u5982\u679c\u60a8\u9700\u8981\u66f4\u591a\u6709\u95dc <a href=\"https:\/\/server.hk\">\u9999\u6e2fVPS<\/a> \u53ca\u5176\u914d\u7f6e\u7684\u8cc7\u8a0a\uff0c\u8acb\u8a2a\u554f\u6211\u5011\u7684\u7db2\u7ad9\u4ee5\u7372\u53d6\u66f4\u591a\u8a73\u7d30\u8cc7\u6599\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Learn how to resolve ORA-00825 error in Oracle when DB_BLOCK_BUFFERS cannot be set due to SGA_TARGET or MEMORY_TARGET configurations.<\/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-82066","post","type-post","status-publish","format-standard","hentry","category-database"],"_links":{"self":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/82066","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=82066"}],"version-history":[{"count":1,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/82066\/revisions"}],"predecessor-version":[{"id":82067,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/82066\/revisions\/82067"}],"wp:attachment":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/media?parent=82066"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/categories?post=82066"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/tags?post=82066"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}