Oracle 内存信息查询

SGA是系统全局区,是Oracle中可以共享的内存。

1.查看SGA的信息

---查看SGA信息
show sga

select * from v$sga ;

select * from v$sgainfo ;

Fixed Size 是固定区域,用于存储SGA各组件的信息。固定区域的大小随平台和版本而变化。

Variable Size  是可变区域,包括共享池、Java池、大池。

Database Buffers 是数据库高速缓冲区。

Redo Buffers 是重做日志缓冲区。

2.查看高速缓冲区(Database Buffer Cache)的实际大小

select name,bytes/1024/1024 || 'M' from v$sgainfo 
    where name = 'Buffer Cache Size'

3.查看共享池(Shared Pool)的实际大小

select name,bytes/1024/1024 || 'M' from v$sgainfo
    where name = 'Shared Pool Size';
or

select component,(current_size/1024/1024) || 'M' from v$memory_dynamic_components
    where conponent ='shared pool';

4.查看JAVA池的实际大小

select name,bytes/1024/1024 || 'M' from v$sgainfo
    where name = 'Java Pool Size';
or

select component,(current_size/1024/1024) || 'M' from v$memory_dynamic_components
    where conponent ='java pool';

5.查看大池的实际大小

select name,bytes/1024/1024 || 'M' from v$sgainfo
    where name = 'Large Pool Size';
or

select component,(current_size/1024/1024) || 'M' from v$memory_dynamic_components
    where conponent ='large pool';

6.查看 共享池、JAVA池、大池的剩余空间

---共享池的剩余空间
select * from v$sgastat where name = 'free memory' and Pool = 'shared pool';

---JAVA池的剩余空间
select * from v$sgastat where name = 'free memory' and Pool = 'java pool';


---大池的剩余空间
select * from v$sgastat where name = 'free memory' and Pool = 'large pool';

猜你喜欢

转载自blog.csdn.net/aganliang/article/details/86498666
今日推荐