查看oracle 系统临时表空间、undo表空间、SGA和PGA大小

时间:2022-06-08 00:58:30

1)检查oracle系统临时表空间大小:

select sum(bytes)/1024/1024 "temp size(M)" from dba_temp_files where tablespace_name='TEMP';

 

2)查询undo表空间大小

select sum(bytes)/1024/1024 "current undo size(M)" from dba_data_files where tablespace_name='UNDOTBS1';

 

3)查询SGAPGA

SQL> show parameter sga;

获得sga_max_sizesga_target的值

SQL> show parameter pga;

获得pga_aggregate_target的值

 

参考值:

现场服务器是8G内存,SGA设置为4GPGA设置为1G

现场服务器是16G内存,SGA设置为10GPGA设置为2G

现场服务器是32G内存,SGA设置为20GPGA设置为4G

 

修改方法:

pfile

sga_max_size=4G

sga_target=4G

pga_aggregate_target=1G

 

spfile

SQL> alter system set sga_max_size=4G scope=spfile;

SQL> alter system set sga_target=4G scope=spfile;

SQL> alter system set pga_aggregate_target=1G scope=spfile;