升級可能導致資料庫不可用(一)
升級過程也是一個危險的過程,操作不當可能造成資料庫無法開啟,因此在升級之前應該做好備份。
描述問題產生的原因。
嘗試將一個9.2.0.4的資料庫手工升級為11.2.0.1。但是升級過程中犯了一個小錯誤,在升級之前沒有執行11.2的ORACLE_HOME/rdbms/admin/utlu112i.sql。
就是這個小錯誤,導致資料庫升級失敗。
在執行catupgrd.sql指令碼時,出現了ORA-00942: table or view does not exist錯誤:
SQL> spo upgrade.sql
SQL> @?/rdbms/admin/catupgrd
DOC>#######################################################################
DOC>#######################################################################
DOC>
DOC> The first time this script. is run, there should be no error messages
DOC> generated; all normal upgrade error messages are suppressed.
DOC>
DOC> If this script. is being re-run after correcting some problem, then
DOC> expect the following error which is not automatically suppressed:
DOC>
DOC> ORA-00001: unique constraint (
DOC> possibly in conjunction with
DOC> ORA-06512: at "
DOC>
DOC> These errors will automatically be suppressed by the Database Upgrade
DOC> Assistant (DBUA) when it re-runs an upgrade.
DOC>
DOC>#######################################################################
DOC>#######################################################################
DOC>#
.
.
.
DOC>#######################################################################
DOC>#######################################################################
DOC> The following statement will cause:
DOC> - "ORA-00942: table or view does not exist" ; or
DOC> - "ORA-00904: "TZ_VERSION": invalid identifier"" ; or
DOC> - "ORA-01722: invalid number"
DOC> if the pre-upgrade utility (utlu112i.sql) has not been run to:
DOC> a) create and update registry$database table to include the current
DOC> database timezone file version used in the old release; or
DOC> b) do inserts into sys.props$.
DOC>
DOC> o Action:
DOC> Shutdown ABORT and revert to the original ORACLE_HOME. Then run
DOC> utlu112i.sql to populate registry$database with the database timezone
DOC> file version used by the lower version database and to populate
DOC> sys.props$ with Day Light Saving Time (DST) properties information.
DOC>
DOC> OR
DOC> - An "ORA-01722: invalid number"
DOC> if the old release uses a timezone file version newer than 8 (shipped with
DOC> 11.2) but the new release has not been patched yet.
DOC>
DOC> o Action:
DOC> Shutdown ABORT and patch new ORACLE_HOME to the same timezone file
DOC> version as used in the old ORACLE_HOME.
DOC>
DOC>
DOC>#######################################################################
DOC>#######################################################################
DOC>#
TO_NUMBER(value$) != (SELECT tz_version from registry$database))
*
第 6 行出現錯誤:
ORA-00942: 表或檢視不存在
從 Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options 斷開
根據Oracle給出的解決方法,需要設定9.2的ORACLE_HOME,啟動資料庫執行11.2的ORACLE_HOME/rdbms/admin/utlu112i.sql。但是由於已經設定了COMPATIBLE為11.2.0.1.0,並啟動過資料庫,導致9i環境已經無法開啟資料庫,啟動將報錯:
[oracle@bjtest ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on 星期五 4月 30 22:05:47 2010
Copyright (c) 1982, 2009, Oracle. All rights reserved.
連線到:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> shutdown abort
ORACLE 例程已經關閉。
SQL> exit
從 Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options 斷開
[oracle@bjtest ~]$ export ORACLE_HOME=/opt/oracle/product/9.2
[oracle@bjtest ~]$ export PATH=$ORACLE_HOME/bin:$PATH
[oracle@bjtest ~]$ sqlplus "/ as sysdba"
SQL*Plus: Release 9.2.0.4.0 - Production on 星期五 4月 30 22:06:42 2010
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
已連線到空閒例程。
SQL> startup pfile=inittest9.ora
ORA-00401: the value for parameter compatible is not supported by this release
初始化引數的值COMPATIBLE設定為11.2.0.1.0,在9i是無法啟動的,但是即使改成9.2.0.1.0,由於已經更改了CONTROL_FILE,因此也是無法啟動的。
修改初始化引數後,嘗試啟動:
SQL> startup pfile=inittest9.ora
ORACLE 例程已經啟動。
Total System Global Area 657246184 bytes
Fixed Size 743400 bytes
Variable Size 385875968 bytes
Database Buffers 268435456 bytes
Redo Buffers 2191360 bytes
ORA-00201: ?????? 9.2.0.0.0 ? ORACLE ?? 9.2.0.0.0 ???
ORA-00202: ????: '/data/oradata/test9/control01.dbf'
而且這時在11g的環境下,利用UPGRADE方式啟動,也無法呼叫utlu112i.sql了,呼叫會報錯:
[oracle@bjtest ~]$ sqlplus "/ as sysdba"
SQL*Plus: Release 9.2.0.4.0 - Production on 星期五 4月 30 22:11:26 2010
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
連線到:
Oracle9i Enterprise Edition Release 9.2.0.4.0 - 64bit Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.4.0 - Production
SQL> shutdown abort
ORACLE 例程已經關閉。
SQL> exit
從Oracle9i Enterprise Edition Release 9.2.0.4.0 - 64bit Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.4.0 - Production中斷開
[oracle@bjtest ~]$ export ORACLE_HOME=/data/oracle/product/11.2
[oracle@bjtest ~]$ export PATH=$ORACLE_HOME/bin:$PATH
[oracle@bjtest ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on 星期五 4月 30 22:12:00 2010
Copyright (c) 1982, 2009, Oracle. All rights reserved.
已連線到空閒例程。
將初始化引數改回為11.2.0.1.0,利用UPGRADE啟動資料庫:
SQL> startup pfile=inittest9.ora upgrade
ORA-32006: BACKGROUND_DUMP_DEST initialization parameter has been deprecated
ORA-32006: USER_DUMP_DEST initialization parameter has been deprecated
ORACLE 例程已經啟動。
Total System Global Area 618012672 bytes
Fixed Size 2215784 bytes
Variable Size 343933080 bytes
Database Buffers 268435456 bytes
Redo Buffers 3428352 bytes
資料庫裝載完畢。
資料庫已經開啟。
SQL> @?/rdbms/admin/utlu112i.sql
ERROR:
ORA-04023: 無法驗證或授權物件 SYS.STANDARD
DECLARE
*
第 1 行出現錯誤:
ORA-04023: 無法驗證或授權物件 SYS.STANDARD
ERROR:
ORA-04023: 無法驗證或授權物件 SYS.STANDARD
現在已經陷入了兩難的境地,在9i和11g都無法成功的開啟資料庫。如果在升級操作之前沒有備份,就很可能導致資料庫的徹底崩潰。
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/4227/viewspace-671429/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 升級可能導致資料庫不可用(二)資料庫
- 資料庫升級導致ORA-918錯誤資料庫
- Oracle資料庫導致效能問題的可能原因Oracle資料庫
- rac 升級crs 升級資料庫軟體,升級資料庫資料庫
- 使用資料庫處理併發可能導致的問題資料庫
- 資料庫升級資料庫
- ♀♀資料庫升級♀♀資料庫
- Oracle 資料庫升級Oracle資料庫
- 資料庫升級之-Dataguard滾動升級資料庫
- 資料庫升級之-資料泵資料庫
- 資料庫恢復狀態可能導致JOB無法自動執行資料庫
- 探索Oracle之資料庫升級一 升級補丁修復概述Oracle資料庫
- Oracle升級導致ocr檔案損壞一例Oracle
- 資料庫升級和工具資料庫
- 資料庫升級之-XTTS資料庫TTS
- 資料庫升級報錯資料庫
- 資料庫升級問題處理一則資料庫
- Oracle 資料庫不一致導致異常的恢復Oracle資料庫
- oracle資料庫升級11.2.0.3升級到11.2.0.4Oracle資料庫
- 靜默方式安裝、升級oracle(三): 升級資料庫軟體及資料庫Oracle資料庫
- android資料庫如何進行版本升級?架構之資料庫框架升級Android資料庫架構框架
- Oracle資料庫升級(轉發)Oracle資料庫
- Oracle 資料庫 升級為 RACOracle資料庫
- 微軟升級病毒庫導致Win7/8.1端Defender出現bug微軟Win7
- 【伺服器資料恢復】MDisk重建導致vdisk丟失,上層Oracle資料庫不可用的資料恢復案例伺服器資料恢復Oracle資料庫
- chorme自動升級導致跨域問題ORM跨域
- Oracle資料庫升級與補丁Oracle資料庫
- 資料庫升級後‘PLAN_TABLE資料庫
- Oracle 資料庫升級注意事項Oracle資料庫
- 資料庫的升級及遷移資料庫
- RAC資料庫升級到10.2.0.5資料庫
- 谷歌升級雲端資料庫Cloud SQL谷歌資料庫CloudSQL
- 資料庫升級-物理重新整理資料字典資料庫
- iOS 資料庫升級資料遷移解決方案iOS資料庫
- xcode升級導致cocoapods很多奇葩問題XCode
- 小程式渲染層核心不一致導致Array.flat()不可用
- Android 資料庫綜述(一) 資料庫片的升級與資料的遷移操作Android資料庫
- Android版本升級同時Sqlite資料庫的升級及之前資料的保留AndroidSQLite資料庫