日期:2014-05-17  浏览次数:20886 次

alter system配置系统参数的问题
我们一个Data Guard环境,发现在建库和导入大量数据时由于主备的同步导致性能较低,耗时很长。
后来在别人指点下修改了如下参数,性能有了较大提高:

在修改前相关几个参数如下:
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
commit_logging string
commit_wait string
commit_write string
open_cursors integer 300
sessions integer 335
db_writer_processes integer 1

修改参数的命令:
alter system set commit_logging=batch scope=both;
alter system set commit_wait=nowait scope=both;
alter system set commit_write=batch,nowait scope=both;
alter system set open_cursors=1200 scope=spfile;
alter system set sessions=500 scope=spfile;
alter system set db_writer_processes=4 scope=spfile; 

修改后:
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
commit_logging string BATCH
commit_wait string NOWAIT
commit_write string BATCH, NOWAIT
open_cursors integer 1200
sessions integer 500
db_writer_processes integer 4

现在有如下几个问题:
1.之前查询commit那几个参数的value怎么是空的?空值是什么含义?
2.commit_logging和commit_write设置成batch参数是什么意思?是不是指一批事务完成后才写日志和写磁盘?那么这一批又是指多少个事务呢?
3.scope参数设置成both和spfile分别是什么含义,有什么区别?
4.事物都有两面性吧,这样修改提高了性能的同时会不会有什么隐患呢?
5.短短几条命令就让我感觉奥妙无穷,都因我对oracle太不了解了,谁能给我提供一个包含show parameter显示出来的所有参数的详解啊?oracle应该有这样的文档吧,不过不太会找。
给点帮助吧,不胜感激。

------解决方案--------------------
1 空的话要不是默认值要不就是没有设
2 自己网上搜
3 both表示修改内存和spfile两个地方,修改后立刻生效,spfile表示只改spfile不改内存,要下次重启后才生效,有些参数没有办法用both所以用spfile;
5
SQL> show parameter

NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
O7_DICTIONARY_ACCESSIBILITY boolean FALSE
active_instance_count integer
aq_tm_processes integer 0
archive_lag_target integer 0
asm_diskgroups string
asm_diskstring string
asm_power_limit integer 1
------解决方案--------------------
batch-->批量执行插入语句或删除语句,好象是这样,我也不太清楚?
scope=both;内存和spfile文件同时有效
scope=spfile; 重新启动后spfile文件有效

还有一个
scope=memory;更改参数后只有本次内存生效,下次重新启动后失效;

这方面只知道几个参数大概含意,经历过的话可能说得比较深刻一些';