升級可能導致資料庫不可用(一)
升級過程也是一個危險的過程,操作不當可能造成資料庫無法開啟,因此在升級之前應該做好備份。
描述問題產生的原因。
嘗試將一個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/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 使用資料庫處理併發可能導致的問題資料庫
- 資料庫升級之-Dataguard滾動升級資料庫
- 資料庫升級之-資料泵資料庫
- 資料庫升級之-XTTS資料庫TTS
- 資料庫升級和工具資料庫
- android資料庫如何進行版本升級?架構之資料庫框架升級Android資料庫架構框架
- 靜默方式安裝、升級oracle(三): 升級資料庫軟體及資料庫Oracle資料庫
- 【伺服器資料恢復】MDisk重建導致vdisk丟失,上層Oracle資料庫不可用的資料恢復案例伺服器資料恢復Oracle資料庫
- Android 資料庫綜述(一) 資料庫片的升級與資料的遷移操作Android資料庫
- glibc 升級導致Linux顯示中文亂碼Linux
- chorme自動升級導致跨域問題ORM跨域
- 微軟升級病毒庫導致Win7/8.1端Defender出現bug微軟Win7
- oracle資料庫11.2.0.3升級到11.2.0.4Oracle資料庫
- 13 使用SQL Apply 升級資料庫SQLAPP資料庫
- iOS 資料庫升級資料遷移解決方案iOS資料庫
- 資料庫升級-物理重新整理資料字典資料庫
- 【YashanDB知識庫】archivelog磁碟滿導致資料庫abnormalHive資料庫ORM
- 小程式渲染層核心不一致導致Array.flat()不可用
- 升級Xcode10導致的編譯錯誤XCode編譯
- 誤升級GLIBC導致系統崩潰之後
- 自定義開發資料庫升級程式資料庫
- 故障分析 | MySQL 資料庫升級後,資料庫怎麼卡住了MySql資料庫
- 【YashanDB知識庫】資料庫審計shutdown immediate操作導致資料庫異常退出資料庫
- MySQL 5.6因為OOM導致資料庫重啟MySqlOOM資料庫
- ASM空間爆滿導致資料庫掛起ASM資料庫
- 大事務導致資料庫恢復時間長資料庫
- 福昕編輯器可能導致電腦右擊資料夾卡死
- 【資料庫資料恢復】斷電導致Oracle資料庫資料丟失的資料恢復案例資料庫資料恢復Oracle
- phpStudy2018 升級資料庫 MySQL5.7PHP資料庫MySql
- Redis與資料庫資料一致性Redis資料庫
- 【伺服器資料恢復】多塊硬碟掉線導致儲存LUN不可用的資料恢復伺服器資料恢復硬碟
- ORACLE一體機pcie 快取卡損壞導致資料庫dang機Oracle快取資料庫
- [20210519]是否可能導致DML失效.txt
- 【資料庫升級】Oracle指令碼升級12c CDB to 19c CDB資料庫Oracle指令碼
- 【Azure微服務 Service Fabric 】因證書過期導致Service Fabric叢集掛掉(升級無法完成,節點不可用)微服務
- 記一次升級Gradle外掛導致相容問題的解決方案Gradle
- openGauss 由於RemoveIPC未關閉導致資料庫crashREM資料庫
- Oracle資料庫升級或資料遷移的方法探討Oracle資料庫
- Mac升級至macOS High Sierra後導致git無法使用MacGit