Oracle RAC 手動回滾補丁

  1. Stop the CRS managed resources running from DB homes.
    If this is a GI Home environment, as the database home owner execute:
    $ <ORACLE_HOME>/bin/srvctl stop home -o <ORACLE_HOME> -s <status file location> -n <node name>
    If this is an Oracle Restart Home environment, as the database home owner execute:
    $ <ORACLE_HOME>/bin/srvctl stop home -o <ORACLE_HOME> -s <status file location>

  2. Run the pre root script.
    If this is a GI Home, as the root user execute:
    <GI_HOME>/crs/install/rootcrs.pl -unlock
    If this is an Oracle Restart Home, as the root user execute:
    <GI_HOME>/crs/install/roothas.pl -unlock

  3. Roll back the CRS patch. As the GI home owner execute:
    $ <GI_HOME>/OPatch/opatch rollback -local -id <OCW Components_number> -oh <GI_HOME>
    $ <GI_HOME>/OPatch/opatch rollback -local -id <ACFS Components_number> -oh <GI_HOME>
    $ <GI_HOME>/OPatch/opatch rollback -local -id <DB_PSU_number> -oh <GI_HOME>

  4. Run the pre script for DB component of the patch. As the database home owner execute:
    $ <UNZIPPED_PATCH_LOCATION>/<GI_PSU_number>/<OCW Components_number>/custom/server/<OCW Components_number>/custom/scripts/prepatch.sh -dbhome <ORACLE_HOME>

  5. Roll back the DB patch from the database home. As the database home owner execute:
    $ <ORACLE_HOME>/OPatch/opatch rollback -local -id <OCW Components_number> -oh <ORACLE_HOME>
    $ <ORACLE_HOME>/OPatch/opatch rollback -local -id <DB_PSU_number> -oh <ORACLE_HOME>

  6. Run the post script for DB component of the patch. As the database home owner execute:
    $ <UNZIPPED_PATCH_LOCATION>/<GI_PSU_number>/<OCW Components_number>/custom/server/<OCW Components_number>/custom/scripts/postpatch.sh -dbhome <ORACLE_HOME>

  7. Run the post script. As the root user execute:
    <GI_HOME>/rdbms/install/rootadd_rdbms.sh
    If this is a GI Home, as the root user execute:
    <GI_HOME>/crs/install/rootcrs.pl -patch
    If this is an Oracle Restart Home, as the root user execute:
    <GI_HOME>/crs/install/roothas.pl -patch

  8. If the message, "A system reboot is recommended before using ACFS??? is shown, then a reboot must be issued before continuing. Failure to do so will result in running with an unpatched ACFS\ADVM\OKS driver.

  9. Start the CRS managed resources that were earlier running from DB homes.
    If this is a GI Home environment, as the database home owner execute:
    $ <ORACLE_HOME>/bin/srvctl start home -o <ORACLE_HOME> -s <status file location> -n <node name>
    If this is an Oracle Restart Home environment, as the database home owner execute:
    $ <ORACLE_HOME>/bin/srvctl start home -o <ORACLE_HOME> -s <status file location>

1.關閉一節點數據庫:

$ srvctl  stop home -o $ORACLE_HOME -s /tmp/stophome1.log -n rac2

2.鎖定一節點GI:

  /u01/app/11.2.0/grid/crs/install/rootcrs.pl -unlock

3.回滾GI HOME下的補丁包,用GI用戶執行:

$ $ORACLE_HOME/OPatch/opatch rollback -local -id 27441052 -oh $ORACLE_HOME
$ $ORACLE_HOME/OPatch/opatch rollback -local -id 22502505  -oh $ORACLE_HOME
$ $ORACLE_HOME/OPatch/opatch rollback -local -id 27338049 -oh $ORACLE_HOME 

4.用oracle用戶使用腳本檢測:

$/u01/app/stage/27475913/27441052/custom/server/27441052/custom/scripts/prepatch.sh -dbhome $ORACLE_HOME 

5.回滾database home下的補丁包,用oracle用戶執行:

 $ORACLE_HOME/OPatch/opatch rollback -local -id 27441052 -oh $ORACLE_HOME
 $ORACLE_HOME/OPatch/opatch rollback -local -id 27338049 -oh $ORACLE_HOME

6.執行腳本使用oracle用戶:

$/u01/app/stage/27475913/27441052/custom/server/27441052/custom/scripts/postpatch.sh -dbhome $ORACLE_HOME 

7.執行腳本使用root用戶:

  /u01/app/11.2.0/grid/rdbms/install/rootadd_rdbms.sh 
 /u01/app/11.2.0/grid/crs/install/rootcrs.pl -patch

8.開啓節點實例:

$ srvctl start home -o $ORACLE_HOME -s /tmp/stophome1.log -n rac2

9.更新數據字典(單節點運行):

---更新數據字典
SQL> @?/rdbms/admin/catbundle.sql psu apply
---編譯java類
SQL> @?/rdbms/admin/utlrp.sql
 select * from dba_registry_history;
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章