查看oracle连接占用内存,简单查看oracle的连接情况和内存使用情况.

select machine,count(*) from v$session group by machine;

select machine,status,count(*) from v$session group by machine,status order by status;

select 'SGA' AS NAME,ROUND(sum(value)/1024/1024,2)||'M' AS "SIZE(M)" from v$sga

UNION

select 'PGA' AS NAME,ROUND(value/1024/1024,2)||'M' AS "SIZE(M)" from v$pgastat where name='total PGA allocated'

UNION

select 'TOTAL' AS NAME,((SELECT ROUND(sum(value)/1024/1024,2) from v$sga)+(select ROUND(value/1024/1024,2) from v$pgastat where name='total PGA allocated'))||'M' AS "SIZE(M)" FROM DUAL

UNION

SELECT NAME,TO_CHAR(VALUE) FROM V$PGASTAT WHERE NAME='process count';

Oracle 11g设置内存自动管理:

ALTER SYSTEM SET MEMORY_TARGET = 1024M SCOPE=SPFILE; ALTER SYSTEM SET memory_max_target = 1500M SCOPE=SPFILE; ALTER SYSTEM SET SGA_TARGET = 0 SCOPE=SPFILE; ALTER SYSTEM SET SGA_MAX_SIZE=800M SCOPE=SPFILE; ALTER SYSTEM SET PGA_AGGREGATE_TARGET = 0 SCOPE=SPFILE; alter system set pre_page_sga=FALSE scope=spfile;

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值