RAC的两个实例:
目前用spfile,job_queue_processes =4
SQL> col inst_name for a30
SQL> select * from v$active_instances;
INST_NUMBER INST_NAME
----------- ------------------------------
1 cs_rac01:csmisc1
2 cs_rac02:csmisc2
Elapsed: 00:00:00.00
SQL> show parameter spfile
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
spfile string /dev/vg_cs1/rspfile_128m_01
SQL> show parameter job
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
job_queue_processes integer 4
SQL>
现在在节点1上设置job_queue_processes=11 ,并且在节点2上设置job_queue_processes=12:
SQL> alter system set job_queue_processes=11 sid='csmisc1';
System altered.
Elapsed: 00:00:00.05
SQL> alter system set job_queue_processes=12 sid='csmisc2';
System altered.
Elapsed: 00:00:00.02
SQL>
检查一下节点一:
SQL> select instance_name from v$instance;
INSTANCE_NAME
----------------
csmisc1
Elapsed: 00:00:00.01
SQL> show parameter job
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
job_queue_processes integer 11
SQL>
再检查一下节点2:
SQL> select instance_name from v$instance;
INSTANCE_NAME
----------------
csmisc2
Elapsed: 00:00:00.02
SQL> show parameter job
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
job_queue_processes integer 12
SQL>
现在看看spfile中是如何记录的:
SQL> create pfile='/tmp/lunar.ora' from spfile;
File created.
Elapsed: 00:00:00.06
SQL> !cat /tmp/lunar.ora|grep job
*.job_queue_processes=4
csmisc1.job_queue_processes=11
csmisc2.job_queue_processes=12
SQL>