{"id":95386,"date":"2024-10-20T00:37:16","date_gmt":"2024-10-19T16:37:16","guid":{"rendered":"https:\/\/server.hk\/cnblog\/95386\/"},"modified":"2024-10-20T00:37:16","modified_gmt":"2024-10-19T16:37:16","slug":"oracle%e4%ba%8b%e4%be%8b%e4%b8%adsystem-global-areasga%e4%bb%8b%e7%b4%b9","status":"publish","type":"post","link":"https:\/\/server.hk\/cnblog\/95386\/","title":{"rendered":"Oracle\u4e8b\u4f8b\u4e2dSystem Global Area(SGA)\u4ecb\u7d39"},"content":{"rendered":"<h1 id=\"oracle%e4%ba%8b%e4%be%8b%e4%b8%adsystem-global-areasga%e4%bb%8b%e7%b4%b9-ILaUkOUpWG\">Oracle\u4e8b\u4f8b\u4e2dSystem Global Area(SGA)\u4ecb\u7d39<\/h1>\n<p>\u5728Oracle\u6578\u64da\u5eab\u4e2d\uff0cSystem Global Area\uff08SGA\uff09\u662f\u4e00\u500b\u91cd\u8981\u7684\u5167\u5b58\u7d50\u69cb\uff0c\u8ca0\u8cac\u5b58\u5132\u6578\u64da\u5eab\u7684\u5171\u4eab\u4fe1\u606f\u3002SGA\u7684\u8a2d\u8a08\u65e8\u5728\u63d0\u9ad8\u6578\u64da\u5eab\u7684\u6027\u80fd\u548c\u6548\u7387\uff0c\u4e26\u78ba\u4fdd\u591a\u500b\u7528\u6236\u80fd\u5920\u540c\u6642\u8a2a\u554f\u6578\u64da\u800c\u4e0d\u6703\u4e92\u76f8\u5e72\u64fe\u3002\u672c\u6587\u5c07\u6df1\u5165\u63a2\u8a0eSGA\u7684\u7d44\u6210\u90e8\u5206\u3001\u529f\u80fd\u53ca\u5176\u5728Oracle\u6578\u64da\u5eab\u4e2d\u7684\u91cd\u8981\u6027\u3002<\/p>\n<h2 id=\"sga%e7%9a%84%e7%b5%84%e6%88%90%e9%83%a8%e5%88%86-ILaUkOUpWG\">SGA\u7684\u7d44\u6210\u90e8\u5206<\/h2>\n<p>SGA\u7531\u591a\u500b\u7d44\u4ef6\u7d44\u6210\uff0c\u6bcf\u500b\u7d44\u4ef6\u90fd\u6709\u5176\u7279\u5b9a\u7684\u529f\u80fd\u3002\u4e3b\u8981\u7d44\u4ef6\u5305\u62ec\uff1a<\/p>\n<ul>\n<li><strong>\u6578\u64da\u7de9\u885d\u5340\u7de9\u5b58\uff08Database Buffer Cache\uff09<\/strong>: \u7528\u65bc\u5b58\u5132\u6700\u8fd1\u8a2a\u554f\u7684\u6578\u64da\u584a\uff0c\u5f9e\u800c\u6e1b\u5c11\u78c1\u789fI\/O\u64cd\u4f5c\uff0c\u63d0\u9ad8\u67e5\u8a62\u6027\u80fd\u3002<\/li>\n<li><strong>\u5171\u4eab\u6c60\uff08Shared Pool\uff09<\/strong>: \u5305\u542bSQL\u8a9e\u53e5\u3001PL\/SQL\u7a0b\u5e8f\u548c\u6578\u64da\u5b57\u5178\u4fe1\u606f\uff0c\u5e6b\u52a9\u63d0\u9ad8SQL\u57f7\u884c\u7684\u6548\u7387\u3002<\/li>\n<li><strong>\u91cd\u505a\u65e5\u8a8c\u7de9\u885d\u5340\uff08Redo Log Buffer\uff09<\/strong>: \u7528\u65bc\u5b58\u5132\u672a\u5beb\u5165\u78c1\u789f\u7684\u91cd\u505a\u65e5\u8a8c\uff0c\u78ba\u4fdd\u6578\u64da\u7684\u6301\u4e45\u6027\u548c\u6062\u5fa9\u80fd\u529b\u3002<\/li>\n<li><strong>Java\u6c60\uff08Java Pool\uff09<\/strong>: \u7528\u65bc\u5b58\u5132Java\u5c0d\u8c61\u548c\u4ee3\u78bc\uff0c\u652f\u6301Oracle\u6578\u64da\u5eab\u4e2d\u7684Java\u61c9\u7528\u3002<\/li>\n<li><strong>\u5927\u578b\u6c60\uff08Large Pool\uff09<\/strong>: \u7528\u65bc\u652f\u6301\u5927\u898f\u6a21\u7684\u6578\u64da\u64cd\u4f5c\uff0c\u5982\u5927\u6279\u91cf\u7684\u6578\u64da\u52a0\u8f09\u548c\u5099\u4efd\u64cd\u4f5c\u3002<\/li>\n<\/ul>\n<h2 id=\"sga%e7%9a%84%e5%8a%9f%e8%83%bd-ILaUkOUpWG\">SGA\u7684\u529f\u80fd<\/h2>\n<p>SGA\u7684\u4e3b\u8981\u529f\u80fd\u5305\u62ec\uff1a<\/p>\n<ul>\n<li><strong>\u63d0\u9ad8\u6027\u80fd<\/strong>: \u901a\u904e\u7de9\u5b58\u5e38\u7528\u6578\u64da\uff0cSGA\u80fd\u5920\u986f\u8457\u6e1b\u5c11\u78c1\u789fI\/O\uff0c\u5f9e\u800c\u63d0\u9ad8\u67e5\u8a62\u548c\u6578\u64da\u8655\u7406\u7684\u901f\u5ea6\u3002<\/li>\n<li><strong>\u652f\u6301\u591a\u7528\u6236\u8a2a\u554f<\/strong>: SGA\u7684\u5171\u4eab\u7279\u6027\u5141\u8a31\u591a\u500b\u7528\u6236\u540c\u6642\u8a2a\u554f\u6578\u64da\uff0c\u9019\u5c0d\u65bc\u9ad8\u4e26\u767c\u7684\u61c9\u7528\u5834\u666f\u81f3\u95dc\u91cd\u8981\u3002<\/li>\n<li><strong>\u6578\u64da\u4e00\u81f4\u6027<\/strong>: SGA\u4e2d\u7684\u91cd\u505a\u65e5\u8a8c\u7de9\u885d\u5340\u78ba\u4fdd\u4e86\u6578\u64da\u7684\u6301\u4e45\u6027\u548c\u4e00\u81f4\u6027\uff0c\u5373\u4f7f\u5728\u7cfb\u7d71\u6545\u969c\u7684\u60c5\u6cc1\u4e0b\u4e5f\u80fd\u5920\u6062\u5fa9\u6578\u64da\u3002<\/li>\n<\/ul>\n<h2 id=\"sga%e7%9a%84%e9%85%8d%e7%bd%ae-ILaUkOUpWG\">SGA\u7684\u914d\u7f6e<\/h2>\n<p>\u5728Oracle\u6578\u64da\u5eab\u4e2d\uff0cSGA\u7684\u5927\u5c0f\u548c\u7d44\u6210\u53ef\u4ee5\u6839\u64da\u5177\u9ad4\u9700\u6c42\u9032\u884c\u914d\u7f6e\u3002\u7528\u6236\u53ef\u4ee5\u901a\u904e\u4fee\u6539\u521d\u59cb\u5316\u53c3\u6578\u4f86\u8abf\u6574SGA\u7684\u5927\u5c0f\u3002\u4f8b\u5982\uff0c\u4ee5\u4e0b\u662f\u4e00\u4e9b\u5e38\u7528\u7684\u521d\u59cb\u5316\u53c3\u6578\uff1a<\/p>\n<pre><code>\nSGA_TARGET = 2G\nSGA_MAX_SIZE = 4G\n<\/code><\/pre>\n<p>\u9019\u4e9b\u53c3\u6578\u53ef\u4ee5\u5728\u6578\u64da\u5eab\u555f\u52d5\u6642\u9032\u884c\u8a2d\u7f6e\uff0c\u4e26\u4e14\u53ef\u4ee5\u6839\u64da\u7cfb\u7d71\u7684\u6027\u80fd\u9700\u6c42\u9032\u884c\u8abf\u6574\u3002\u5408\u7406\u7684SGA\u914d\u7f6e\u80fd\u5920\u986f\u8457\u63d0\u9ad8\u6578\u64da\u5eab\u7684\u6027\u80fd\u3002<\/p>\n<h2 id=\"sga%e7%9a%84%e7%9b%a3%e6%8e%a7-ILaUkOUpWG\">SGA\u7684\u76e3\u63a7<\/h2>\n<p>\u70ba\u4e86\u78ba\u4fddSGA\u7684\u6709\u6548\u904b\u884c\uff0cOracle\u63d0\u4f9b\u4e86\u4e00\u4e9b\u5de5\u5177\u548c\u8996\u5716\u4f86\u76e3\u63a7SGA\u7684\u4f7f\u7528\u60c5\u6cc1\u3002\u4f8b\u5982\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0bSQL\u67e5\u8a62\u4f86\u6aa2\u67e5SGA\u7684\u4f7f\u7528\u60c5\u6cc1\uff1a<\/p>\n<pre><code>\nSELECT * FROM V$SGA;\n<\/code><\/pre>\n<p>\u9019\u500b\u67e5\u8a62\u5c07\u8fd4\u56deSGA\u7684\u5404\u500b\u7d44\u4ef6\u7684\u5927\u5c0f\u548c\u4f7f\u7528\u60c5\u6cc1\uff0c\u5e6b\u52a9\u6578\u64da\u5eab\u7ba1\u7406\u54e1\u9032\u884c\u6027\u80fd\u8abf\u512a\u3002<\/p>\n<h2 id=\"%e7%b5%90%e8%ab%96-ILaUkOUpWG\">\u7d50\u8ad6<\/h2>\n<p>System Global Area\uff08SGA\uff09\u5728Oracle\u6578\u64da\u5eab\u4e2d\u626e\u6f14\u8457\u81f3\u95dc\u91cd\u8981\u7684\u89d2\u8272\u3002\u5b83\u4e0d\u50c5\u63d0\u9ad8\u4e86\u6578\u64da\u5eab\u7684\u6027\u80fd\uff0c\u9084\u652f\u6301\u591a\u7528\u6236\u7684\u9ad8\u6548\u8a2a\u554f\u3002\u901a\u904e\u5408\u7406\u7684\u914d\u7f6e\u548c\u76e3\u63a7\uff0c\u6578\u64da\u5eab\u7ba1\u7406\u54e1\u53ef\u4ee5\u78ba\u4fddSGA\u7684\u6700\u4f73\u904b\u884c\u72c0\u614b\uff0c\u5f9e\u800c\u63d0\u5347\u6574\u9ad4\u7cfb\u7d71\u7684\u6548\u7387\u3002<\/p>\n<p>\u5982\u9700\u4e86\u89e3\u66f4\u591a\u6709\u95dc<code>VPS<\/code>\u3001<code>\u9999\u6e2fVPS<\/code>\u53ca\u5176\u4ed6<code>\u670d\u52a1\u5668<\/code>\u7684\u8cc7\u8a0a\uff0c\u8acb\u8a2a\u554f\u6211\u5011\u7684\u7db2\u7ad9 <a href=\"https:\/\/server.hk\">Server.HK<\/a>\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e86\u89e3Oracle\u4e8b\u4f8b\u4e2dSystem Global Area(SGA)\u7684\u529f\u80fd\u8207\u91cd\u8981\u6027\uff0c\u638c\u63e1\u5176\u5728\u6578\u64da\u5eab\u6027\u80fd\u4e2d\u7684\u95dc\u9375\u89d2\u8272\u3002<\/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-95386","post","type-post","status-publish","format-standard","hentry","category-database"],"_links":{"self":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/95386","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=95386"}],"version-history":[{"count":1,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/95386\/revisions"}],"predecessor-version":[{"id":95387,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/95386\/revisions\/95387"}],"wp:attachment":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/media?parent=95386"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/categories?post=95386"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/tags?post=95386"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}