Oracle 12C升級到18C
Oracle 12C 升級 到 18C
一:版本檢查
二: 準備18C 安裝包
三:建立目錄
四:安裝Oracle 軟體
五:升級前檢查
六:升級
七:驗證
八:問題
環境說明:
OS:Red Hat Enterprise Linux Server release 7.5 (Maipo)
DB:Oracle 12.2.0.1.0 升級到 Oracle 18.3.0.0
一:版本檢測
Oracle DB 18c -
手動升級到
Non-CDB Oracle Database 18c
的完整核對清單
(Doc ID 2469647.1)
二 : 準備 18C 安裝包
--- LINUX.X64_180000_db_home.zip
[root@cjcos package]# pwd
/package
[root@cjcos package]# ll -rth
total 7.5G
drwxr-xr-x. 2 oracle oinstall 42 Jan 16 12:05 Oracle_1903_for_Linux
-rw-r--r-- 1 oracle oinstall 3.3G Jan 19 10:36 linuxx64_12201_database.zip
-rw-r--r-- 1 oracle oinstall 4.3G Jan 19 10:55 LINUX.X64_180000_db_home.zip
三 :建立目錄
[root@cjcos yum.repos.d]# mkdir -p /u01/app/oracle 18
[root@cjcos yum.repos.d]# chown -R oracle:oinstall /u01/app/oracle 18
[root@cjcos yum.repos.d]# chmod -R 775 /u01/app
[root@cjcos yum.repos.d]# su - oracle
[oracle@cjcos ~]$ mkdir -p /u01/app/oracle 18 /product/1 8 .0.0/dbhome_1
[oracle@cjcos ~]$ cd /u01/app/oracle 18 /product/1 8 .0.0/dbhome_1
四:安裝Oracle 軟體
[oracle@cjcos dbhome_1]$ pwd
/u01/app/oracle18/product/18.0.0/dbhome_1
[oracle@cjcos dbhome_1]$ unzip -q /package/LINUX.X64_180000_db_home.zip
[root@cjcos ~]# xhost +
access control disabled, clients can connect from any host
[oracle@cjcos dbhome_1]$ cd /package/database/
[oracle@cjcos database]$ ./runInstaller
[root@cjcos ~]# /u01/app/oracle18/product/18.0.0/dbhome_1/root.sh
五:升級前檢查
停機擴大記憶體到10G
[ root@cjcos ~]# free -m
total used free shared buff/cache available
Mem: 9740 335 9088 9 317 9318
Swap: 4991 0 4991
[oracle@cjcos ~]$ export ORACLE_BASE=/u01/app/oracle12
[oracle@cjcos ~]$ export ORACLE_HOME=$ORACLE_BASE/product/12.0.0/dbhome_1
[oracle@cjcos ~]$ export ORACLE_SID=cjcdb01
[oracle@cjcos ~]$ /u01/app/oracle18/product/18.0.0/dbhome_1/jdk/bin/java -jar /u01/app/oracle18/product/18.0.0/dbhome_1/rdbms/admin/preupgrade.jar
==================
PREUPGRADE SUMMARY
==================
/u01/app/oracle12/cfgtoollogs/cjcdb01/preupgrade/preupgrade.log
/u01/app/oracle12/cfgtoollogs/cjcdb01/preupgrade/preupgrade_fixups.sql
/u01/app/oracle12/cfgtoollogs/cjcdb01/preupgrade/postupgrade_fixups.sql
Execute fixup scripts across the entire CDB:
Before upgrade:
1. Execute preupgrade fixups with the below command
$ORACLE_HOME/perl/bin/perl -I$ORACLE_HOME/perl/lib -I$ORACLE_HOME/rdbms/admin $ORACLE_HOME/rdbms/admin/catcon.pl -l /u01/app/oracle12/cfgtoollogs/cjcdb01/preupgrade/ -b preup_cjcdb01 /u01/app/oracle12/cfgtoollogs/cjcdb01/preupgrade/preupgrade_fixups.sql
2. Review logs under /u01/app/oracle12/cfgtoollogs/cjcdb01/preupgrade/
After the upgrade:
1. Execute postupgrade fixups with the below command
$ORACLE_HOME/perl/bin/perl -I$ORACLE_HOME/perl/lib -I$ORACLE_HOME/rdbms/admin $ORACLE_HOME/rdbms/admin/catcon.pl -l /u01/app/oracle12/cfgtoollogs/cjcdb01/preupgrade/ -b postup_cjcdb01 /u01/app/oracle12/cfgtoollogs/cjcdb01/preupgrade/postupgrade_fixups.sql
2. Review logs under /u01/app/oracle12/cfgtoollogs/cjcdb01/preupgrade/
Preupgrade complete: 2020-01-19T14:58:18
[oracle@cjcos preupgrade]$ vi preupgrade.log
[oracle@cjcos preupgrade]$ pwd
/u01/app/oracle12/cfgtoollogs/cjcdb01/preupgrade
[oracle@cjcos preupgrade]$ vim preupgrade.log
六:升級
[oracle@cjcos ~]$ cd /u01/app/oracle18/product/18.0.0/dbhome_1/bin/
[oracle@cjcos bin]$ ./dbua
SQL> conn / as sysdba
SQL> EXECUTE DBMS_STATS.GATHER_DICTIONARY_STATS;
SQL> EXECUTE DBMS_STATS.GATHER_FIXED_OBJECTS_STATS;
SQL> alter session set container=cjcpdb01;
SQL> EXECUTE DBMS_STATS.GATHER_DICTIONARY_STATS;
SQL> EXECUTE DBMS_STATS.GATHER_FIXED_OBJECTS_STATS;
七:驗證
設定環境變數
[oracle@cjcos ~]$ vi .bash_profile
export PATH
#export ORACLE_BASE=/u01/app/oracle
#export ORACLE_BASE=/u01/app/oracle12
export ORACLE_BASE=/u01/app/oracle18
#export ORACLE_HOME=$ORACLE_BASE/product/19.0.0/dbhome_1
#export ORACLE_HOME=$ORACLE_BASE/product/12.0.0/dbhome_1
export ORACLE_HOME=$ORACLE_BASE/product/18.0.0/dbhome_1
#export ORACLE_SID=cjcdb
export ORACLE_SID=cjcdb01
# export ORACLE_SID=cjcdb02
export PATH=$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH
[oracle@cjcos ~]$ source .bash_profile
監聽狀態
[oracle@cjcos ~]$ lsnrctl status
[oracle@cjcos admin]$ pwd
/u01/app/oracle12/product/12.0.0/dbhome_1/network/admin
[oracle@cjcos admin]$ vim tnsnames.ora
八:問題
一開始在Oracle Linux Server release 6.3 系統上,將11.2.0.4.0升級到12.2.0.1.0正常,再將12.2.0.1.0升級到18.3.0.0.0時,升級任務到70%,會報錯 ORA-03114:
root@cjc cjcdb]# pwd
/u01/app/oracle18/cfgtoollogs/dbua/upgrade2020-01-16_10-06-36AM/cjcdb
[root@cjc cjcdb]# vim catupgrdcjcpdb0.log
嘗試手動升級PDB :
[oracle@cjc ~]$ source .bash_profile
[oracle@cjc ~]$ $ORACLE_HOME/bin/dbupgrade -c cjcpdb
報錯如下:
CJCPDB(3):Exception [type: SIGSEGV, Address not mapped to object] [ADDR:0x4] [PC:0x599B586, joevm_invokevirtual()+1414] [flags: 0x0, count: 1]
2020-01-16T14:49:57.835919+08:00
Errors in file /u01/app/oracle18/diag/rdbms/cjcdb/cjcdb/trace/cjcdb_ora_1102.trc (incident=14465) (PDBNAME=CJCPDB):
ORA-07445: exception encountered: core dump [joevm_invokevirtual()+1414] [SIGSEGV] [ADDR:0x4] [PC:0x599B586] [Address not mapped to object] []
CJCPDB(3):Incident details in: /u01/app/oracle18/diag/rdbms/cjcdb/cjcdb/incident/incdir_14465/cjcdb_ora_1102_i14465.trc
CJCPDB(3):Use ADRCI or Support Workbench to package the incident.
See Note 411.1 at My Oracle Support for error and packaging details.
2020-01-16T14:50:09.995817+08:00
Dumping diagnostic data in directory=[cdmp_20200116145009], requested by (instance=1, osid=1102), summary=[incident=14465].
嘗試重啟PDB :
解決方案:
嘗試多次安裝均出現相同的問題,懷疑和作業系統版本過低,或作業系統記憶體過低有關,更換作業系統版本 Red Hat Enterprise Linux Server release 7.5 (Maipo) 並將記憶體由 4G 調大到 10G ,再次執行升級問題消失;
歡迎關注我的微信公眾號"IT小Chen",共同學習,共同成長!!!
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29785807/viewspace-2674050/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Oracle 18C升級到19COracle
- Oracle 11g升級到12COracle
- Oracle DB 18c - 手動升級到 18c 的完整核對清單 (文件 ID 2469647.1)Oracle
- Oracle 12c升級指南Oracle
- 升級到oracle 12c 的相容性矩陣Oracle矩陣
- 【RMAN】Oracle11g透過rman升級到12cOracle
- Oracle 19c - 手動升級 Oracle 12.x, 18c CDB 到 Oracle 19c (19.x)Oracle
- oracle 升級到 11.2.0.2Oracle
- oracle 升級12c引數樣例Oracle
- 【kingsql分享】Oracle 18c RAC補丁升級實戰【DBRU】SQLOracle
- oracle 10 rac 升級 10.2.0.1升級到10.2.0.5Oracle
- Oracle 12c升級檢查問題分析Oracle
- Oracle 12c資料庫升級實戰Oracle資料庫
- 通過 oracle 12c ocp 升級考試Oracle
- Oracle 12c和18c中的MGMTDB(下)Oracle
- 【OCM】Oracle 12C OCMU 12c OCM升級考試大綱Oracle
- 【資料庫升級】Oracle指令碼升級12c CDB to 19c CDB資料庫Oracle指令碼
- oracle資料庫升級11.2.0.3升級到11.2.0.4Oracle資料庫
- oracle 12c non-cdb升級成cdb模式Oracle模式
- Oracle 11.2.0.4升級到12.2.0.1Oracle
- 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
- Oracle 10.2.0.1 升級到 10.2.0.4Oracle
- 靜默升級oracle到10.2.0.4Oracle
- oracle 10.2.0.2升級到10.2.0.4Oracle
- oracle rac 10.2.0.1 升級到 oracle 10.2.0.4Oracle
- oracle 9.2.0.1 升級到oracle 9.2.0.8方法Oracle
- 9.2.0.4 升級到10.2.0.5升級後 Oracle Ultra Search 元件NO SCRIPTOracle元件
- oracle從10.2.0.4升級到11.2.0.1的三種升級方法Oracle
- oracle rac 11.2.0.3 升級到11.2.0.4Oracle
- oracle for windows 11.2.0.1升級到11.2.0.4OracleWindows
- (轉)Oracle 10.2.0.1 升級到 10.2.0.4Oracle
- Oracle 升級到 11.2.0.2 注意事項Oracle
- 升級Oracle 10g 到10.2.0.4Oracle 10g
- ORACLE11.2.0.1升級到11.2.0.3Oracle
- Oracle 12c升級需遵循的簡單步驟NFOracle
- Oracle 18c使用dbca建立級聯DGOracle