转自:https://www.cnblogs.com/jsxxd/p/15065015.html https://blog.csdn.net/howard_shooter/article/details/127389873
一、升级与迁移
1.1 区别
升级和迁移是不同类型的数据库更改
升级将现有的Oracle数据库环境(包括已安装的组件和相关应用程序)转换为新版本的 Oracle数据库环境。数据库的数据字典升级到新版本。升级不直接影响用户数据;在升级过程中,不会碰触、更改或移动任何数据)
迁移数据指的是将数据从一个Oracle数据库迁移到之前为迁移或移动数据而创建的另一个数据库。当需要将数据库环境迁移到新的硬件或操作系统平台,或迁移到新的字符集时,可以迁移数据。迁移不包括升级到最新版本。数据迁移后,升级过程将单独进行
1.2 方法
Oracle提供了一些特性和产品来自动化升级过程,并帮助您有效地完成升级
Oracle数据库支持以下方法将数据库升级或迁移到新版本:
- 数据库升级助手 (DBUA)
- 提供图形用户界面,指导您升级数据库。DBUA可以在安装过程中使用Oracle Universal Installer启动,或者您可以在以后的任何时间将DBUA作为独立工具启动。
- 使用并行升级实用程序和其他命令行实用程序手动升级
- 允许使用shell脚本执行升级。
- 使用Oracle Data Pump迁移数据提供导出和导入实用程序。
- Oracle Data Pump可以从您的数据库执行完全或部分导出,然后完全或部分导入到新版本的Oracle数据库。Oracle数据泵中的导出/导入可以复制数据的一个子集,而保持数据库不变。
CREATE TABLE AS
SQL语句将数据从数据库迁移到新的Oracle数据库版本。- 通过使用此方法,您可以复制数据的一个子集,而保持数据库不变。
- 使用优先级列表升级CDB和PDB,根据其优先级对PDB进行分组和升级。
- 使用选项运行并行升级实用程序(
dbupgrade
、 或catctl.pl
)-L
以使用优先级列表运行升级,并在升级运行时调用该列表。
- 使用选项运行并行升级实用程序(
- 同步备用数据库、升级并使用Oracle GoldenGate同步升级后的数据库(零停机选项)
- 使用Fleet Patching and Provisioning (FPP) 升级数据库。
- 在 Fleet Patching and Provisioning (FPP)升级(以前称为 Rapid Home Provisioning)中,您完成了新的Oracle数据库安装。在测试数据库并根据要用于数据库的标准操作环境 (SOE) 对其进行修改后,您将创建 FPP黄金映像。DBA 将该黄金映像的实例部署到具有要升级的早期版本数据库的服务器。部署这些黄金映像后,DBA 可以运行单个
rhpctl
命令来移动文件、执行配置更改以及执行使用新二进制文件所需的其他步骤。
- 在 Fleet Patching and Provisioning (FPP)升级(以前称为 Rapid Home Provisioning)中,您完成了新的Oracle数据库安装。在测试数据库并根据要用于数据库的标准操作环境 (SOE) 对其进行修改后,您将创建 FPP黄金映像。DBA 将该黄金映像的实例部署到具有要升级的早期版本数据库的服务器。部署这些黄金映像后,DBA 可以运行单个
关于Oracle数据库自动升级
AutoUpgrade实用程序在升级前识别问题、执行升级前和升级后操作、部署升级、执行升级后操作并启动升级后的Oracle数据库。
AutoUpgrade实用程序旨在在开始升级之前、升级部署期间以及升级后检查和配置迁移期间自动执行升级过程。在下载新Oracle数据库版本的二进制文件并设置新版本Oracle主目录后,您可以使用AutoUpgrade。使用AutoUpgrade时,您可以使用单个配置文件同时升级多个Oracle数据库部署,并根据每个数据库部署的需要进行定制。
通过2019年1月的版本更新(DBJAN2019RU
) 和更高版本的更新,自动升级支持适用于Oracle Database 12c 第 2 版 (12.2) 和 Oracle Database 18c (18.5)目标主页。对于Oracle Database 12c 第 2 版 (12.2)和Oracle Database 18c (18.5)目标主页,您必须从My Oracle Support文档2485457.1下载AutoUpgrade工具包。
在Oracle Database 19c (19.3)和更高版本的目标Oracle主autoupgrade.jar
目录中,该文件默认存在。但是,在您使用AutoUpgrade之前,Oracle强烈建议您下载最新的AutoUpgrade版本。AutoUpgrade包含在每个版本更新 (RU) 中,但最新的AutoUpgrade版本始终可从My Oracle Support文档2485457.1中获得。
1.3 支持直接升级的oracle数据库版本
- 11.2.0.4
- 12.1.0.2
- 12.2.0.1
- 18
注:对于任何多步升级,如果必须进行两次升级才能升级到当前版本,则必须运行两次preupgrade脚本:首先,完成升级到支持直接升级到目标升级的中间升级版本发布。其次,完成目标升级版本的升级。
例如,如果您要升级的数据库运行的是Oracle Database 10g,那么要升级到Oracle Database 19c,请执行以下步骤:
-
- 使用Oracle Database Upgrade Guide 12c Release 1(12.1)中的说明将版本10.2.0.5升级到版本12.1.0.2(终端补丁集版本)包括运行12.1.0.2的预升级脚本。
- 将Oracle Database 12c第1版(12.1.0.2) 直接升级到Oracle Database 19c。使用本书Oracle Database Upgrade Guide中的说明,包括运行Oracle Database 19c的预升级脚本。
也就是说,如果是版本比较低,那么可以升级到以上一个版本,然后再升级到 19c
在以上版本在升级之前需要打相应的patch,如下表中是每个版本需要打的patch列表:
以下着重以12.2.0.1为主,后续以12.2.0.1升级到19c为例操作
总体来看,在升级到19c时有两大路径:
本地升级
迁移升级
1.4 关于Oracle数据库版本号
二、升级环境介绍
Source
OS:RHEL 7.5
DB:12.2.0.1 未打最新patch SID:orcl
架构: NON-CDB
Destination
OS:RHEL 7.5
DB:19.3.0.0.0
架构:NON-CDB
三、升级前准备
从MOS上下载12.2.0.1的patch包(需要权限才能下载):
注:根据以上的patch列表下载
p28553832_12201190115OCWJAN2019RU_Linux-x86-64(Patch Number: 28553832)
19.3.0.0的软件包(image或rpm都可以,本实验中使用的是image)
LINUX.X64_193000_db_home(官网下载即可)
升级方式:AutoUpgrade (Doc ID: 2485457.1)
Oracle升级所需:
百度云下载 提取码:d2sk 或 百度云下载: 提取码:tlev
四、Auto Upgrade介绍
4.1 概述
4.2 Java版本的支持
4.3 升级流程
五、升级
5.1 打补丁
5.1.1 查看12.2.0.1版本需要的补丁
5.1.2 使用xftp上传补丁包到/soft目录
rpm -ivh /soft/compat-libstdc++-33-3.2.3-72.el7.x86_64.rpm
5.1.3 设置权限
chmod 775 /soft -R chown oracle:oinstall /soft -R
5.1.4 解压、关库
su - oracle unzip /soft/p28553832_12201190115OCWJAN2019RU_Linux-x86-64.zip -d /home/oracle
shutdown immediate
5.1.5 查看opatch命令帮助
which opatch opatch -help
5.1.6 查看现有patch
opatch lsinv
5.1.7 打patch
cd /home/oracle/28553832/28553832/ opatch apply
5.1.8 查看最新patch
opatch lsinv
oracle@dba ~ $ opatch lsinv Oracle Interim Patch Installer version 12.2.0.1.6 Copyright (c) 2021, Oracle Corporation. All rights reserved. Oracle Home : /u01/app/oracle/product/12.2.0/dbhome_1 Central Inventory : /u01/app/oraInventory from : /u01/app/oracle/product/12.2.0/dbhome_1/oraInst.loc OPatch version : 12.2.0.1.6 OUI version : 12.2.0.1.4 Log file location : /u01/app/oracle/product/12.2.0/dbhome_1/cfgtoollogs/opatch/opatch2021-07-27_19-08-48PM_1.log Lsinventory Output file location : /u01/app/oracle/product/12.2.0/dbhome_1/cfgtoollogs/opatch/lsinv/lsinventory2021-07-27_19-08-48PM.txt -------------------------------------------------------------------------------- Local Machine Information:: Hostname: dba ARU platform id: 226 ARU platform description:: Linux x86-64 Installed Top-level Products (1): Oracle Database 12c 12.2.0.1.0 There are 1 products installed in this Oracle Home. Interim patches (1) : Patch 28553832 : applied on Tue Jul 27 18:46:41 CST 2021 Unique Patch ID: 22639719 Patch description: "OCW Interim patch for 28553832" Created on 25 Dec 2018, 00:16:48 hrs PST8PDT Bugs fixed: 28553832, 12816839, 13250991, 18701017, 20559126, 21477269, 21679331 22322021, 22734786, 22986384, 22999793, 23170674, 23297046, 23301767 23340259, 23346234, 23722215, 23760401, 23762756, 24330981, 24372941 24396050, 24403376, 24411578, 24422155, 24423011, 24445255, 24451580 24462646, 24464953, 24509984, 24546078, 24578464, 24583356, 24584419 24600431, 24657753, 24663993, 24664849, 24665035, 24670214, 24673586 24696235, 24732650, 24736511, 24792446, 24796183, 24797972, 24801915 24808260, 24820676, 24824518, 24831158, 24831217, 24902553, 24908629 24932026, 24953946, 25025157, 25026470, 25037011, 25037836, 25049033 25066549, 25089164, 25100966, 25131365, 25137752, 25164540, 25197395 25197670, 25216003, 25233797, 25245759, 25251382, 25269635, 25291358 25301463, 25304126, 25307145, 25325522, 25327670, 25329178, 25354530 25360754, 25361169, 25369170, 25371632, 25385515, 25397620, 25408895 25409838, 25448462, 25448476, 25485737, 25492219, 25493588, 25496699 25499276, 25505841, 25509979, 25518447, 25537905, 25540583, 25541343 25556203, 25564644, 25569634, 25576767, 25591658, 25633406, 25644425 25646592, 25655495, 25662028, 25667162, 25685286, 25697364, 25698636 25715140, 25715179, 25716769, 25717212, 25728787, 25729214, 25742471 25742704, 25774482, 25776294, 25784424, 25785073, 25789051, 25790699 25795447, 25801922, 25803563, 25810476, 25825732, 25825755, 25832312 25832375, 25851874, 25856024, 25865563, 25885834, 25890662, 25893570 25915863, 25927065, 25943805, 25947195, 25948946, 25951778, 25956724 25987595, 25996923, 25998093, 26002739, 26035888, 26052877, 26088770 26111524, 26115835, 26116932, 26121788, 26144044, 26185271, 26185431 26198627, 26230199, 26238801, 26248428, 26257547, 26264417, 26282865 26301456, 26307166, 26308703, 26313403, 26316238, 26326556, 26357098 26372145, 26379711, 26387283, 26391418, 26418606, 26419112, 26431982 26433972, 26433979, 26439462, 26439893, 26473232, 26474627, 26477705 26493466, 26494006, 26494536, 26527054, 26529142, 26546632, 26547521 26552807, 26567325, 26581118, 26586174, 26587652, 26588288, 26593581 26624184, 26633228, 26654615, 26664476, 26709107, 26710631, 26716037 26747738, 26754328, 26755613, 26791882, 26817081, 26817275, 26817995 26818064, 26818368, 26822082, 26827699, 26860285, 26875825, 26877592 26884984, 26943660, 26950548, 26958202, 26973611, 26979409, 26996813 27006180, 27012234, 27018734, 27023569, 27040560, 27047274, 27068526 27070729, 27080761, 27092991, 27094352, 27106915, 27114112, 27119820 27130514, 27133637, 27153755, 27154002, 27174938, 27182006, 27186837 27190262, 27213140, 27222423, 27222938, 27249544, 27252023, 27267992 27274143, 27297582, 27300007, 27309182, 27358232, 27370933, 27377219 27378959, 27379846, 27399762, 27403244, 27404599, 27426277, 27440094 27475272, 27507494, 27516078, 27526362, 27532009, 27534289, 27536738 27542831, 27554103, 27554304, 27555886, 27566153, 27577122, 27581484 27593587, 27595801, 27600706, 27624923, 27628221, 27664844, 27668379 27682288, 27691717, 27702244, 27703242, 27708711, 27712736, 27735534 27739957, 27747407, 27753602, 27757979, 27766679, 27769638, 27786669 27811439, 27850736, 27862636, 27870441, 27899060, 27953102, 27970426 27972271, 27984314, 28030440, 28032758, 28050201, 28071462, 28084656 28097951, 28105136, 28127661, 28146584, 28161727, 28266751, 28285234 28375138, 28383213, 28393555, 28462215, 28477613, 28504730, 28535778 28558622, 28578962, 28593407, 28887933 -------------------------------------------------------------------------------- OPatch succeeded.
5.2 安装19c软件
5.2.1 创建新的ORACLE_HOME
mkdir -p /u01/app/oracle/product/19.3.0/dbhome_1
5.2.2 修改环境变量
vi .bash_profile
source .bash_profile echo $ORACLE_HOME
5.2.3 解压软件包
unzip /soft/LINUX.X64_193000_db_home.zip -d $ORACLE_HOME
5.2.4 安装软件
export DISPLAY=192.168.9.1:0.0 cd $ORACLE_HOME ./runInstaller
开始安装步骤:
5.3 本地升级
5.3.1 检查java版本
java -version
5.3.2 准备AUTOUPGRADE工具
cp /soft/autoupgrade.jar $ORACLE_HOME/rdbms/admin cd $ORACLE_HOME/rdbms/admin ll autoupgrade.jar
5.3.3 创建配置文件
vi $ORACLE_HOME/rdbms/admin/config.cfg
添加以下内容:
global.autoupg_log_dir=/home/oracle/logs upg1.start_time=NOW upg1.source_home=/u01/app/oracle/product/12.2.0/dbhome_1 upg1.target_home=/u01/app/oracle/product/19.3.0/dbhome_1 upg1.sid=orcl upg1.log_dir=/home/oracle/logs/orcl upg1.upgrade_node=localhost upg1.target_version=19
5.3.4 切换环境变量
vi .bash_profile cat .bash_profile source .bash_profile
5.3.5 启动数据库
sqlplus / as sysdba startup
5.3.6 开启闪回及归档模式
mkdir /u01/flash_recovery_area
alter system set db_recovery_file_dest_size=4G; alter system set db_recovery_file_dest='/u01/flash_recovery_area';
shutdown immediate startup mount alter database archivelog; alter database open; alter database flashback on;
5.3.7 切回环境变量
vi .bash_profile cat .bash_profile source .bash_profile
5.3.8 Analyze分析
cd $ORACLE_HOME/rdbms/admin/ java -jar $ORACLE_HOME/rdbms/admin/autoupgrade.jar -config config.cfg -mode analyze
在upg> 命令行中可使用:
help:查看帮助命令
status:查看升级状态和正在升级中的job_id
status -job job_id:查看分析进度百分比
Analyze分析输出内容
oracle@dba ~ $ cd $ORACLE_HOME/rdbms/admin/ oracle@dba /u01/app/oracle/product/19.3.0/dbhome_1/rdbms/admin $ java -jar $ORACLE_HOME/rdbms/admin/autoupgrade.jar -config config.cfg -mode analyze AutoUpgrade tool launched with default options Processing config file ... +--------------------------------+ | Starting AutoUpgrade execution | +--------------------------------+ 1 databases will be analyzed Type 'help' to list console commands upg> status ---------------- Config ------------------- User configuration file [/u01/app/oracle/product/19.3.0/dbhome_1/rdbms/admin/config.cfg] General logs location [/home/oracle/logs/cfgtoollogs/upgrade/auto] Mode [ANALYZE] DB upg fatal errors ORA-00600,ORA-07445 DB Post upgrade abort time [60] minutes DB upg abort time [1440] minutes DB restore abort time [120] minutes DB GRP abort time [3] minutes ------------------------ Jobs ------------------------ Total databases in configuration file [1] Total Non-CDB being processed [1] Total CDB being processed [0] Jobs finished successfully [0] Jobs finished/aborted [0] Jobs in progress [1] Jobs stage summary Job ID: 101 DB name: orcl SETUP <1 min PRECHECKS <1 min (IN PROGRESS) ------------ Resources ---------------- Threads in use [12] JVM used memory [21] MB CPU in use [13%] Processes in use [12] upg> status -job 101 Progress ----------------------------------- Start time: 21/07/27 23:53 Elapsed (min): 1 End time: N/A Last update: 2021-07-27T23:54:09.273 Stage: PRECHECKS Operation: PREPARING Status: RUNNING Pending stages: 1 Stage summary: SETUP <1 min PRECHECKS <1 min (IN PROGRESS) Job Logs Locations ----------------------------------- Logs Base: /home/oracle/logs/orcl/orcl Job logs: /home/oracle/logs/orcl/orcl/101 Stage logs: /home/oracle/logs/orcl/orcl/101/prechecks TimeZone: /home/oracle/logs/orcl/orcl/temp Additional information ----------------------------------- Details: +--------+-------------------------+--------+ |DATABASE| CHECK| STATUS| +--------+-------------------------+--------+ | orcl|PLUGIN_COMP_COMPATIBILITY|FINISHED| | orcl| AMD_EXISTS|FINISHED| | orcl| COMPATIBLE_NOT_SET|FINISHED| | orcl| COMPATIBLE_PARAMETER|FINISHED| | orcl| CASE_INSENSITIVE_AUTH|FINISHED| | orcl| CYCLE_NUMBER|FINISHED| | orcl| CREATE_WINDOWS_SERVICE|FINISHED| | orcl| AUDTAB_ENC_TS|FINISHED| | orcl| DV_ENABLED|FINISHED| | orcl| AWR_EXPIRED_SNAPSHOTS|FINISHED| | orcl| DATA_MINING_OBJECT|FINISHED| | orcl| CONC_RES_MGR|FINISHED| | orcl|FLASH_RECOVERY_AREA_SETUP|FINISHED| | orcl| DV_SIMULATION|FINISHED| | orcl| FILES_NEED_RECOVERY|FINISHED| | orcl| HIDDEN_PARAMS|FINISHED| | orcl| DEPEND_USR_TABLES|FINISHED| | orcl| INVALID_OBJECTS_EXIST|FINISHED| | orcl| DICTIONARY_STATS|FINISHED| | orcl| INVALID_SYS_TABLEDATA|FINISHED| | orcl| ORACLE_RESERVED_USERS|FINISHED| | orcl| TRGOWNER_NO_ADMNDBTRG| STARTED| | orcl| JAVAVM_STATUS|FINISHED| | orcl| MV_REFRESH| STARTED| | orcl| INVALID_USR_TABLEDATA|FINISHED| | orcl| PENDING_DST_SESSION|FINISHED| | orcl| POST_DICTIONARY|FINISHED| | orcl| JVM_MITIGATION_PATCH|FINISHED| | orcl| POST_FIXED_OBJECTS|FINISHED| | orcl| RAISE_COMPATIBLE|FINISHED| | orcl| COMPATIBLE_PFILES|FINISHED| | orcl| PRE_FIXED_OBJECTS| STARTED| | orcl| POST_JVM_MITIGAT_PATCH|FINISHED| | orcl| PURGE_RECYCLEBIN| STARTED| +--------+-------------------------+--------+ Error Details: None upg> Job 101 completed ------------------- Final Summary -------------------- Number of databases [ 1 ] Jobs finished [1] Jobs failed [0] Jobs pending [0] Please check the summary report at: /home/oracle/logs/cfgtoollogs/upgrade/auto/status/status.html /home/oracle/logs/cfgtoollogs/upgrade/auto/status/status.log
查看日志:
cat /home/oracle/logs/cfgtoollogs/upgrade/auto/status/status.log
5.3.9 Deploy
cd $ORACLE_HOME/rdbms/admin java -jar $ORACLE_HOME/rdbms/admin/autoupgrade.jar -config config.cfg -mode deploy
在upg> 命令行中可使用:
help:查看帮助命令
status:查看升级状态和正在升级中的job_id
status -job job_id:查看部署进度百分比
oracle@dba ~ $ cd $ORACLE_HOME/rdbms/admin oracle@dba /u01/app/oracle/product/19.3.0/dbhome_1/rdbms/admin $ java -jar $ORACLE_HOME/rdbms/admin/autoupgrade.jar -config config.cfg -mode deploy AutoUpgrade tool launched with default options Processing config file ... +--------------------------------+ | Starting AutoUpgrade execution | +--------------------------------+ 1 databases will be processed Type 'help' to list console commands upg> status ---------------- Config ------------------- User configuration file [/u01/app/oracle/product/19.3.0/dbhome_1/rdbms/admin/config.cfg] General logs location [/home/oracle/logs/cfgtoollogs/upgrade/auto] Mode [DEPLOY] DB upg fatal errors ORA-00600,ORA-07445 DB Post upgrade abort time [60] minutes DB upg abort time [1440] minutes DB restore abort time [120] minutes DB GRP abort time [3] minutes ------------------------ Jobs ------------------------ Total databases in configuration file [1] Total Non-CDB being processed [1] Total CDB being processed [0] Jobs finished successfully [0] Jobs finished/aborted [0] Jobs in progress [1] Jobs stage summary Job ID: 102 DB name: orcl SETUP <1 min GRP <1 min PREUPGRADE <1 min PRECHECKS <1 min (IN PROGRESS) ------------ Resources ---------------- Threads in use [12] JVM used memory [28] MB CPU in use [13%] Processes in use [12] upg> status -job 102 Progress ----------------------------------- Start time: 21/07/28 00:00 Elapsed (min): 0 End time: N/A Last update: 2021-07-28T00:00:14.148 Stage: PRECHECKS Operation: PREPARING Status: RUNNING Pending stages: 10 Stage summary: SETUP <1 min GRP <1 min PREUPGRADE <1 min PRECHECKS <1 min (IN PROGRESS) Job Logs Locations ----------------------------------- Logs Base: /home/oracle/logs/orcl/orcl Job logs: /home/oracle/logs/orcl/orcl/102 Stage logs: /home/oracle/logs/orcl/orcl/102/prechecks TimeZone: /home/oracle/logs/orcl/orcl/temp Additional information ----------------------------------- Details: Checks
Error Details: None
upg> status -job 102 Progress ----------------------------------- Start time: 21/07/28 00:00 Elapsed (min): 0 End time: N/A Last update: 2021-07-28T00:00:44.189 Stage: PREFIXUPS Operation: EXECUTING Status: RUNNING Pending stages: 9 Stage summary: SETUP <1 min GRP <1 min PREUPGRADE <1 min PRECHECKS <1 min PREFIXUPS <1 min (IN PROGRESS) Job Logs Locations ----------------------------------- Logs Base: /home/oracle/logs/orcl/orcl Job logs: /home/oracle/logs/orcl/orcl/102 Stage logs: /home/oracle/logs/orcl/orcl/102/prefixups TimeZone: /home/oracle/logs/orcl/orcl/temp Additional information ----------------------------------- Details: +--------+----------------+-------+ |DATABASE| FIXUP| STATUS| +--------+----------------+-------+ | orcl|DICTIONARY_STATS|STARTED| +--------+----------------+-------+
Error Details: None upg> status ---------------- Config ------------------- User configuration file [/u01/app/oracle/product/19.3.0/dbhome_1/rdbms/admin/config.cfg] General logs location [/home/oracle/logs/cfgtoollogs/upgrade/auto] Mode [DEPLOY] DB upg fatal errors ORA-00600,ORA-07445 DB Post upgrade abort time [60] minutes DB upg abort time [1440] minutes DB restore abort time [120] minutes DB GRP abort time [3] minutes ------------------------ Jobs ------------------------ Total databases in configuration file [1] Total Non-CDB being processed [1] Total CDB being processed [0] Jobs finished successfully [0] Jobs finished/aborted [0] Jobs in progress [1] Jobs stage summary Job ID: 102 DB name: orcl SETUP <1 min GRP <1 min PREUPGRADE <1 min PRECHECKS <1 min PREFIXUPS 2 min DRAIN <1 min DBUPGRADE <1 min (IN PROGRESS) ------------ Resources ---------------- Threads in use [25] JVM used memory [68] MB CPU in use [13%] Processes in use [16]
upg> status -job 102
Progress
-----------------------------------
Start time: 21/07/28 00:00
Elapsed (min): 7
End time: N/A
Last update: 2021-07-28T00:07:35.426
Stage: DBUPGRADE
Operation: EXECUTING
Status: RUNNING
Pending stages: 7
Stage summary:
SETUP <1 min GRP <1 min PREUPGRADE <1 min PRECHECKS <1 min PREFIXUPS 2 min DRAIN <1 min DBUPGRADE 3 min (IN PROGRESS) Job Logs Locations ----------------------------------- Logs Base: /home/oracle/logs/orcl/orcl Job logs: /home/oracle/logs/orcl/orcl/102 Stage logs: /home/oracle/logs/orcl/orcl/102/dbupgrade TimeZone: /home/oracle/logs/orcl/orcl/temp Additional information ----------------------------------- Details: [Upgrading] is [8%] completed for [orcl] +---------+------------+ |CONTAINER| PERCENTAGE| +---------+------------+ | orcl|UPGRADE [8%]| +---------+------------+
Error Details:
None
upg> status -job 102 Progress ----------------------------------- Start time: 21/07/28 00:00 Elapsed (min): 18 End time: N/A Last update: 2021-07-28T00:16:42.352 Stage: DBUPGRADE Operation: EXECUTING Status: RUNNING Pending stages: 7 Stage summary: SETUP <1 min GRP <1 min PREUPGRADE <1 min PRECHECKS <1 min PREFIXUPS 2 min DRAIN <1 min DBUPGRADE 14 min (IN PROGRESS) Job Logs Locations ----------------------------------- Logs Base: /home/oracle/logs/orcl/orcl Job logs: /home/oracle/logs/orcl/orcl/102 Stage logs: /home/oracle/logs/orcl/orcl/102/dbupgrade TimeZone: /home/oracle/logs/orcl/orcl/temp Additional information ----------------------------------- Details: [Upgrading] is [23%] completed for [orcl] +---------+-------------+ |CONTAINER| PERCENTAGE| +---------+-------------+ | orcl|UPGRADE [23%]| +---------+-------------+ Error Details: None upg> status -job 102 Progress ----------------------------------- Start time: 21/07/28 00:00 Elapsed (min): 32 End time: N/A Last update: 2021-07-28T00:31:54.840 Stage: DBUPGRADE Operation: EXECUTING Status: RUNNING Pending stages: 7 Stage summary: SETUP <1 min GRP <1 min PREUPGRADE <1 min PRECHECKS <1 min PREFIXUPS 2 min DRAIN <1 min DBUPGRADE 28 min (IN PROGRESS)
Job Logs Locations ----------------------------------- Logs Base: /home/oracle/logs/orcl/orcl Job logs: /home/oracle/logs/orcl/orcl/102 Stage logs: /home/oracle/logs/orcl/orcl/102/dbupgrade TimeZone: /home/oracle/logs/orcl/orcl/temp Additional information ----------------------------------- Details: [Upgrading] is [65%] completed for [orcl] +---------+-------------+ |CONTAINER| PERCENTAGE| +---------+-------------+ | orcl|UPGRADE [65%]| +---------+-------------+
Error Details:
None
upg> status -job 102 Progress ----------------------------------- Start time: 21/07/28 00:00 Elapsed (min): 36 End time: N/A Last update: 2021-07-28T00:34:57.178 Stage: DBUPGRADE Operation: EXECUTING Status: RUNNING Pending stages: 7 Stage summary: SETUP <1 min GRP <1 min PREUPGRADE <1 min PRECHECKS <1 min PREFIXUPS 2 min DRAIN <1 min DBUPGRADE 32 min (IN PROGRESS) Job Logs Locations ----------------------------------- Logs Base: /home/oracle/logs/orcl/orcl Job logs: /home/oracle/logs/orcl/orcl/102 Stage logs: /home/oracle/logs/orcl/orcl/102/dbupgrade TimeZone: /home/oracle/logs/orcl/orcl/temp Additional information ----------------------------------- Details: [Upgrading] is [75%] completed for [orcl] +---------+-------------+ |CONTAINER| PERCENTAGE| +---------+-------------+ | orcl|UPGRADE [75%]| +---------+-------------+ Error Details: None upg> status -job 102 Progress ----------------------------------- Start time: 21/07/28 00:00 Elapsed (min): 45 End time: N/A Last update: 2021-07-28T00:44:05.220 Stage: DBUPGRADE Operation: EXECUTING Status: RUNNING Pending stages: 7 Stage summary: SETUP <1 min GRP <1 min PREUPGRADE <1 min PRECHECKS <1 min PREFIXUPS 2 min DRAIN <1 min DBUPGRADE 42 min (IN PROGRESS) Job Logs Locations ----------------------------------- Logs Base: /home/oracle/logs/orcl/orcl Job logs: /home/oracle/logs/orcl/orcl/102 Stage logs: /home/oracle/logs/orcl/orcl/102/dbupgrade TimeZone: /home/oracle/logs/orcl/orcl/temp Additional information ----------------------------------- Details: [Upgrading] is [91%] completed for [orcl] +---------+-------------+ |CONTAINER| PERCENTAGE| +---------+-------------+ | orcl|UPGRADE [91%]| +---------+-------------+ Error Details: None upg> status -job -102 Unrecognized cmd: status -job -102 upg> status -job 102 Progress ----------------------------------- Start time: 21/07/28 00:00 Elapsed (min): 55 End time: N/A Last update: 2021-07-28T00:55:42.548 Stage: POSTFIXUPS Operation: EXECUTING Status: RUNNING Pending stages: 4 Stage summary: SETUP <1 min GRP <1 min PREUPGRADE <1 min PRECHECKS <1 min PREFIXUPS 2 min DRAIN <1 min DBUPGRADE 43 min POSTCHECKS <1 min POSTFIXUPS 7 min (IN PROGRESS) Job Logs Locations ----------------------------------- Logs Base: /home/oracle/logs/orcl/orcl Job logs: /home/oracle/logs/orcl/orcl/102 Stage logs: /home/oracle/logs/orcl/orcl/102/postfixups TimeZone: /home/oracle/logs/orcl/orcl/temp Additional information ----------------------------------- Details: +--------+--------------------+--------+ |DATABASE| FIXUP| STATUS| +--------+--------------------+--------+ | orcl| POST_UTLRP|FINISHED| | orcl| POST_DICTIONARY|FINISHED| | orcl| TIMESTAMP_MISMATCH|FINISHED| | orcl|OLD_TIME_ZONES_EXIST| STARTED| +--------+--------------------+--------+ Error Details: None upg> Job 102 completed ------------------- Final Summary -------------------- Number of databases [ 1 ] Jobs finished [1] Jobs failed [0] Jobs pending [0] ---- Drop GRP at your convenience once you consider it is no longer needed ---- Drop GRP from orcl: drop restore point AUTOUPGRADE_9212_ORCL122010 Please check the summary report at: /home/oracle/logs/cfgtoollogs/upgrade/auto/status/status.html /home/oracle/logs/cfgtoollogs/upgrade/auto/status/status.log
查看日志:
cat /home/oracle/logs/cfgtoollogs/upgrade/auto/status/status.log
5.4 检查是否升级成功
desc REGISTRY$ERROR; select * from REGISTRY$ERROR;
查看日志,状态都为upgraded表示升级成功
cat /home/oracle/logs/orcl/orcl/102/dbupgrade/upg_summary.log