今天主要分享几个关于Oracle数据库内存视图的脚本,仅供参考。一、V$MEMORY_DYNAMIC_COMPONENTSV$MEMORY_DYNAMIC_COMPONENTS显示动态SGA组件的信息。该视图汇总了自实例启动以来所有完成的SGAresize操作的信息。Allsizesareexpressedinbytes.脚本:提供动态内存组件的信息。COLUM20ROUND4componentFORMATA(COLUM20ROUND4componentFORMATA1024)AScurrent_size_mb,ROUND(min_size/1024/1024)ASmin_size_mb,ROUND(max_size/1024/1024)ASmax_size_mbFROMv$memory_dynamic_componentsWHEREcurrent_size!=0ORDERBYcomponent;二、V$MEMORY_RESIZE_OPSV$MEMORY_RESIZE_OPSdisplaysinformationaboutthelast800completedmemoryresizeoperations(bothautomaticandmanual).Thisdoesnotincludein-progressoperations.Allsizesareexpressedinbytes.脚本:Providesinformation关于内存大小调整操作。SETLINESIZE200COLUMNparameterFORMATA25SELECTstart_time,end_time,component,oper_type,oper_mode,parameter,ROUND(initial_size/1024/1024)ASinitial_size_mb,ROUND(target_size/1024/1024)AStarget_size_mb,ROUND(final_size/1024/1024)ASfinal_size_mb,statusFROMv$memory_resize_opsORDERBYstart_time;三、V$MEMORY_TARGET_ADVICEV$MEMORY_TARGET_ADVICEprovidesinformationabouthowtheMEMORY_TARGETparametershouldbesizedbasedoncurrentsizingandsatisfactionmetrics.脚本3:ProvidesinformationtohelptunetheMEMORY_TARGETparameter.SELECT*FROMv$memory_target_adviceORDERBYmemory_size;
