sdxh0506 发表于 2018-10-22 09:15:42

SGA之SQL

  --查看诊断位置信息
  select * from v$diag_info;
  --查看sga中内存分配信息
  select * from sys.x$ksmfs;
  --查看内存块还剩余多少
  select pool,name,bytes/1024/1024 MB from v$sgastat where name='free memory';
  --查看共享池的使用情况比率
  select to_number(v$parameter.value) value,v$sgastat.bytes/1024/1024 "v$sgastat MB",
  (v$sgastat.bytes/v$parameter.value)*100 "percent free"
  from v$sgastat,v$parameter where v$sgastat.name='free memory' and v$parameter.name='shared_pool_size'
  and v$sgastat.pool='shared pool';
  --查看SGA内各个易失存储器块的情况
  select * from v$sga_dynamic_components
  --查询动态调整SGA内存块还有多少可使用空间
  select * from v$sga_dynamic_free_memory;
  --SGA信息
  select * from v$sgainfo
  --可根据此视图调整SGA大小
  select * from v$sga_target_advice

页: [1]
查看完整版本: SGA之SQL