Oracle11g 11.2.0.3升級失敗後的兩種回退方法
升級環境:
1、RAC 11.2.0.1 to RAC 11.2.0.2
2、RAC 11.2.0.1 to RAC 11.2.0.3
3、RAC 11.2.0.2 to RAC 11.2.0.3
以上DB軟體均是透過out-of-place upgrade方法升級。
如果在升級完成後,發現升級過程有問題,需要回退,我們可以選擇兩種回退辦法:
1. 透過閃回資料庫的辦法還原到11.2.0.1 /11.2.0.3的資料庫
2. 執行catdwgrd.sql 降級資料字典
以下我們介紹透過閃回資料庫的辦法還原到11.2.0.1 /11.2.0.3的資料庫
關於執行catdwgrd.sql 降級資料字典詳見:How To Downgrade From Database 11.2 To Previous Release (includes 11.2.0.3-11.2.0.1) [ID883335.1]
一、檢查已升級的資料庫版本(11.2.0.3)
備註:
我們在升級11.2.0.3的資料字典之前已經做了資料庫的閃回點
create restore point upgrade_rollback guarantee flashback database;
SQL> SELECT NAME, SCN, TIME, DATABASE_INCARNATION#, GUARANTEE_FLASHBACK_DATABASE, STORAGE_SIZE FROM V$RESTORE_POINT WHERE GUARANTEE_FLASHBACK_DATABASE='YES';
NAME
--------------------------------------------------------------------------------
SCN
----------
TIME
---------------------------------------------------------------------------
DATABASE_INCARNATION# GUA STORAGE_SIZE
--------------------- --- ------------
UPGRADE_ROLLBACK
1227989
31-MAR-12 10.21.06.000000000 AM
1 YES 16384000
檢查版本資訊
SQL> select * from global_name;
GLOBAL_NAME
--------------------------------------------------------------------------------
RACDB
SQL> select * from v$version;
BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
PL/SQL Release 11.2.0.3.0 - Production
CORE 11.2.0.3.0 Production
TNS for IBM/AIX RISC System/6000: Version 11.2.0.3.0 - Production
NLSRTL Version 11.2.0.3.0 - Production
SQL> col COMP_ID format a10
SQL> col COMP_NAME format a30
SQL> select comp_id,comp_name,version,status,modified from dba_registry
SQL> /
COMP_ID COMP_NAME VERSION STATUS MODIFIED
---------- ------------------------------ ------------------------------ ---------------------- -----------------------
APEX Oracle Application Express 3.2.1.00.12 INVALID 31-MAR-2012 12:04:14
EM Oracle Enterprise Manager 11.2.0.3.0 VALID 31-MAR-2012 11:36:51
ORDIM Oracle Multimedia 11.2.0.3.0 VALID 31-MAR-2012 12:04:14
XDB Oracle XML Database 11.2.0.3.0 VALID 31-MAR-2012 12:04:13
EXF Oracle Expression Filter 11.2.0.3.0 VALID 31-MAR-2012 12:04:12
RUL Oracle Rules Manager 11.2.0.3.0 VALID 31-MAR-2012 12:04:13
OWM Oracle Workspace Manager 11.2.0.3.0 VALID 31-MAR-2012 12:04:11
CATALOG Oracle Database Catalog Views 11.2.0.3.0 VALID 31-MAR-2012 12:04:11
CATPROC Oracle Database Packages and T 11.2.0.3.0 VALID 31-MAR-2012 12:04:11
ypes
JAVAVM JServer JAVA Virtual Machine 11.2.0.3.0 VALID 31-MAR-2012 12:04:11
XML Oracle XDK 11.2.0.3.0 VALID 31-MAR-2012 12:04:11
CATJAVA Oracle Database Java Packages 11.2.0.3.0 VALID 31-MAR-2012 12:04:11
RAC Oracle Real Application Cluste 11.2.0.3.0 VALID 31-MAR-2012 12:04:14
rs
13 rows selected.
二、回退過程(to 11.2.0.2)
1、關閉RAC所有節點的例項
2、在所有節點上關閉資料庫例項,並在一個節點上啟動資料庫到mount模式進行閃回。
$ sqlplus / as sysdba
SQL> startup mount;
SQL> SELECT NAME, SCN, TIME, DATABASE_INCARNATION#, GUARANTEE_FLASHBACK_DATABASE, STORAGE_SIZE FROM V$RESTORE_POINT WHERE GUARANTEE_FLASHBACK_DATABASE='YES';
NAME
--------------------------------------------------------------------------------
SCN
----------
TIME
---------------------------------------------------------------------------
DATABASE_INCARNATION# GUA STORAGE_SIZE
--------------------- --- ------------
UPGRADE_ROLLBACK
1227989
31-MAR-12 10.21.06.000000000 AM
1 YES 910868480
SQL> flashback database to restore point UPGRADE_ROLLBACK;
Flashback complete.
SQL> alter database open resetlogs;
Database altered.
SQL> shutdown immediate;
3 、使用srvctl命令更新ocr中DBHOME相關資訊
$ su - oracle
%srvctl upgrade database -d racdb -o $NEW_ORACLE_HOME
$ srvctl upgrade database -d racdb -o /oracle/app/oracle/product/11.2.0
$ srvctl config database -d racdb
4、更環境變數到11.2.0及pfile等。
5、啟動資料庫:
6、 檢查版本資訊
SQL> select * from global_name;
GLOBAL_NAME
--------------------------------------------------------------------------------
RACDB
SQL> select * from v$version;
SQL> col COMP_ID format a10
SQL> col COMP_NAME format a30
SQL> select comp_id,comp_name,version,status,modified from dba_registry
SQL> select * from global_name;
GLOBAL_NAME
--------------------------------------------------------------------------------
RACDB
SQL> select * from v$version;
BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
PL/SQL Release 11.2.0.2.0 - Production
CORE 11.2.0.2.0 Production
TNS for IBM/AIX RISC System/6000: Version 11.2.0.2.0 - Production
NLSRTL Version 11.2.0.2.0 - Production
SQL> col COMP_ID format a10
SQL> col COMP_NAME format a30
SQL> select comp_id,comp_name,version,status,modified from dba_registry
2 ;
COMP_ID COMP_NAME VERSION
---------- ------------------------------ ------------------------------
STATUS MODIFIED
---------------------- -----------------------
APEX Oracle Application Express 3.2.1.00.12
INVALID 29-MAR-2012 19:53:42
EM Oracle Enterprise Manager 11.2.0.2.0
VALID 29-MAR-2012 19:34:52
ORDIM Oracle Multimedia 11.2.0.2.0
VALID 29-MAR-2012 19:24:12
COMP_ID COMP_NAME VERSION
---------- ------------------------------ ------------------------------
STATUS MODIFIED
---------------------- -----------------------
XDB Oracle XML Database 11.2.0.2.0
VALID 29-MAR-2012 19:12:54
EXF Oracle Expression Filter 11.2.0.2.0
VALID 29-MAR-2012 19:09:10
RUL Oracle Rules Manager 11.2.0.2.0
VALID 29-MAR-2012 19:13:49
COMP_ID COMP_NAME VERSION
---------- ------------------------------ ------------------------------
STATUS MODIFIED
---------------------- -----------------------
OWM Oracle Workspace Manager 11.2.0.2.0
VALID 29-MAR-2012 18:56:43
CATALOG Oracle Database Catalog Views 11.2.0.2.0
VALID 29-MAR-2012 18:55:11
CATPROC Oracle Database Packages and T 11.2.0.2.0
ypes
VALID 29-MAR-2012 18:55:11
COMP_ID COMP_NAME VERSION
---------- ------------------------------ ------------------------------
STATUS MODIFIED
---------------------- -----------------------
JAVAVM JServer JAVA Virtual Machine 11.2.0.2.0
VALID 29-MAR-2012 19:06:30
XML Oracle XDK 11.2.0.2.0
VALID 29-MAR-2012 19:08:00
CATJAVA Oracle Database Java Packages 11.2.0.2.0
VALID 29-MAR-2012 19:08:34
COMP_ID COMP_NAME VERSION
---------- ------------------------------ ------------------------------
STATUS MODIFIED
---------------------- -----------------------
RAC Oracle Real Application Cluste 11.2.0.2.0
rs
VALID 29-MAR-2012 19:58:08
13 rows selected.
完成回退。
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/196700/viewspace-720603/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- POSTGRESQL 小版本升級失敗後的原因分析SQL
- 升級失敗後,資料庫降級方案(flashback database)資料庫Database
- 探索Oracle之資料庫升級三 回退升級操作(11.2.0.4Downgrade 11.2.0.3)Oracle資料庫
- win10升級老失敗的解決方法_win10更新失敗怎麼辦Win10
- nginx升級與回退Nginx
- win10升級11102升級失敗怎麼辦_win10升級11102升級一直失敗修復方法Win10
- MacOS升級到Monterey後python SSL握手失敗問題MacPython
- 升級失敗後對資料庫進行恢復 (2)資料庫
- 升級失敗後對資料庫進行恢復 (1)資料庫
- win7升級win10失敗怎麼辦_win7升級win10失敗進不了系統修復方法Win7Win10
- nginx升級與版本回退Nginx
- 升級Win10正式版系統後回退到Win7系統的方法Win10Win7
- dbua升級oracle 10.2.0.1 0 到11.2.0.4 失敗後還原過程Oracle
- Visual Studio 2019 升級16.8之後(升級.Net 5),RazorTagHelper任務意外失敗
- Java Colllection的迭代器兩種失敗模式的優缺點Java模式
- oracle資料庫升級11.2.0.3升級到11.2.0.4Oracle資料庫
- MySQL 5.6升級到5.7版本官方推薦的兩種方法MySql
- Oracle 11.2.0.1 升級到11.2.0.3Oracle
- ORACLE 11.2.0.1升級到11.2.0.3Oracle
- Oracle 11.2.0.1升級到11.2.0.3Oracle
- 獲取Windows10工具升級Win10安裝失敗的解決方法WindowsWin10
- Win10系統升級10041失敗提示錯誤的解決方法Win10
- 邦芒支招:面試失敗後的應對方法面試
- 遠端升級頻頻失敗?原因竟然是…
- jdk8 升級 jdk17 docker 部署失敗JDKDocker
- Oracle11g升級到11.2.0.3過程中XDB.DBMS_XMLSCHEMA相關報錯OracleXML
- oracle從10.2.0.4升級到11.2.0.1的三種升級方法Oracle
- oracle rac 11.2.0.3 升級到11.2.0.4Oracle
- ORACLE11.2.0.1升級到11.2.0.3Oracle
- win10專業版升級失敗如何修復_win10專業版升級不瞭解決方法Win10
- win10顯示卡驅動怎麼更新 升級顯示卡驅動的兩種方法Win10
- 三種方法解決docker構建失敗(alpine)Docker
- npm install過程失敗的幾種處理方法NPM
- 解決IDEA建立maven工程失敗的一種方法IdeaMaven
- win10系統下升級steam失敗如何解決Win10
- 11.2.0.3 database異機升級至11.2.0.4Database
- oracle版本升級:從11.2.0.1到11.2.0.3Oracle
- 各種失敗型別型別