1、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);

2、内存使用率;-- pctused: 使用率

select * from (

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);

3、查看内存应用的其它指标select * from v$sga_dynamic_components;

select * from v$pgastat;

-- 查问share pool的闲暇内存

select a.*,round(a.bytes/1024/1024,2) M from v$sgastat a where a.NAME = 'free memory';

-- 通过上面的sql查问占用share pool内存大于10M的sql

SELECT substr(sql_text,1,100) "Stmt", count(*),

sum(sharable_mem) "Mem",

sum(users_opening) "Open",

sum(executions) "Exec"

FROM v$sql

GROUP BY substr(sql_text,1,100)

HAVING sum(sharable_mem) > 10000000;

-- 查问一下version count过高的语句

SELECT address,

sql_id,

hash_value,

version_count,

users_opening,

users_executing,

sql_text

FROM v$sqlarea WHERE version_count > 10;

如何用oracle查看内存使用情况,oracle运维08内存使用情况分析查看相关推荐

  1. linux系统查看usb口,Linux运维知识之Linux系统下查看USB设备名及使用USB设备

    本文主要向大家介绍了Linux运维知识之Linux系统下查看USB设备名及使用USB设备,通过具体的内容向大家展现,希望对大家学习Linux运维知识有所帮助. 1.系统插入USB设备后,从控制台界面有 ...

  2. oracle dg 数据不一致,DG常用运维命令及常见问题解决

    DG常见运维命令及常见问题解决方法 l> DG库启动.关闭标准操作 Dataguard关闭 1).先取消日志应用 alter database recover managed standby d ...

  3. oracle根据记录添加bsm,【运维监控系统 PIGOSS BSM 】免费在线试用_软件库_选软件网...

    运维管理系统 PIGOSS BSM 不仅可以关联对业务云服务的监控,同时也基于与复杂异构的IT基础架构监控指标建立关联,针对服务器操作系统,数据库,中间件,webserver,企业应用.网络设备.网络 ...

  4. oracle最新版本是多少_运维日记|关于Oracle的补丁你需要知道的事

    各位新朋友-记得先点蓝字关注我哦- 之前一起熟悉了Oracle数据库的软件版本,服务周期,今天我们一起来了解下,Oracle发布的基础版本之上,常说的补丁到底是什么,有什么分类,经历了怎样的迭代. c ...

  5. 今晚直播丨用高效的Oracle性能诊断工具,让运维工作轻松起来!

    Oracle诊断性能问题时常用脚本工具 - 4月15日20:00 "工欲善其事,必先利其器",对于 Oracle 数据库性能诊断工作同样如此:在积累了一定数据库性能诊断经验的基础上 ...

  6. centos查看系统/硬件信息及运维常用命令

    [root@yan-001 ~] # uname -a # 查看内核/操作系统/CPU信息的linux系统信息命令 [root@yan-001 ~] # head -n 1 /etc/issue # ...

  7. linux查看进程占用pcu,Linux运维:如何使用ss代替netstat命令

    文章目录 [隐藏] netstat 的用法 ss 的用法 在运维和管理Linux服务器的时候,我们最常用的就是netstat命令,我常用这个命令来查看当前服务器上有哪些进程正在侦听端口,主要用来诊断网 ...

  8. 德付通:如何用日志助推航旅支付智能运维升级

    "互联网+"时代的到来对传统行业产生了深远影响,尤其是客户对服务和产品需求日益多样化的航旅业,作为其中最重要的环节之一,航旅支付业也面临着业务运维日志监管合规.安全性.可靠性的挑战 ...

  9. linux查看网络连接命令,系统运维|使用netstat检测及监测网络连接

    大家好,我是邪恶君子!今天,邪恶就给大家分享一下,使用小小的一个netstat命令,就能让你检测出系统是否处于安全状态!!! 这篇文档,复杂°:简单:难易°:易.坚决让小白都看得懂,学得会,掌握牢,上 ...

最新文章

  1. MATLAB从入门到精通-控制系统动态特性的计算以及阶跃响应波德图等
  2. 【PHP】IPv4与整数转换、IPv6与整数转换
  3. 上有硬核理论下能操刀AI落地,这里走出来的人都有“开挂人生”
  4. MyEclipse中快捷键的使用
  5. jquery 判断数据是否重复
  6. PAT1061 判断题 (15 分)
  7. 计算机网络3-DNS域名解析系统
  8. 算法笔记--KMP算法 EXKMP算法
  9. 用sed替换文件中的空格
  10. halcon视觉框架源码_图像处理与机器视觉初学者学习路线
  11. VB MSFlexGrid控件使用问题
  12. 线性代数知识荟萃(4)——矩阵相抵
  13. Google Test Primer(四)——简单测试
  14. 【模拟器】win 10:iTools 模拟器 ( iOS 模拟器) 下载与安装
  15. 微信小程序上传照片到服务器
  16. XML的四种解析方式
  17. 【过关斩将】面试官的八个举动,暗示你已经通过了面试
  18. Xp计算机同步时间,windows xp时间不准不能自动同步的解决办法
  19. C#去除gif图片水印的记录
  20. adb无线连接控制android手机

热门文章

  1. Discord 公司如何使用 Cassandra 存储上亿条线上数据
  2. 车联网上云最佳实践(二)
  3. 神经进化是深度学习的未来
  4. 金蝶发布2021年财报:云业务同比增44.2%,继续加码研发技术创新
  5. 数据结构是如何装入 CPU 寄存器的?
  6. 一部手机是否能用 7 年?苹果、三星、Google:三年差不多!
  7. 阿里工程师用 8 张图告诉你如何存储、管理泛内容数据
  8. 大厂必问的分布式究竟是什么鬼?
  9. 虚拟化精华问答 | 虚拟化会使管理更轻松吗?
  10. android系统手势app,8种iOS手势规定和14种android手势规定详解