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

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)查询SGA和PGA:
SQL> show parameter sga;
获得sga_max_size和sga_target的值
SQL> show parameter pga;
获得pga_aggregate_target的值

参考值:
现场服务器是8G内存,SGA设置为4G,PGA设置为1G
现场服务器是16G内存,SGA设置为10G,PGA设置为2G
现场服务器是32G内存,SGA设置为20G,PGA设置为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;

引自:http://blog.csdn.net/junmail/article/details/5403135

标签: oracle, 服务器, select, alter, pga, sga, sql, spfile

添加新评论