Oracle11.2.0.4 RAC迁移升级Oracle19.3 RAC

问题描述

填写问题的基础信息。

系统名称

Oracle11.2.0.4迁移升级Oracle19.3

IP地址

操作系统

Centos7.5

数据库

Oracle11.2.0.4迁移升级Oracle19.3

症状表现

问题的症状表现如下

需要将单机的Oracle11.2.0.4环境升级到Oracle19.3.0RAC环境,采用迁移升级的方式:

数据库版本

IP地址

源端

Oracle11.2.0.4 单机

192.168.123.10

目标

Oracle19.3.0 RAC

192.168.123.3/4

处理过程

处理过程推荐按照时间以列表形式,将处理过程时间点,处理内容。

1、下载最近的Autoupgrade工具,AutoUpgrade 工具 (Doc ID 3010002.1):

📎autoupgrade.jar

2、目标库&源端-配置JAVA环境变量,直接使用19c安装时候JDK:

#目标端
[oracle@ora19c1 bin]$ ./java -version
java version "1.8.0_201"
Java(TM) SE Runtime Environment (build 1.8.0_201-b09)
Java HotSpot(TM) 64-Bit Server VM (build 25.201-b09, mixed mode)
[oracle@ora19c1 bin]$ pwd
/u01/app/oracle/product/19.3.0/db_1/jdk/bin#配置/etc/profile
export JAVA_HOME=/u01/app/oracle/product/19.3.0/db_1/jdk
export JRE_HOME=/u01/app/oracle/product/19.3.0/db_1/jdk/jre
export PATH=$PATH:$JAVA_HOME/bin#验证
[root@ora19c1 ~]# source /etc/profile
[root@ora19c1 ~]# java -version
java version "1.8.0_201"
Java(TM) SE Runtime Environment (build 1.8.0_201-b09)
Java HotSpot(TM) 64-Bit Server VM (build 25.201-b09, mixed mode)
[root@ora19c1 ~]# su - oracle
Last login: Tue Jun 24 18:36:49 CST 2025 on pts/0
[oracle@ora19c1 ~]$ java -version
java version "1.8.0_201"
Java(TM) SE Runtime Environment (build 1.8.0_201-b09)
Java HotSpot(TM) 64-Bit Server VM (build 25.201-b09, mixed mode)
[oracle@ora19c1 ~]$ java -jar autoupgrade.jar -version
build.version 25.3.250509
build.date 2025/05/09 02:53:51 +0000
build.hash 3110a3d32
build.hash_date 2025/05/05 19:43:04 +0000
build.supported_target_versions 12.2,18,19,21,23
build.type production
build.label (HEAD, tag: v25.3, origin/stable_devel, stable_devel)
build.MOS_NOTE 2485457.1
build.MOS_LINK https://support.oracle.com/epmos/faces/DocumentDisplay?id=2485457.1[oracle@ora19c1 upgrade]$ scp -r $ORACLE_HOME/jdk 192.168.123.10:/home/oracle#源端:
[root@ora11g ~]# vi /etc/profileexport JAVA_HOME=/home/oracle/jdk
export JRE_HOME=/home/oracle/jdk/jre
export PATH=$PATH:$JAVA_HOME/bin

3、源端-创建升级配置文件并检查升级要求

[oracle@ora11g upgrade]$ java -jar autoupgrade.jar -create_sample_file config
Created sample configuration file /home/oracle/upgrade/sample_config.cfg#Global configurations
#Autoupgrade's global directory, ...
#temp files created and other ...
#send here
global.autoupg_log_dir=/home/oracle/upgrade#
# Database number 1 
# 
upg1.dbname=orcl
upg1.start_time=NOW
upg1.source_home=/u01/app/oracle/product/11.2.0/db_1
upg1.target_home=/u01/app/oracle/product/19.3.0/db_1
upg1.sid=orcl
upg1.log_dir=/home/oracle/upgrade
upg1.upgrade_node=ora11g
upg1.target_version=19
upg1.restoration=no#进行检查
[oracle@ora11g upgrade]$ java -jar autoupgrade.jar -config ./sample_config.cfg -mode analyze
AutoUpgrade 25.3.250509 launched with default internal options
Processing config file ...
+--------------------------------+
| Starting AutoUpgrade execution |
+--------------------------------+
1 Non-CDB(s) will be analyzed
Type 'help' to list console commands
upg> Job 100 completed
------------------- Final Summary --------------------
Number of databases            [ 1 ]Jobs finished                  [1]
Jobs failed                    [0]Please check the summary report at:
/home/oracle/upgrade/cfgtoollogs/upgrade/auto/status/status.html
/home/oracle/upgrade/cfgtoollogs/upgrade/auto/status/status.log#显示检查结果正常
[oracle@ora11g upgrade]$ more /home/oracle/upgrade/cfgtoollogs/upgrade/auto/status/status.log
==========================================Autoupgrade Summary Report
==========================================
[Date]           Tue Jun 24 16:05:29 CST 2025
[Number of Jobs] 1
==========================================
[Job ID] 100
==========================================
[DB Name]                orcl
[Version Before Upgrade] 11.2.0.4.0
[Version After Upgrade]  19
------------------------------------------
[Stage Name]    PRECHECKS
[Status]        SUCCESS
[Start Time]    2025-06-24 16:05:16
[Duration]      0:00:12
[Log Directory] /home/oracle/upgrade/orcl/100/prechecks
[Detail]        /home/oracle/upgrade/orcl/100/prechecks/orcl_preupgrade.logCheck passed and no manual intervention needed
------------------------------------------#查看进一步的orcl_preupgrade.log发现有一些waring和建议:
BEFORE UPGRADE
==============REQUIRED ACTIONS================NoneRECOMMENDED ACTIONS===================1.  (AUTOFIXUP) Remove OLAP Catalog by running the 11.2.0.4.0 SQL script$ORACLE_HOME/olap/admin/catnoamd.sql script.Starting with Oracle Database 12c, the OLAP Catalog (OLAP AMD) isdesupported and will be automatically marked as OPTION OFF during thedatabase upgrade if present. Oracle recommends removing OLAP Catalog(OLAP AMD) before database upgrade. This step can be manually performedbefore the upgrade to reduce downtime.The OLAP Catalog component, AMD, exists in the database.2.  (AUTOFIXUP) Connect to the database as SYS to drop all Data Pump AdvancedQueuing (AQ) tables prior to upgrading. Check MOS note 2789059.1 fordetails.The database needs to be free of Data Pump Advanced Queuing (AQ) tablesin order for Data Pump AQ message types to be re-created during thedatabase upgrade.There exists at least one Data Pump Advanced Queuing (AQ) table in theSYS schema which might prevent Data Pump AQ message types from gettingre-created.3.  (AUTOFIXUP) Remove the EM repository.- Copy the $ORACLE_HOME/rdbms/admin/emremove.sql script from the target19 ORACLE_HOME into the source 11.2.0.4.0 ORACLE_HOME.Step 1: If database control is configured, stop EM Database Control,using the following command$> emctl stop dbconsoleStep 2: Connect to the database using the SYS account AS SYSDBASET ECHO ON;SET SERVEROUTPUT ON;@emremove.sqlWithout the set echo and serveroutput commands, you will not be able tofollow the progress of the script.Starting with Oracle Database 12c, the local Enterprise Manager DatabaseControl does not exist anymore. The repository will be removed from yourdatabase during the upgrade. This step can be manually performed beforethe upgrade to reduce downtime.The database has an Enterprise Manager Database Control repository.4.  Make sure that all the MVs are refreshed and sys.sumdelta$ becomes emptybefore doing upgrade, unless you have strong business reasons not to doso. You can use dbms_mview.refresh() to refresh the MVs except thosestale ones  to be kept due to business need. If there are any stale MVsdepending on changes in sys.sumdelta$, do not truncate it, because doingso will cause wrong results after refresh. Refer to the Materialized Viewsection in MOS Note 2380601.1 for more details.Oracle recommends that all materialized views (MV's) are refreshed beforeupgrading the database because this will clear the MV logs and thesumdelta$ table and may reduce the upgrade time. If you choose to notrefresh some MVs, the change data for those MV's will be carried throughthe UPGRADE process. After UPGRADE, you can refresh the MV's and  MVincremental refresh should work in normal cases.There are one or more materialized views in either stale or invalidstate, or which are currently being refreshed.5.  (AUTOFIXUP) Update NUMERIC INITIALIZATION PARAMETERS to meet estimatedminimums. This action may be done now or when starting the database inupgrade mode using the 19 ORACLE HOME.The database upgrade process requires certain initialization parametersto meet minimum values. The Oracle upgrade process itself has minimumvalues which may be higher and are marked with an asterisk. Afterupgrading, those asterisked parameter values may be reset if needed.Parameter                                 Currently  19 minimum---------                                 ---------  ------------------*sga_target                                624951296          10024386566.  Upgrade Oracle Application Express (APEX) manually before or after thedatabase upgrade.Starting with Oracle Database Release 18, APEX is not upgradedautomatically as part of the database upgrade. Refer to My Oracle SupportNote 1088970.1 for information about APEX installation and upgrades.Refer to MOS Note 1344948.1 for the minimum APEX version supported foryour target database release. Unsupported versions of APEX will be in anINVALID state when its database dependencies are not in sync with theupgraded database.The database contains APEX. APEX must be upgraded either before or afterthe database is upgraded7.  Review below list of parameters set in memory only and for the ones thatare intended to be permanent:1. Save these settings in respective SPFILE.2. Run AutoUpgrade in ANALYZE mode so that parameters can get reflectedin interim pfiles created by the tool.The parameters with values that are in memory only are:Instance     Parameter      Memory Value        Parameter File Value----------   ------------   -----------------   --------------------orcl         sga_target     624951296           622854144           orcl         sessions       1222                885                 For database initialization parameter values that are not in thedatabase's initialization parameter file (pfile/spfile), note that thevalues in memory only will be lost on database shutdown in the currentOracle home prior to upgrading. Hence, these values will not be used inthe database upgrade unless they are recorded in the parameter file.Found at least one parameter with a value in memory that is not in thedatabase's initialization parameter file.8.  (AUTOFIXUP) Gather stale data dictionary statistics prior to databaseupgrade in off-peak time using:EXECUTE DBMS_STATS.GATHER_DICTIONARY_STATS;Dictionary statistics help the Oracle optimizer find efficient SQLexecution plans and are essential for proper upgrade timing. Oraclerecommends gathering dictionary statistics in the last 24 hours beforedatabase upgrade.For information on managing optimizer statistics, refer to the 11.2.0.4Oracle Database Performance Tuning Guide.Dictionary statistics do not exist or are stale (not up-to-date).9.  (AUTOFIXUP) Directly grant ADMINISTER DATABASE TRIGGER privilege to theowner of the trigger or drop and re-create the trigger with a user thatwas granted directly with such. You can list those triggers using: SELECTOWNER, TRIGGER_NAME FROM DBA_TRIGGERS WHERETRIM(BASE_OBJECT_TYPE)='DATABASE' AND OWNER NOT IN (SELECT GRANTEE FROMDBA_SYS_PRIVS WHERE PRIVILEGE='ADMINISTER DATABASE TRIGGER').The creation of database triggers must be done by users granted withADMINISTER DATABASE TRIGGER privilege. Privilege must have been granteddirectly.There is one or more database triggers whose owner does not have theright privilege on the database.10. (AUTOFIXUP) Gather statistics on fixed objects prior to the upgrade usingthe command:EXECUTE DBMS_STATS.GATHER_FIXED_OBJECTS_STATS;Gathering statistics on fixed objects, if none have been gathered yet, isrecommended prior to upgrading.For information on managing optimizer statistics, refer to the 11.2.0.4Oracle Database Performance Tuning Guide.None of the fixed object tables have had stats collected.#执行自动fixup
[oracle@ora11g upgrade]$ java -jar autoupgrade.jar -config ./sample_config.cfg -mode fixups
AutoUpgrade 25.3.250509 launched with default internal options
Processing config file ...
+--------------------------------+
| Starting AutoUpgrade execution |
+--------------------------------+
1 Non-CDB(s) will be processed
Type 'help' to list console commands
upg> WARNING: Target home entry is not available. This could be because is not specified in the configuration file or the specified path does not exist, this may lead AutoUpgrade to not be able to run the fixups for certain checks which need the target Oracle home presence.upg> 
upg> lsj
+----+-------+---------+---------+-------+----------+-------+----------------+
|Job#|DB_NAME|    STAGE|OPERATION| STATUS|START_TIME|UPDATED|         MESSAGE|
+----+-------+---------+---------+-------+----------+-------+----------------+
| 101|   orcl|PREFIXUPS|EXECUTING|RUNNING|  16:09:39| 7s ago|Executing fixups|
+----+-------+---------+---------+-------+----------+-------+----------------+
Total jobs 1upg> status -job 101
DetailsJob No           101Oracle SID       orclStart Time       25/06/24 16:09:39Elapsed (min):   0End time:        N/ALogfilesLogs Base:    /home/oracle/upgrade/orclJob logs:     /home/oracle/upgrade/orcl/101Stage logs:   /home/oracle/upgrade/orcl/101/prefixupsTimeZone:     /home/oracle/upgrade/orcl/tempRemote Dirs:  StagesSETUP            <1 minDISPATCH         <1 minPRECHECKS        <1 minPREFIXUPS        ~0 min (RUNNING)Stage-Progress Per Container+--------+---------+|Database|PREFIXUPS|+--------+---------+|    orcl|    8  % |+--------+---------+upg> status -job 101
DetailsJob No           101Oracle SID       orclStart Time       25/06/24 16:09:39Elapsed (min):   2End time:        N/ALogfilesLogs Base:    /home/oracle/upgrade/orclJob logs:     /home/oracle/upgrade/orcl/101Stage logs:   /home/oracle/upgrade/orcl/101/prefixupsTimeZone:     /home/oracle/upgrade/orcl/tempRemote Dirs:  StagesSETUP            <1 minDISPATCH         <1 minPRECHECKS        <1 minPREFIXUPS        ~1 min (RUNNING)Stage-Progress Per Container+--------+---------+|Database|PREFIXUPS|+--------+---------+|    orcl|    8  % |+--------+---------+upg> lsj
+----+-------+---------+---------+-------+----------+--------+----------------+
|Job#|DB_NAME|    STAGE|OPERATION| STATUS|START_TIME| UPDATED|         MESSAGE|
+----+-------+---------+---------+-------+----------+--------+----------------+
| 101|   orcl|PREFIXUPS|EXECUTING|RUNNING|  16:09:39|117s ago|Executing fixups|
+----+-------+---------+---------+-------+----------+--------+----------------+
Total jobs 1upg> exit
There is 1 job in progress. if you exit it will stop
Are you sure you wish to leave? [y|N] Job 101 completed
------------------- Final Summary --------------------
Number of databases            [ 1 ]Jobs finished                  [1]
Jobs failed                    [0]Please check the summary report at:
/home/oracle/upgrade/cfgtoollogs/upgrade/auto/status/status.html
/home/oracle/upgrade/cfgtoollogs/upgrade/auto/status/status.log#验证自动fixup成功
[oracle@ora11g upgrade]$ more /home/oracle/upgrade/cfgtoollogs/upgrade/auto/status/status.log
==========================================Autoupgrade Summary Report
==========================================
[Date]           Tue Jun 24 16:14:30 CST 2025
[Number of Jobs] 1
==========================================
[Job ID] 101
==========================================
[DB Name]                orcl
[Version Before Upgrade] 11.2.0.4.0
[Version After Upgrade]  19
------------------------------------------
[Stage Name]    PRECHECKS
[Status]        SUCCESS
[Start Time]    2025-06-24 16:09:39
[Duration]      0:00:09
[Log Directory] /home/oracle/upgrade/orcl/101/prechecks
[Detail]        /home/oracle/upgrade/orcl/101/prechecks/orcl_preupgrade.logCheck passed and no manual intervention needed
------------------------------------------
[Stage Name]    PREFIXUPS
[Status]        SUCCESS
[Start Time]    2025-06-24 16:09:49
[Duration]      0:03:49
[Log Directory] /home/oracle/upgrade/orcl/101/prefixups
[Detail]        /home/oracle/upgrade/orcl/101/prefixups/prefixups.html
------------------------------------------

4、源库-使用rman备份原有生产数据库:

[oracle@ora11g bak]$ mkdir /home/oracle/rman
[oracle@ora11g bak]$ rman target /RMAN>
run{
allocate channel c1 device type disk;
allocate channel c2 device type disk;
allocate channel c3 device type disk;
allocate channel c4 device type disk;
backup as compressed backupset database format '/home/oracle/rman/db_full_%d_%T_%p_%u.bak';
sql 'alter system archive log current';
backup as compressed backupset archivelog all not backed up 1 times format '/home/oracle/rman/arc_%d_%U.bak';
copy current controlfile to '/home/oracle/rman/cf_%d_id-%I_%u.ctl';
release channel c1;
release channel c2;
release channel c3;
release channel c4;
}[oracle@ora11g rman]$ cd /home/oracle/rman
[oracle@ora11g rman]$ ls -l
total 332992
-rw-r----- 1 oracle oinstall   7602176 Jun 24 14:35 ARCH043sqni0_1_1.bkp
-rw-r----- 1 oracle oinstall   9830400 Jun 24 14:35 c-1732109901-20250624-00
-rw-r----- 1 oracle oinstall   9830400 Jun 24 14:35 c-1732109901-20250624-01
-rw-r----- 1 oracle oinstall   9797632 Jun 24 14:35 control_ctl
-rw-r----- 1 oracle oinstall 303923200 Jun 24 14:35 DB013sqnh3_1_1.bkp

5、目标-恢复rman备份

#先启动一个dummy实例
[oracle@ora19c1 ~]$ export ORACLE_SID=orcl1
[oracle@ora19c1 ~]$ rman target /Recovery Manager: Release 19.0.0.0.0 - Production on Tue Jun 24 14:37:46 2025
Version 19.3.0.0.0Copyright (c) 1982, 2019, Oracle and/or its affiliates.  All rights reserved.connected to target database (not started)RMAN> startup nomount;startup failed: ORA-01078: failure in processing system parameters
LRM-00109: could not open parameter file '/u01/app/oracle/product/19.3.0/db_1/dbs/initorcl1.ora'starting Oracle instance without parameter file for retrieval of spfile
Oracle instance startedTotal System Global Area    1073737800 bytesFixed Size                     8904776 bytes
Variable Size                276824064 bytes
Database Buffers             780140544 bytes
Redo Buffers                   7868416 bytes#恢复spfile文件
RMAN> restore spfile from '/home/oracle/rman/c-1732109901-20250624-01';Starting restore at 24-JUN-25
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=296 device type=DISKchannel ORA_DISK_1: restoring spfile from AUTOBACKUP /home/oracle/rman/c-1732109901-20250624-01
channel ORA_DISK_1: SPFILE restore from AUTOBACKUP complete
Finished restore at 24-JUN-25#检查spfile文件
[oracle@ora19c1 ~]$ cd $ORACLE_HOME/dbs
[oracle@ora19c1 dbs]$ ls
hc_orcl1.dat  init.ora  spfileorcl1.ora
[oracle@ora19c1 dbs]$ ls -l
total 12
-rw-rw---- 1 oracle asmadmin 1544 Jun 24 14:38 hc_orcl1.dat
-rw-r--r-- 1 oracle oinstall 3079 May 14  2015 init.ora
-rw-r----- 1 oracle asmadmin 2560 Jun 24 14:39 spfileorcl1.ora#创建pfile文件并修改相关配置*.audit_file_dest='/u01/app/oracle/admin/orcl/adump'
*.audit_trail='none'
*.compatible='19.0.0'
*.control_files='+data/orcl/control01.ctl'
*.diagnostic_dest='/u01/app/oracle'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=orclXDB)'
*.log_archive_dest_1='LOCATION=+data'
*.pga_aggregate_target=207618048
*.processes=800
*.remote_login_passwordfile='EXCLUSIVE'
*.sessions=885
*.sga_target=622854144
*.db_name='orcl'
*.cluster_database=false
*.db_create_online_log_dest_1='+data'#启动
SQL> startup force nomount pfile='/home/oracle/pfile19.ora';
ORACLE instance started.Total System Global Area  624950312 bytes
Fixed Size		    8899624 bytes
Variable Size		  364904448 bytes
Database Buffers	  243269632 bytes
Redo Buffers		    7876608 bytes#使用spfile文件启动到nomount
SQL> create spfile from pfile='/home/oracle/pfile19.ora';File created.SQL> startup force nomount;
ORACLE instance started.Total System Global Area 7516189792 bytes
Fixed Size		    8914016 bytes
Variable Size		 1241513984 bytes
Database Buffers	 6257901568 bytes
Redo Buffers		    7860224 bytes#恢复控制文件RMAN> restore controlfile from '/home/oracle/rman/c-1732109901-20250624-01';#mount数据库并恢复数据文件sql 'alter database mount';
run{
allocate channel c1 device type disk;
allocate channel c2 device type disk;
allocate channel c3 device type disk;
allocate channel c4 device type disk;
SET NEWNAME FOR DATABASE TO '+DATA';
restore database;
switch datafile all;
switch tempfile all;
recover database;
release channel c1;
release channel c2;
release channel c3;
release channel c4;
};#修改redo 路径并clear,根据提前clear 可以减少割接时open resetlogs 时间。alter database rename file '/u01/app/oracle/oradata/ORCL/onlinelog/o1_mf_3_n5c0yj5m_.log' to '+DATA/orcl/onlinelog/ora_redo01.log';
alter database rename file '/u01/app/oracle/oradata/ORCL/onlinelog/o1_mf_2_n5c0yj38_.log' to '+DATA/orcl/onlinelog/ora_redo02.log';
alter database rename file '/u01/app/oracle/oradata/ORCL/onlinelog/o1_mf_1_n5c0yj0f_.log' to '+DATA/orcl/onlinelog/ora_redo03.log';alter database clear logfile group 1;
alter database clear logfile group 2;
alter database clear logfile group 3;

在割接开始之前可以多次执行备份归档,新库recover 操作,以减少割接时归档传输及应用时间

archbak.sh
#!/bin/bashrman target / <<EOF
run{
allocate channel c1 device type disk;
allocate channel c2 device type disk;
allocate channel c3 device type disk;
allocate channel c4 device type disk;
sql 'alter system archive log current';
backup as compressed backupset archivelog all not backed up 1 times format '/home/oracle/rman/arc_%d_%U.bak';
release channel c1;
release channel c2;
release channel c3;
release channel c4;
}
exit;
EOFNEW: catalog 备份集,recover database
rman target /
catalog start with '/home/oracle/rman/';
recover database;

6、目标-以upgrade的方式打开数据库

alter database open resetlogs upgrade;

7、目标-执行autoupgrade创建配置文件

[oracle@ora19c1 upgrade]$ java -jar autoupgrade.jar -create_sample_file config
Created sample configuration file /home/oracle/upgrade/sample_config.cfg#Global configurations
#Autoupgrade's global directory, ...
#temp files created and other ...
#send here
global.autoupg_log_dir=/home/oracle/upgrade#
# Database number 1 
# 
upg1.dbname=orcl
upg1.start_time=NOW
upg1.source_home=/tmp  --随意写一个/tmp
upg1.target_home=/u01/app/oracle/product/19.3.0/db_1
upg1.sid=orcl1
upg1.log_dir=/home/oracle/upgrade
upg1.upgrade_node=ora19c1
upg1.target_version=19
upg1.restoration=no

8、目标-执行升级操作

#执行升级java -jar autoupgrade.jar -config ./sample_config.cfg  -mode upgrade[oracle@ora19c1 upgrade]$ java -jar autoupgrade.jar -config ./sample_config.cfg  -mode upgrade
AutoUpgrade 25.3.250509 launched with default internal options
Processing config file ...
+--------------------------------+
| Starting AutoUpgrade execution |
+--------------------------------+
1 Non-CDB(s) will be processed
Type 'help' to list console commands
upg> lsj
+----+-------+---------+---------+-------+----------+-------+-----------+
|Job#|DB_NAME|    STAGE|OPERATION| STATUS|START_TIME|UPDATED|    MESSAGE|
+----+-------+---------+---------+-------+----------+-------+-----------+
| 100|  orcl1|DBUPGRADE|EXECUTING|RUNNING|  16:21:47|10s ago|0%Upgraded |
+----+-------+---------+---------+-------+----------+-------+-----------+
Total jobs 1upg> status -job 100
DetailsJob No           100Oracle SID       orcl1Start Time       25/06/24 16:21:47Elapsed (min):   0End time:        N/ALogfilesLogs Base:    /home/oracle/upgrade/orcl1Job logs:     /home/oracle/upgrade/orcl1/100Stage logs:   /home/oracle/upgrade/orcl1/100/dbupgradeTimeZone:     /home/oracle/upgrade/orcl1/tempRemote Dirs:  StagesSETUP            <1 minDBUPGRADE        ~0 min (RUNNING)POSTCHECKS      POSTFIXUPS      SYSUPDATES      Stage-Progress Per Container+--------+---------+|Database|DBUPGRADE|+--------+---------+|   orcl1|    0  % |+--------+---------+

9、目标-在sqlnet文件中添加兼容参数

SQLNET.ALLOWED_LOGON_VERSION_CLIENT=8
SQLNET.ALLOWED_LOGON_VERSION_SERVER=8

10、目标-检查所有组件

select substr(comp_id,1,15) comp_id,substr(comp_name,1,30) comp_name,substr(version,1,10) version,status
from dba_registry 
order by modified;

11、目标-转换为集群数据库并添加集群资源

#pfile文件修改如下:
*.audit_file_dest='/u01/app/oracle/admin/orcl/adump'
*.audit_trail='none'
*.cluster_database=true
*.compatible='19.0.0'
*.control_files='+DATA/orcl/control01.ctl'
*.db_create_online_log_dest_1='+data'
*.db_name='orcl'
*.diagnostic_dest='/u01/app/oracle'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=orclXDB)'
*.log_archive_dest_1='LOCATION=+data'
*.pga_aggregate_target=734003200
*.processes=800
*.remote_login_passwordfile='EXCLUSIVE'
*.sessions=885
*.sga_target=1073741824
orcl1.undo_tablespace='UNDOTBS1'
orcl2.undo_tablespace='UNDOTBS2'
orcl1.instance_number=1
orcl2.instance_number=2
orcl1.instance_name=orcl1
orcl2.instance_name=orcl2
orcl1.thread=1
orcl2.thread=2#使用pfile启动startup pfile='/home/oracle/pfile19.ora';#添加thread2的日志组alter database add logfile thread 2 group 10 '+data' size 50m ;
alter database add logfile thread 2 group 11 '+data' size 50m ;
alter database add logfile thread 2 group 12 '+data' size 50m ;SQL> select * from v$log;GROUP#    THREAD#  SEQUENCE#      BYTES  BLOCKSIZE	  MEMBERS ARC STATUS	       FIRST_CHANGE# FIRST_TIM NEXT_CHANGE# NEXT_TIME	  CON_ID
---------- ---------- ---------- ---------- ---------- ---------- --- ---------------- ------------- --------- ------------ --------- ----------1	    1	     136   52428800	   512		1 NO  CURRENT		     2820730 25-JUN-25	 1.8447E+19		       02	    1	     134   52428800	   512		1 YES INACTIVE		     2618323 25-JUN-25	    2719492 25-JUN-25	       03	    1	     135   52428800	   512		1 YES INACTIVE		     2719492 25-JUN-25	    2820730 25-JUN-25	       010	    2	       0   52428800	   512		1 YES UNUSED			   0			  0		       011	    2	       0   52428800	   512		1 YES UNUSED			   0			  0		       012	    2	       0   52428800	   512		1 YES UNUSED			   0			  0		       06 rows selected.#添加undotbs2表空间SQL> CREATE UNDO TABLESPACE UNDOTBS2 DATAFILE '+DATA' size 50m;      Tablespace created.#启用线程2SQL> alter database enable public thread 2;Database altered.#创建spfile文件到data磁盘组
SQL> create spfile='+data' from pfile='/home/oracle/pfile19.ora';       File created.#创建节点上的init参数文件[oracle@ora19c1 dbs]$ pwd
/u01/app/oracle/product/19.3.0/db_1/dbs
[oracle@ora19c1 dbs]$ cat initorcl1.ora
spfile='+data/orcl/PARAMETERFILE/spfile.717.1204731345'#使用一节点启动spfile并执行脚本
SQL> startup force
ORACLE instance started.Total System Global Area 1073737800 bytes
Fixed Size		    8904776 bytes
Variable Size		  390070272 bytes
Database Buffers	  666894336 bytes
Redo Buffers		    7868416 bytes
Database mounted.
Database opened.
SQL> show parameter pfileNAME				     TYPE	 VALUE
------------------------------------ ----------- ------------------------------
spfile				     string	 +DATA/orcl/PARAMETERFILE/spfile.717.1204731345
SQL> @?/rdbms/admin/catclust.sql   #添加集群资源srvctl add database -d orcl -o $ORACLE_HOME
srvctl add instance -d orcl -n ora19c1 -i orcl1
srvctl add instance -d orcl -n ora19c2 -i orcl2
srvctl config database -d orclDatabase unique name: orcl
Database name: 
Oracle home: /u01/app/oracle/product/19.3.0/db_1
Oracle user: oracle
Spfile: 
Password file: 
Domain: 
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Server pools: 
Disk Groups: 
Mount point paths: 
Services: 
Type: RAC
Start concurrency: 
Stop concurrency: 
OSDBA group: dba
OSOPER group: oper
Database instances: orcl1,orcl2
Configured nodes: ora19c1,ora19c2
CSS critical: no
CPU count: 0
Memory target: 0
Maximum memory: 0
Default network number for database services: 
Database is administrator managedsrvctl modify database -d orcl -a DATA
srvctl modify database -d orcl -p '+data/orcl/PARAMETERFILE/spfile.717.1204731345'Database unique name: orcl
Database name: 
Oracle home: /u01/app/oracle/product/19.3.0/db_1
Oracle user: oracle
Spfile: +data/orcl/PARAMETERFILE/spfile.717.1204731345
Password file: 
Domain: 
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Server pools: 
Disk Groups: DATA
Mount point paths: 
Services: 
Type: RAC
Start concurrency: 
Stop concurrency: 
OSDBA group: dba
OSOPER group: oper
Database instances: orcl1,orcl2
Configured nodes: ora19c1,ora19c2
CSS critical: no
CPU count: 0
Memory target: 0
Maximum memory: 0
Default network number for database services: 
Database is administrator managed#使用grid统一启动[grid@ora19c1 ~]$ srvctl start database -d orcl#创建密码文件(或者复制过来)

问题列表

问题原因如下

1、第一次升级的时候由于虚拟机内存不足报错如下:

2、第二次添加内存和cpu为8c8G,并调整sga=7G,pga=1G,再次升级报错如下:

#pfile19c.ora*.audit_file_dest='/u01/app/oracle/admin/orcl/adump'
*.audit_trail='none'
*.compatible='19.0.0'
*.control_files='+data/orcl/control01.ctl'
*.diagnostic_dest='/u01/app/oracle'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=orclXDB)'
*.log_archive_dest_1='LOCATION=+data'
*.pga_aggregate_target=1G
*.processes=800
*.remote_login_passwordfile='EXCLUSIVE'
*.sessions=885
*.sga_target=7G
*.db_name='orcl'
*.cluster_database=false
*.db_create_online_log_dest_1='+data'

查看mos找到一个类似的bug:

📎Oracle 19c autoupgrade fails with java.sql.SQLException.pdf

然后我也没有改参数,尝试使用resum job -100再次运行job竟然成功了。

时区文件也正常:

决定再升级一次试试,先删除upgrade下的文件夹,然后重新恢复数据库至upgrade状态:

再次rman恢复后升级发现没有任何报错了,顺利升级成功:

[oracle@ora19c1 upgrade]$ more /home/oracle/upgrade/orcl1/100/dbupgrade/upg_summary.logOracle Database Release 19 Post-Upgrade Status Tool    06-25-2025 11:39:5
Database Name: ORCLComponent                               Current         Full     Elapsed Time
Name                                    Status          Version  HH:MM:SSOracle Server                          UPGRADED      19.3.0.0.0  00:09:51
JServer JAVA Virtual Machine           UPGRADED      19.3.0.0.0  00:02:11
Oracle XDK                             UPGRADED      19.3.0.0.0  00:00:17
Oracle Database Java Packages          UPGRADED      19.3.0.0.0  00:00:05
OLAP Analytic Workspace                UPGRADED      19.3.0.0.0  00:00:05
OLAP Catalog                         OPTION OFF      11.2.0.4.0  00:00:00
Oracle Text                            UPGRADED      19.3.0.0.0  00:00:19
Oracle Workspace Manager               UPGRADED      19.3.0.0.0  00:00:24
Oracle Real Application Clusters          VALID      19.3.0.0.0  00:00:00
Oracle XML Database                    UPGRADED      19.3.0.0.0  00:01:34
Oracle Multimedia                      UPGRADED      19.3.0.0.0  00:00:34
Spatial                                UPGRADED      19.3.0.0.0  00:02:44
Oracle OLAP API                        UPGRADED      19.3.0.0.0  00:00:09
Datapatch                                                        00:02:07
Final Actions                                                    00:02:42
Post Upgrade                                                     00:00:45Total Upgrade Time: 00:23:20Database time zone version is 14. It is older than current release time
zone version 32. Time zone upgrade is needed using the DBMS_DST package.Grand Total Upgrade Time:    [0d:0h:27m:34s]

升级过程中的日志:

📎orcl1.7z

参考

问题解决如下

📎AutoUpgrade ⼯具.pdf

📎数据库 升级 降级 兼容性矩阵.pdf

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。
如若转载,请注明出处:http://www.pswp.cn/pingmian/89308.shtml
繁体地址,请注明出处:http://hk.pswp.cn/pingmian/89308.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

SAP-ABAP:SAP的‘cl_http_utility=>escape_url‘对URL进行安全编码方法详解

SAP的’cl_http_utility>escape_url’对URL进行安全编码方法详解 核心作用&#xff1a;对 URL 进行安全编码&#xff0c;将特殊字符转换为 %XX 格式&#xff0c;确保符合 HTTP 传输规范。1. 功能与作用 ✅ URL 安全编码 将非安全字符转换为十六进制 ASCII 码&#xff08;%XX…

基于HarmonyOS的智能灯光控制系统设计:从定时触发到动作联动全流程实战

摘要 随着智能家居的快速普及&#xff0c;人们对居住环境的智能化需求越来越高&#xff0c;其中智能灯光控制是最基础、也是最常用的功能之一。从最初的远程控制发展到如今能“感知环境、自动响应”的智能灯光系统&#xff0c;背后依赖的是强大的系统联动能力。鸿蒙系统作为面向…

ROS1/Linux——linux虚拟机主ip地址:网络信息不可用

ROS1/Linux——linux虚拟机主ip地址&#xff1a;网络信息不可用 文章目录ROS1/Linux——linux虚拟机主ip地址&#xff1a;网络信息不可用参考亿点链接问题描述最终解决方案参考亿点链接 Unable to fetch some archives, maybe run apt-get update or try with –fix-missingli…

ssl相关命令生成证书

当前环境 OpenSSL 3.5.1 1 Jul 2025 (Library: OpenSSL 3.5.1 1 Jul 2025) GmSSL 3.1.2 Dev 本地gmssl命令 #生成证书公私钥对 gmssl sm2keygen -pass 1234 -out sm2.key -pubout sm2pub.pem #使用certgen命令生成自签名证书cert.crt gmssl certgen -C CN -ST Beijing -L Ha…

TensorFlow深度学习实战——DCGAN详解与实现

TensorFlow深度学习实战——DCGAN详解与实现0. 前言1. DCGAN 架构2. 构建 DCGAN 生成手写数字图像2.1 生成器与判别器架构2.2 构建 DCGAN相关链接0. 前言 深度卷积生成对抗网络 (Deep Convolutional Generative Adversarial Network, DCGAN) 是一种基于生成对抗网络 (Generati…

SpringBoot 使用MyBatisPlus

引入依赖<dependency><groupId>com.github.xiaoymin</groupId><artifactId>knife4j-openapi3-jakarta-spring-boot-starter</artifactId><version>4.3.0</version> </dependency>写一个interface 继承basemapMapper public in…

Git 中如何查看提交历史?常用命令有哪些?

回答重点在 Git 中&#xff0c;我们可以使用 git log 命令来查看提交历史。这个命令会列出所有的提交记录&#xff0c;显示每个提交的哈希值、作者信息、提交时间和提交信息。常用的 git log 命令及其选项有&#xff1a;1&#xff09; git log &#xff1a;显示完整的提交历史。…

Flink数据流高效写入MySQL实战

这段代码展示了如何使用 Apache Flink 将数据流写入 MySQL 数据库&#xff0c;并使用了 JdbcSink 来实现自定义的 Sink 逻辑。以下是对代码的详细解析和说明&#xff1a;代码结构包声明&#xff1a;package sink定义了代码所在的包。导入依赖&#xff1a;导入了必要的 Flink 和…

MATLAB下载安装教程(附安装包)2025最新版(MATLAB R2024b)

文章目录前言一、MATLAB R2024b下载二、MATLAB下载安装教程前言 MATLAB R2024b 的推出&#xff0c;进一步提升了其在工程实践中的实用性和专业性。它不仅提供了更多针对特定工程领域的解决方案&#xff0c;还在性能和兼容性方面进行了显著改进。 本教程将一步一步引导完成 MA…

Linux 基础命令学习,立即上手Linux操作

Linux 基础命令学习本文挑选最常用、最容易上手的 Linux 命令。每条都附带一句话说明 真实示例&#xff0c;直接复制即可练习&#xff0c;零基础也能跟得上。1  先掌握 目录导航&#xff1a;pwd / ls / cdpwd – 显示当前所在目录 pwd # 输出示例 /home/yournamels ‑a…

Android构建流程与Transform任务

1. 完整构建流程概览 1.1 主要构建阶段 预构建阶段 → 代码生成阶段 → 资源处理阶段 → 编译阶段 → Transform阶段 → 打包阶段1.2 详细任务执行顺序 ┌─────────────────────────────────────────────────────────…

CKS认证 | Day6 监控、审计和运行时安全 sysdig、falco、审计日志

一、分析容器系统调用&#xff1a;Sysdig Sysdig&#xff1a;定位是系统监控、分析和排障的工具&#xff0c;在 linux 平台上&#xff0c;已有很多这方面的工具 如tcpdump、htop、iftop、lsof、netstat&#xff0c;它们都能用来分析 linux 系统的运行情况&#xff0c;而且还有…

Redis:持久化配置深度解析与实践指南

&#x1f9e0; 1、简述 Redis 是一款基于内存的高性能键值数据库&#xff0c;为了防止数据丢失&#xff0c;Redis 提供了两种主要的持久化机制&#xff1a;RDB&#xff08;快照&#xff09;和 AOF&#xff08;追加日志&#xff09;。本文将从原理到配置&#xff0c;再到实际项目…

共创 Rust 十年辉煌时刻:RustChinaConf 2025 赞助与演讲征集正式启动

&#x1f680; 共创 Rust 十年辉煌时刻&#xff1a;RustChinaConf 2025 赞助与演讲征集正式启动2025年&#xff0c;是 Rust 编程语言诞生十周年的里程碑时刻。在这个具有历史意义的节点&#xff0c;RustChinaConf 2025 携手 RustGlobal 首次登陆中国&#xff0c;联合 GOSIM HAN…

EMS4100芯祥科技USB3.1高速模拟开关芯片规格介绍

EMS4100一款适用于USB Type-C应用的二通道差分2:1/1:2 USB 3.1高速双向被动开关。该器件支持USB 3.1 Gen 1和Gen 2数据速率,具有高带宽、低串扰、宽供电电压范围等特点。EMS4100芯片内部框架&#xff1a;EMS4100主要特性&#xff1a;2-独立频道1&#xff1a;2/2&#xff1a;1 M…

HTML 常用语义标签与常见搭配详解

一、什么是语义标签&#xff1f; 语义标签是 HTML5 引入的一组具有特定含义的标签&#xff0c;用于描述页面中不同部分的内容类型&#xff0c;如页眉、导航栏、主内容区域、侧边栏、页脚等。相比传统的 <div> 和 <span>&#xff0c;语义标签更具表达力和结构化。 …

迁移学习的概念和案例

迁移学习概念 预训练模型 定义: 简单来说别人训练好的模型。一般预训练模型具备复杂的网络模型结构&#xff1b;一般是在大量的语料下训练完成的。 预训练语言模型的类别&#xff1a; 现在我们接触到的预训练语言模型&#xff0c;基本上都是基于transformer这个模型迭代而来…

DAOS系统架构-RDB

1. 概述 基于Raft共识算法和强大的领导地位策略&#xff0c;pool service和container service可以通过复制其内部的元数据来实现高可用。通过这种方法实现具有副本能力的服务可以容忍少数副本中的任何一个出现故障。通过将每个服务的副本分布在容灾域中&#xff0c;pool servic…

深入GPU硬件架构及运行机制

转自深入GPU硬件架构及运行机制 - 0向往0 - 博客园&#xff0c;基本上是其理解。 一、GPU概述 1.1 GPU是什么&#xff1f; GPU全称是Graphics Processing Unit&#xff0c;图形处理单元。它的功能最初与名字一致&#xff0c;是专门用于绘制图像和处理图元数据的特定芯片&…

数值计算库:Eigen与Boost.Multiprecision全方位解析

在科学计算、工程模拟、机器学习等领域&#xff0c;高效的数值计算能力是构建高性能应用的基石。C作为性能优先的编程语言&#xff0c;拥有众多优秀的数值计算库&#xff0c;其中Eigen和Boost.Multiprecision是两个极具代表性的工具。本文将深入探讨这两个库的核心特性、使用场…