oracle10g rac 全域性|例項級引數變更測試

wisdomone1發表於2010-04-13
基於rac環境下的引數變更小測

alter system switchlogfile;---只能獨立在每個rac例項執行,沒有所謂的全域性或單例項的說法

請參考如下測試

SQL> alter system switch logfile;---先後執行switch logfile兩次,很簡單,不再引述

System altered.
SQL> select * from gv$log  ---rac預設每個例項內建四組redo,每個例項分為兩個不同的thread
  2  ;

   INST_ID     GROUP#    THREAD#  SEQUENCE#      BYTES    MEMBERS ARC STATUS           FIRST_CHANGE# FIRST_TIM
---------- ---------- ---------- ---------- ---------- ---------- --- ---------------- ------------- ---------
         2          1          1          2   52428800          1 YES INACTIVE                493667 12-APR-10
                    2          1          3   52428800          1 NO  CURRENT                 500152 12-APR-10
                    3          2          3   52428800          1 NO  CURRENT                 500449 12-APR-10
                    4          2          2   52428800          1 YES ACTIVE                  490928 12-APR-10
         1          1          1          2   52428800          1 YES INACTIVE                493667 12-APR-10
                    2          1          3   52428800          1 NO  CURRENT                 500152 12-APR-10
                    3          2          3   52428800          1 NO  CURRENT                 500449 12-APR-10
                    4          2          2   52428800          1 YES ACTIVE                  490928 12-APR-10

8 rows selected.



執行這個語句alter system archive log instance 'only1' current,可以限制歸檔例項的範圍,對哪個例項進行歸檔操作

具體測試如下:
1,未執行以上語句前
SQL> select * from gv$log;


   INST_ID     GROUP#    THREAD#  SEQUENCE#      BYTES    MEMBERS ARC STATUS           FIRST_CHANGE# FIRST_TIM
---------- ---------- ---------- ---------- ---------- ---------- --- ---------------- ------------- ---------
         1          1          1          2   52428800          1 YES INACTIVE                493667 12-APR-10   
                    2          1          3   52428800          1 NO  CURRENT                 500152 12-APR-10    ---請注意看status為current這列與下面第四行(這是當前日誌)
                    3          2          3   52428800          1 NO  CURRENT                 500449 12-APR-10
                    4          2          2   52428800          1 YES INACTIVE                490928 12-APR-10
         2          1          1          2   52428800          1 YES INACTIVE                493667 12-APR-10
                    2          1          3   52428800          1 NO  CURRENT                 500152 12-APR-10
                    3          2          3   52428800          1 NO  CURRENT                 500449 12-APR-10
                    4          2          2   52428800          1 YES INACTIVE                490928 12-APR-10

8 rows selected.



2,執行以上語名
SQL> alter system archive log instance 'only1' current;---對rac例項1(only1)進行歸檔

System altered.


3,再次檢視gv$log
SQL> select * from gv$log;

   INST_ID     GROUP#    THREAD#  SEQUENCE#      BYTES    MEMBERS ARC STATUS           FIRST_CHANGE# FIRST_TIM
---------- ---------- ---------- ---------- ---------- ---------- --- ---------------- ------------- ---------
         1          1          1          4   52428800          1 NO  CURRENT                 500789 12-APR-10
                    2          1          3   52428800          1 YES ACTIVE                  500152 12-APR-10    ---看到了沒,此日誌已經歸檔了,arc列為yes(第四行同樣)
                    3          2          3   52428800          1 NO  CURRENT                 500449 12-APR-10
                    4          2          2   52428800          1 YES INACTIVE                490928 12-APR-10
         2          1          1          4   52428800          1 NO  CURRENT                 500789 12-APR-10
                    2          1          3   52428800          1 YES ACTIVE                  500152 12-APR-10
                    3          2          3   52428800          1 NO  CURRENT                 500449 12-APR-10
                    4          2          2   52428800          1 YES INACTIVE                490928 12-APR-10

8 rows selected.

SQL>



小結:
  rac架構不同於單例項資料庫,故有些引數可以獨立定製;當然有些引數必須是全域性統一的
 

   

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/9240380/viewspace-659623/,如需轉載,請註明出處,否則將追究法律責任。

相關文章