程序员

分享几个常用的Oracle 11g内存视图脚本

作者:admin 2021-06-09 我要评论

今天主要分享几个关于Oracle数据库的内存视图的脚本,仅供参考。 一、V$MEMORY_DYNAMIC_COMPONENTS V$MEMORY_DYNAMIC_COMPONENTSdisplaysinformationaboutthedyn...

在说正事之前,我要推荐一个福利:你还在原价购买阿里云、腾讯云、华为云服务器吗?那太亏啦!来这里,新购、升级、续费都打折,能够为您省60%的钱呢!2核4G企业级云服务器低至69元/年,点击进去看看吧>>>)

今天主要分享几个关于Oracle数据库的内存视图的脚本,仅供参考。

一、V$MEMORY_DYNAMIC_COMPONENTS

  1. V$MEMORY_DYNAMIC_COMPONENTS displays information about the dynamic SGA components. This view summarizes information based on all completed SGA resize operations since instance startup. All sizes are expressed in bytes. 

分享几个常用的oracle 11g内存视图脚本

分享几个常用的oracle 11g内存视图脚本

脚本: Provides information about dynamic memory components.

  1. COLUMN component FORMAT A30 
  2. ​ 
  3. SELECT component, 
  4.  ROUND(current_size/1024/1024) AS current_size_mb, 
  5.  ROUND(min_size/1024/1024) AS min_size_mb, 
  6.  ROUND(max_size/1024/1024) AS max_size_mb 
  7. FROM v$memory_dynamic_components 
  8. WHERE current_size != 0 
  9. ORDER BY component; 

分享几个常用的oracle 11g内存视图脚本

二、V$MEMORY_RESIZE_OPS

  1. V$MEMORY_RESIZE_OPS displays information about the last 800 completed memory resize operations (both automatic and manual). This does not include in-progress operations. All sizes are expressed in bytes. 

分享几个常用的oracle 11g内存视图脚本

分享几个常用的oracle 11g内存视图脚本

脚本:Provides information about memory resize operations.

  1. SET LINESIZE 200 
  2. COLUMN parameter FORMAT A25 
  3. SELECT start_time, 
  4.  end_time, 
  5.  component, 
  6.  oper_type, 
  7.  oper_mode, 
  8.  parameter, 
  9.  ROUND(initial_size/1024/1024) AS initial_size_mb, 
  10.  ROUND(target_size/1024/1024) AS target_size_mb, 
  11.  ROUND(final_size/1024/1024) AS final_size_mb, 
  12.  status 
  13. FROM v$memory_resize_ops 
  14. ORDER BY start_time; 

分享几个常用的oracle 11g内存视图脚本

三、V$MEMORY_TARGET_ADVICE

  1. V$MEMORY_TARGET_ADVICE provides information about how the MEMORY_TARGET parameter should be sized based on current sizing and satisfaction metrics. 

分享几个常用的oracle 11g内存视图脚本

脚本3: Provides information to help tune the MEMORY_TARGET parameter.

  1. SELECT * FROM v$memory_target_advice ORDER BY memory_size; 

分享几个常用的oracle 11g内存视图脚本


本文转载自网络,原文链接:https://www.toutiao.com/i6753593371719107085/

版权声明:本文转载自网络,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。本站转载出于传播更多优秀技术知识之目的,如有侵权请联系QQ/微信:153890879删除

相关文章
  • 分享几个常用的Oracle 11g内存视图脚本

    分享几个常用的Oracle 11g内存视图脚本

  • 一步一步带你入门MySQL中的索引和锁

    一步一步带你入门MySQL中的索引和锁

  • MongoDB一次节点宕机引发的思考

    MongoDB一次节点宕机引发的思考

  • 详解MySQL数据库Innodb内存结构和其是

    详解MySQL数据库Innodb内存结构和其是

腾讯云代理商
海外云服务器