龙空技术网

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

波波说运维 693

前言:

现时兄弟们对“oracle内存不足怎么办”大致比较关切,看官们都想要学习一些“oracle内存不足怎么办”的相关资讯。那么小编同时在网络上汇集了一些对于“oracle内存不足怎么办””的相关知识,希望你们能喜欢,大家一起来学习一下吧!

概述

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

一、V$MEMORY_DYNAMIC_COMPONENTS

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.

脚本: Provides information about dynamic memory components.

COLUMN component FORMAT A30​SELECT component, ROUND(current_size/1024/1024) AS current_size_mb, ROUND(min_size/1024/1024) AS min_size_mb, ROUND(max_size/1024/1024) AS max_size_mbFROM v$memory_dynamic_componentsWHERE current_size != 0ORDER BY component;
二、V$MEMORY_RESIZE_OPS

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.

脚本:Provides information about memory resize operations.

SET LINESIZE 200COLUMN parameter FORMAT A25SELECT start_time, end_time, component, oper_type, oper_mode, parameter, ROUND(initial_size/1024/1024) AS initial_size_mb, ROUND(target_size/1024/1024) AS target_size_mb, ROUND(final_size/1024/1024) AS final_size_mb, statusFROM v$memory_resize_opsORDER BY start_time;
三、V$MEMORY_TARGET_ADVICE

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

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

SELECT * FROM v$memory_target_advice ORDER BY memory_size;

觉得有用的朋友多帮忙转发哦!后面会分享更多devops和DBA方面的内容,感兴趣的朋友可以关注下~

标签: #oracle内存不足怎么办