{"id":372,"date":"2012-09-03T02:40:32","date_gmt":"2012-09-03T02:40:32","guid":{"rendered":"http:\/\/oranotes.tuktaroff.com\/?page_id=372"},"modified":"2012-09-03T02:40:32","modified_gmt":"2012-09-03T02:40:32","slug":"sga","status":"publish","type":"page","link":"http:\/\/oranotes.tuktaroff.com\/?page_id=372","title":{"rendered":"SGA"},"content":{"rendered":"<p><code><br \/>\n<script type=\"text\/javascript\"> \nfunction copy(what) {\n    window.clipboardData.setData('Text',what.value);\n}\nfunction paste(what) {\n    what.value = window.clipboardData.getData('Text');\n}\n<\/script><\/p>\n<h2>\nSGA usage<br \/>\n<\/h2>\n<pre class=\"qcode\">\r\nSET LINESIZE 145\r\nSET PAGESIZE 9999\r\nSET FEEDBACK off\r\nSET VERIFY   off\r\n\r\nCOLUMN bytes   FORMAT  999,999,999\r\nCOLUMN percent FORMAT  999.99999\r\n\r\nbreak on report\r\n\r\ncompute sum of bytes on report\r\ncompute sum of percent on report\r\n\r\nSELECT\r\n    a.name\r\n  , a.bytes\r\n  , a.bytes\/(b.sum_bytes*100)  Percent  \r\nFROM sys.v_$sgastat a\r\n   , (SELECT SUM(value)sum_bytes FROM sys.v_$sga) b \r\nORDER BY bytes DESC\r\n\/\r\n<\/pre>\n<form action=\"\"><textarea name=\"data\" cols=\"50\" rows=\"10\" style=\"display:none;\"><br \/>\nSET LINESIZE 145<br \/>\nSET PAGESIZE 9999<br \/>\nSET FEEDBACK off<br \/>\nSET VERIFY   off<\/p>\n<p>COLUMN bytes   FORMAT  999,999,999<br \/>\nCOLUMN percent FORMAT  999.99999<\/p>\n<p>break on report<\/p>\n<p>compute sum of bytes on report<br \/>\ncompute sum of percent on report<\/p>\n<p>SELECT<br \/>\n    a.name<br \/>\n  , a.bytes<br \/>\n  , a.bytes\/(b.sum_bytes*100)  Percent<br \/>\nFROM sys.v_$sgastat a<br \/>\n   , (SELECT SUM(value)sum_bytes FROM sys.v_$sga) b<br \/>\nORDER BY bytes DESC<br \/>\n\/<br \/>\n<\/textarea><input type=\"button\" value=\"Clipboard\" onclick=\"copy(this.form.data)\"><\/form>\n<h2>\nSGA free pool<br \/>\n<\/h2>\n<pre class=\"qcode\">\r\nCOLUMN pool    HEADING \"Pool\"\r\nCOLUMN name    HEADING \"Name\"\r\nCOLUMN sgasize HEADING \"Allocated\" FORMAT 999,999,999\r\nCOLUMN bytes   HEADING \"Free\" FORMAT 999,999,999\r\n\r\nSELECT\r\n    f.pool\r\n  , f.name\r\n  , s.sgasize\r\n  , f.bytes\r\n  , ROUND(f.bytes\/s.sgasize*100, 2) \"% Free\"\r\nFROM\r\n    (SELECT SUM(bytes) sgasize, pool FROM v$sgastat GROUP BY pool) s\r\n  , v$sgastat f\r\nWHERE\r\n    f.name = 'free memory'\r\n  AND f.pool = s.pool\r\n\/\r\n<\/pre>\n<form action=\"\"><textarea name=\"data\" cols=\"50\" rows=\"10\" style=\"display:none;\"><br \/>\nCOLUMN pool    HEADING \"Pool\"<br \/>\nCOLUMN name    HEADING \"Name\"<br \/>\nCOLUMN sgasize HEADING \"Allocated\" FORMAT 999,999,999<br \/>\nCOLUMN bytes   HEADING \"Free\" FORMAT 999,999,999<\/p>\n<p>SELECT<br \/>\n    f.pool<br \/>\n  , f.name<br \/>\n  , s.sgasize<br \/>\n  , f.bytes<br \/>\n  , ROUND(f.bytes\/s.sgasize*100, 2) \"% Free\"<br \/>\nFROM<br \/>\n    (SELECT SUM(bytes) sgasize, pool FROM v$sgastat GROUP BY pool) s<br \/>\n  , v$sgastat f<br \/>\nWHERE<br \/>\n    f.name = 'free memory'<br \/>\n  AND f.pool = s.pool<br \/>\n\/<br \/>\n<\/textarea><input type=\"button\" value=\"Clipboard\" onclick=\"copy(this.form.data)\"><\/form>\n<p><\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>SGA usage SET LINESIZE 145 SET PAGESIZE 9999 SET FEEDBACK off SET VERIFY off COLUMN bytes FORMAT 999,999,999 COLUMN percent FORMAT 999.99999 break on report compute sum of bytes on report compute sum of percent on report SELECT a.name , a.bytes , a.bytes\/(b.sum_bytes*100) Percent FROM sys.v_$sgastat a , (SELECT SUM(value)sum_bytes FROM sys.v_$sga) b ORDER BY [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":63,"menu_order":0,"comment_status":"closed","ping_status":"open","template":"","meta":{"footnotes":""},"class_list":["post-372","page","type-page","status-publish","hentry"],"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/P2NVny-60","_links":{"self":[{"href":"http:\/\/oranotes.tuktaroff.com\/index.php?rest_route=\/wp\/v2\/pages\/372","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/oranotes.tuktaroff.com\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"http:\/\/oranotes.tuktaroff.com\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"http:\/\/oranotes.tuktaroff.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/oranotes.tuktaroff.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=372"}],"version-history":[{"count":1,"href":"http:\/\/oranotes.tuktaroff.com\/index.php?rest_route=\/wp\/v2\/pages\/372\/revisions"}],"predecessor-version":[{"id":373,"href":"http:\/\/oranotes.tuktaroff.com\/index.php?rest_route=\/wp\/v2\/pages\/372\/revisions\/373"}],"up":[{"embeddable":true,"href":"http:\/\/oranotes.tuktaroff.com\/index.php?rest_route=\/wp\/v2\/pages\/63"}],"wp:attachment":[{"href":"http:\/\/oranotes.tuktaroff.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=372"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}