查看SGA和PGA使用率
select name,total,round(total-free,2) used, round(free,2) free,round((total-free)/total*100,2) pctused from (select 'SGA' name,(select sum(value/1024/1024) from v$sga) total, (select sum(bytes/1024/1024) from v$sgastat where name='free memory')free from dual) union select name,total,round(used,2)used,round(total-used,2)free,round(used/total*100,2)pctused from ( select 'PGA' name,(select value/1024/1024 total from v$pgastat where name='aggregate PGA target parameter')total, (select value/1024/1024 used from v$pgastat where name='total PGA allocated')used from dual) union select name,round(total,2) total,round((total-free),2) used,round(free,2) free,round((total-free)/total*100,2) pctused from ( select 'Shared pool' name,(select sum(bytes/1024/1024) from v$sgastat where pool='shared pool')total, (select bytes/1024/1024 from v$sgastat where name='free memory' and pool='shared pool') free from dual) union select name,round(total,2)total,round(total-free,2) used,round(free,2) free,round((total-free)/total,2) pctused from ( select 'Default pool' name,( select a.cnum_repl*(select value from v$parameter where name='db_block_size')/1024/1024 total from x$kcbwds a, v$buffer_pool p where a.set_id=p.LO_SETID and p.name='DEFAULT' and p.block_size=(select value from v$parameter where name='db_block_size')) total, (select a.anum_repl*(select value from v$parameter where name='db_block_size')/1024/1024 free from x$kcbwds a, v$buffer_pool p where a.set_id=p.LO_SETID and p.name='DEFAULT' and p.block_size=(select value from v$parameter where name='db_block_size')) free from dual) union select name,nvl(round(total,2),0)total,nvl(round(total-free,2),0) used,nvl(round(free,2),0) free,nvl(round((total-free)/total,2),0) pctused from ( select 'KEEP pool' name,(select a.cnum_repl*(select value from v$parameter where name='db_block_size')/1024/1024 total from x$kcbwds a, v$buffer_pool p where a.set_id=p.LO_SETID and p.name='KEEP' and p.block_size=(select value from v$parameter where name='db_block_size')) total, (select a.anum_repl*(select value from v$parameter where name='db_block_size')/1024/1024 free from x$kcbwds a, v$buffer_pool p where a.set_id=p.LO_SETID and p.name='KEEP' and p.block_size=(select value from v$parameter where name='db_block_size')) free from dual) union select name,nvl(round(total,2),0)total,nvl(round(total-free,2),0) used,nvl(round(free,2),0) free,nvl(round((total-free)/total,2),0) pctused from ( select 'RECYCLE pool' name,( select a.cnum_repl*(select value from v$parameter where name='db_block_size')/1024/1024 total from x$kcbwds a, v$buffer_pool p where a.set_id=p.LO_SETID and p.name='RECYCLE' and p.block_size=(select value from v$parameter where name='db_block_size')) total, (select a.anum_repl*(select value from v$parameter where name='db_block_size')/1024/1024 free from x$kcbwds a, v$buffer_pool p where a.set_id=p.LO_SETID and p.name='RECYCLE' and p.block_size=(select value from v$parameter where name='db_block_size')) free from dual) union select name,nvl(round(total,2),0)total,nvl(round(total-free,2),0) used,nvl(round(free,2),0) free,nvl(round((total-free)/total,2),0) pctused from( select 'DEFAULT 16K buffer cache' name,(select a.cnum_repl*16/1024 total from x$kcbwds a, v$buffer_pool p where a.set_id=p.LO_SETID and p.name='DEFAULT' and p.block_size=16384) total, (select a.anum_repl*16/1024 free from x$kcbwds a, v$buffer_pool p where a.set_id=p.LO_SETID and p.name='DEFAULT' and p.block_size=16384) free from dual) union select name,nvl(round(total,2),0)total,nvl(round(total-free,2),0) used,nvl(round(free,2),0) free,nvl(round((total-free)/total,2),0) pctused from( select 'DEFAULT 32K buffer cache' name,(select a.cnum_repl*32/1024 total from x$kcbwds a, v$buffer_pool p where a.set_id=p.LO_SETID and p.name='DEFAULT' and p.block_size=32768) total, (select a.anum_repl*32/1024 free from x$kcbwds a, v$buffer_pool p where a.set_id=p.LO_SETID and p.name='DEFAULT' and p.block_size=32768) free from dual) union select name,total,total-free used,free, (total-free)/total*100 pctused from ( select 'Java Pool' name,(select sum(bytes/1024/1024) total from v$sgastat where pool='java pool' group by pool)total, ( select bytes/1024/1024 free from v$sgastat where pool='java pool' and name='free memory')free from dual) union select name,Round(total,2),round(total-free,2) used,round(free,2) free, round((total-free)/total*100,2) pctused from ( select 'Large Pool' name,(select sum(bytes/1024/1024) total from v$sgastat where pool='large pool' group by pool)total, ( select bytes/1024/1024 free from v$sgastat where pool='large pool' and name='free memory')free from dual) order by pctused desc; |
查看SGA和PGA使用率的更多相关文章
- oracle实例内存(SGA和PGA)调整
修改oracle内存占用 >show parameter sga; (查看内存占用情况) NAME TYPE ...
- oracle实例内存(SGA和PGA)调整-xin
一.名词解释 (1)SGA:System Global Area是Oracle Instance的基本组成部分,在实例启动时分配;系统全局域SGA主要由三部分构成:共享池.数据缓冲区.日志缓冲区. ( ...
- 对oracle实例的内存(SGA和PGA)进行调整,优化数据库性
一.名词解释 (1)SGA:SystemGlobal Area是OracleInstance的基本组成部分,在实例启动时分配;系统全局域SGA主要由三部分构成:共享池.数据缓冲区.日志缓冲区. (2) ...
- oracle实例的内存(SGA和PGA)调整,优化数据库性能
一.名词解释 (1)SGA:SystemGlobal Area是OracleInstance的基本组成部分,在实例启动时分配;系统全局域SGA主要由三部分构成:共享池.数据缓冲区.日志缓冲区. (2) ...
- oracle12c之 控制pdb中sga 与 pga 内存使用
Memory Management using Resource Manager Oracle数据库资源管理器(资源管理器)现在可以在多租户容器数据库(CDB)中管理可插入数据库(PDBs)之间的内存 ...
- oracle12c之二 控制PDB中SGA 与 PGA 内存使用
oracle12c之 控制pdb中sga 与 pga 内存使用 Memory Management using Resource Manager Oracle数据库资源管理器(资源管理器)现在可以在多 ...
- 修改Oracle数据库SGA和PGA大小
SGA的大小:一般物理内存20%用作操作系统保留,其他80%用于数据库.SGA普通数据库可以分配40%-60%之间,PGA可以分配20%-40%之间.1.以dba身份登录并查看SGA信息:SQL> ...
- Oracle sga、pga介绍改动
oracle推荐OLTP(on-line TransactionProcessing)系统oracle占系统总内存的80%,然后再分配80%给SGA,20%给PGA.也就是 SGA=system_to ...
- Oracle 自己主动内存管理 SGA、PGA 具体解释
ASMM自己主动共享内存管理: 自己主动依据工作量变化调整 最大程度地提高内存利用率 有助于消除内存不足的错误 SYS@PROD>show parameter sga NAME ...
随机推荐
- xshell连接本地Linux虚拟机!
终端输入ifconfig获取本地虚拟机的IP地址; 安装openssh-server sudo apt-get install openssh-server 查看server是否启动: ps -ef ...
- HDOJ-1754(简单线段树)
最近开始重新学习线段树,先从最简单的开始吧! I Hate It Time Limit: 9000/3000 MS (Java/Others) Memory Limit: 32768/32768 ...
- 为什么要设置Java环境变量(详解)
关于java环境变量配置讲解: 1. PATH环境变量.作用是指定命令搜索路径,在shell下面执行命令时,它会到PATH变量所指定的路径中查找看是否能找到相应的命令程序.我们需要把 jdk安装目录下 ...
- C# 文件粉碎
>文件粉碎的流程 填充文件 更改最后使用/创建时间 更改名称 将大小改为 0 kb 删除 using System; using System.Collections.Generic; usin ...
- boost::xml————又一次失败的尝试
尝试使用wptree来进行xml解析,又一次失败了,可以正常读取正常输出,但是使用wptree进行节点读取失败(乱码) 请看源码: DealXml.h #pragma once #include &l ...
- 速卖通api--获取商品信息
<? $productId = 'xxxx';//你的产品id $access_token = 'xxxxx';//你的授权码 $appSecret = 'xxxx';/ ...
- npm 好用工具 for 前端
1. caniuse npm install -g caniuse-cmd
- 我也来玩玩WinForm~BeginInvoke让用户体验更好!
前言 先说明一下,本人不太做winform的项目,工作10年以来,一直奋斗在webform的舞台上,今天有机会也接触了一下winform,下面对工作中用到的BeginInvoke方法作一下说明,和大家 ...
- 关于手机端CSS Sprite图标定位的一些领悟
今天在某个群里面闲逛,看见一个童鞋分享了一个携程的移动端的页面.地址这里我也分享下吧:http://m.ctrip.com/html5/在手机端我都很少用雪碧图合并定位图标,用的比较多就是用字体图标来 ...
- php 常用
零:重要的PHP超级全局变量 1.$_SERVER $_SERVER超级全局变量包含由web服务器创建的信息,它提供了服务器和客户配置及当前请求环境的有关信息.根据服务器不同,$_SERVER中的变量 ...