Oracle调整日志组游标会话参数

调整redo_log_size日志大小

查看日志组成员
select member from v$logfile;
/u01/app/oracle/oradata/dbname/redo03.log
/u01/app/oracle/oradata/dbname/redo02.log
/u01/app/oracle/oradata/dbname/redo01.log
查看日志组状态
select group#,members,bytes/1024/1024,status from v$log;
    GROUP#    MEMBERS BYTES/1024/1024 STATUS
---------- ---------- --------------- ----------------
	 1	    1		  200 INACTIVE
	 2	    1		  200 INACTIVE
	 3	    1		  200 CURRENT
删除旧日志组 增加新日志组
alter database drop logfile group 1;
mv /u01/app/oracle/oradata/dbname/redo01.log /tmp
alter database add logfile group 1 ('/u01/app/oracle/oradata/dbname/redo01.log') size 512M;
alter database drop logfile group 2;
mv /u01/app/oracle/oradata/dbname/redo02.log /tmp
alter database add logfile group 2 ('/u01/app/oracle/oradata/dbname/redo02.log') size 512M;
查看当前组
select group#,members,bytes/1024/1024,status from v$log;
切换日志组否则原来的无法删除
alter system switch logfile; -- 需要等一会才能删除另外一个
查看当前组
select group#,members,bytes/1024/1024,status from v$log;
删除旧日志组 增加新日志组
alter database drop logfile group 3;-- INACTIVE的可以删除
mv /u01/app/oracle/oradata/dbname/redo03.log /tmp
alter database add logfile group 3 ('/u01/app/oracle/oradata/dbname/redo03.log') size 512M;
查看当前组
select group#,bytes/1024/1024,members,status from v$log;

调整游标、会话

open_cursors :(当前值:300),建议至少1000
session_cached_cursors :(当前值:50),建议至少300
show parameter open_cursors; --每个session(会话)最多能同时打开多少个cursor(游标)
show parameter session_cached_cursors; --每个session最多可以缓存多少个关闭掉的cursor
select count(*) from v$open_cursor; --当前实例的某个时刻的打开的cursor数目
alter system set open_cursors=1000 scope=spfile;
alter system set session_cached_cursors=300 scope=spfile;

你可能感兴趣的:(服务器)