加入收藏 | 设为首页 | 会员中心 | 我要投稿 核心网 (https://www.hxwgxz.com/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 编程 > 正文

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

发布时间:2019-11-04 17:41:41 所属栏目:编程 来源:波波说运维
导读:今天主要分享几个关于Oracle数据库的内存视图的脚本,仅供参考。 一、V$MEMORY_DYNAMIC_COMPONENTS V$MEMORY_DYNAMIC_COMPONENTSdisplaysinformationaboutthedynamicSGAcomponents.ThisviewsummarizesinformationbasedonallcompletedSGAresizeoperationssi

今天主要分享几个关于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内存视图脚本

【编辑推荐】

  1. Java开发数据库设计的14个技巧,你知道几个?
  2. 逃离Oracle的围城,焕发云数据库的新生
  3. 传统数据库环境的5个陷阱
  4. Spring Boot 2实战:使用Flyway管理你数据库的版本变更
  5. 详解Oracle11g和12c的v$pwfile_user视图及区别
【责任编辑:赵宁宁 TEL:(010)68476606】
点赞 0

(编辑:核心网)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    热点阅读