Oracle 12C升级至Oracle 19C

本文介绍Oracle 12C RAC(CDB模式)升级迁移至Oracle 19C 单机(CDB模式)迁移方法,采用DG FAILOVER+DBUA的方式升级迁移。

  1. 环境介绍

Oracle 12C升级至Oracle 19C_第1张图片

  1. 生产库全备
[oracle@node0 ydhl]$ pwd
/u02/app/oracle/oradata/datbdb/rman/ydhl
[oracle@node0 ydhl]$ cat rmandaiv.sh 
source $HOME/.bash_profile
export NLS_DATE_FORMAT='YYYYMMDD HH24:MI:SS'
#####if in defferent,it is need to configuration three:
#####LOG_PATH   RMAN_PATH    `date +%Y%m%d-%H%M`
LOG_PATH=/u02/app/oracle/oradata/datbdb/rman/ydhl
RMAN_FILE=/u02/app/oracle/oradata/datbdb/rman/ydhl
LOG_FILE=$LOG_PATH/rmandaiv-`date +%Y%m%d-%H%M`.log

$ORACLE_HOME/bin/rman log  $LOG_FILE<>$LOG_FILE

  1. 传输备份集

通过SFTP等方式将备份集传输至备库。

  1. 备库注册备份集并恢复
[oracle@ydhl rman]$ rman target /

Recovery Manager: Release 12.1.0.2.0 - Production on Mon Nov 29 11:31:05 2021

Copyright (c) 1982, 2014, Oracle and/or its affiliates.  All rights reserved.

connected to target database: CDB (DBID=2042340674, not open)

RMAN> catalog start with '/u01/app/oracle/rman/';


[oracle@ydhl ~]$ cat restore1126.sh 
rman target / log /u01/app/oracle/rman/restorefull-`date +%Y%m%d-%H%M`.log<
  1. 备库开启MRP数据同步
SQL> alter database recover managed standby database using current logfile disconnect from session;

Database altered.

SQL> select process,thread#,sequence#,block# from v$managed_standby;

PROCESS      THREAD#  SEQUENCE#     BLOCK#
--------- ---------- ---------- ----------
ARCH               0          0          0
ARCH               0          0          0
ARCH               0          0          0
ARCH               0          0          0
RFS                0          0          0
RFS                0          0          0
RFS                0          0          0
RFS                0          0          0
RFS                0          0          0
RFS                0          0          0
RFS                2       2098    3573918

PROCESS      THREAD#  SEQUENCE#     BLOCK#
--------- ---------- ---------- ----------
RFS                1       2253    4045570
MRP0               2       2094    4765642

13 rows selected.

SQL> select process,thread#,sequence#,block# from v$managed_standby;

PROCESS      THREAD#  SEQUENCE#     BLOCK#
--------- ---------- ---------- ----------
ARCH               0          0          0
ARCH               0          0          0
ARCH               0          0          0
ARCH               0          0          0
RFS                0          0          0
RFS                0          0          0
RFS                0          0          0
RFS                0          0          0
RFS                0          0          0
RFS                0          0          0
RFS                2       2098    3573955

PROCESS      THREAD#  SEQUENCE#     BLOCK#
--------- ---------- ---------- ----------
RFS                1       2253    4045613
MRP0               2       2094    4767292

  1. 备库库修改临时表空间文件
SQL> select name from v$tempfile order by 1;

NAME
--------------------------------------------------------------------------------
/u02/app/oracle/oradata/datcdb/cdb/CDB/datafile/o1_mf_temp_d0jnlyx7_.tmp
/u02/app/oracle/oradata/datbdb/bdb/BDB/eifdb/datafile/eifdb_o1_mf_temp_d0jnm064_
.tmp

/u02/app/oracle/oradata/datbdb/bdb/BDB/orcl/datafile/TSP_TEMP02.dbf
/u02/app/oracle/oradata/datbdb/bdb/BDB/orcl/datafile/temp01.dbf
/u02/app/oracle/oradata/datbdb/bdb/BDB/orcl/datafile/temp02.dbf
/u02/app/oracle/oradata/datcdb/cdb/CDB/3F45FA179EB0067FE0531400A8C09803/datafile
/o1_mf_temp_d0jnm064_.tmp

/u02/app/oracle/oradata/datcdb/cdb/CDB/ICU/datafile/temp01.dbf

NAME
--------------------------------------------------------------------------------
/u02/app/oracle/oradata/datcdb/cdb/CDB/bagl/datafile/temp01.dbf
/u02/app/oracle/oradata/datcdb/cdb/CDB/docare/datafile/temp01.dbf
/u02/app/oracle/oradata/datcdb/cdb/CDB/docare5/datafile/temp01.dbf
/u02/app/oracle/oradata/datcdb/cdb/CDB/empi/datafile/temp01.dbf
/u02/app/oracle/oradata/datcdb/cdb/CDB/health/datafile/temp01.dbf
/u02/app/oracle/oradata/datcdb/cdb/CDB/lis_old/datafile/temp01.dbf
/u02/app/oracle/oradata/datcdb/cdb/CDB/mandala/datafile/temp01.dbf
/u02/app/oracle/oradata/datcdb/cdb/CDB/ncsys/datafile/temp01.dbf
/u02/app/oracle/oradata/datcdb/cdb/CDB/tuteorcl/datafile/ TS_HOPETARGLE_TEMP.dbf
/u02/app/oracle/oradata/datcdb/cdb/CDB/tuteorcl/datafile/temp01.dbf
/u02/app/oracle/oradata/datcdb/cdb/CDB/ydhl/datafile/KYEEMIS_TEMP01.dbf

NAME
--------------------------------------------------------------------------------
/u02/app/oracle/oradata/datcdb/cdb/CDB/ydhl/datafile/KYEEMIS_TEMP02.dbf
/u02/app/oracle/oradata/datcdb/cdb/CDB/ydhl/datafile/MHEALTH_TEMP01.dbf
/u02/app/oracle/oradata/datcdb/cdb/CDB/ydhl/datafile/MHEALTH_TEMP02.dbf
/u02/app/oracle/oradata/datcdb/cdb/CDB/ydhl/datafile/NEWHLJX_TEMP.DBF
/u02/app/oracle/oradata/datcdb/cdb/CDB/ydhl/datafile/NQHLZL_TEMP.DBF
/u02/app/oracle/oradata/datcdb/cdb/CDB/ydhl/datafile/NQSYS_TEMP.DBF
/u02/app/oracle/oradata/datcdb/cdb/CDB/ydhl/datafile/temp01.dbf
/u02/app/oracle/oradata/datcdb/cdb/CDB/ydhl/datafile/temp02.dbf
/u02/app/oracle/oradata/datcdb/cdb/CDB/ydhl/datafile/temp05.dbf
/u02/app/oracle/oradata/datcdb/cdb/CDB/ydhl/datafile/temp06.dbf

28 rows selected.


SQL> alter database recover managed standby database cancel;

Database altered.

SQL> alter system set standby_file_management=manual;

System altered.

SQL> show parameter standby_file_management

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
standby_file_management              string      MANUAL

alter database rename file '/u02/app/oracle/oradata/datcdb/cdb/CDB/datafile/o1_mf_temp_d0jnlyx7_.tmp' to '/u01/app/oracle/oradata/cdb/o1_mf_temp_d0jnlyx7_.tmp';
alter database rename file '/u02/app/oracle/oradata/datbdb/bdb/BDB/eifdb/datafile/eifdb_o1_mf_temp_d0jnm064_.tmp' to '/u01/app/oracle/oradata/cdb/eifdb/eifdb_o1_mf_temp_d0jnm064_.tmp'; 
alter database rename file '/u02/app/oracle/oradata/datbdb/bdb/BDB/orcl/datafile/TSP_TEMP02.dbf' to '/u01/app/oracle/oradata/cdb/orcl/TSP_TEMP02.dbf';
alter database rename file '/u02/app/oracle/oradata/datbdb/bdb/BDB/orcl/datafile/temp01.dbf' to '/u01/app/oracle/oradata/cdb/orcl/temp01.dbf';
alter database rename file '/u02/app/oracle/oradata/datbdb/bdb/BDB/orcl/datafile/temp02.dbf' to '/u01/app/oracle/oradata/cdb/orcl/temp02.dbf';
alter database rename file '/u02/app/oracle/oradata/datcdb/cdb/CDB/ICU/datafile/temp01.dbf' to '/u01/app/oracle/oradata/cdb/ICU/temp01.dbf';
alter database rename file '/u02/app/oracle/oradata/datcdb/cdb/CDB/bagl/datafile/temp01.dbf' to '/u01/app/oracle/oradata/cdb/bagl/temp01.dbf';
alter database rename file '/u02/app/oracle/oradata/datcdb/cdb/CDB/docare/datafile/temp01.dbf' to '/u01/app/oracle/oradata/cdb/docare/temp01.dbf';
alter database rename file '/u02/app/oracle/oradata/datcdb/cdb/CDB/docare5/datafile/temp01.dbf' to '/u01/app/oracle/oradata/cdb/docare5/temp01.dbf';
alter database rename file '/u02/app/oracle/oradata/datcdb/cdb/CDB/empi/datafile/temp01.dbf' to '/u01/app/oracle/oradata/cdb/empi/temp01.dbf';
alter database rename file '/u02/app/oracle/oradata/datcdb/cdb/CDB/health/datafile/temp01.dbf' to '/u01/app/oracle/oradata/cdb/health/temp01.dbf';
alter database rename file '/u02/app/oracle/oradata/datcdb/cdb/CDB/lis_old/datafile/temp01.dbf' to '/u01/app/oracle/oradata/cdb/lis_old/temp01.dbf';
alter database rename file '/u02/app/oracle/oradata/datcdb/cdb/CDB/mandala/datafile/temp01.dbf' to '/u01/app/oracle/oradata/cdb/mandala/temp01.dbf';
alter database rename file '/u02/app/oracle/oradata/datcdb/cdb/CDB/ncsys/datafile/temp01.dbf' to '/u01/app/oracle/oradata/cdb/ncsys/temp01.dbf';
alter database rename file '/u02/app/oracle/oradata/datcdb/cdb/CDB/tuteorcl/datafile/ TS_HOPETARGLE_TEMP.dbf' to '/u01/app/oracle/oradata/cdb/tuteorcl/TS_HOPETARGLE_TEMP.dbf';
alter database rename file '/u02/app/oracle/oradata/datcdb/cdb/CDB/tuteorcl/datafile/temp01.dbf' to '/u01/app/oracle/oradata/cdb/tuteorcl/temp01.dbf';
alter database rename file '/u02/app/oracle/oradata/datcdb/cdb/CDB/ydhl/datafile/KYEEMIS_TEMP01.dbf' to '/u01/app/oracle/oradata/cdb/ydhl/KYEEMIS_TEMP01.dbf';
alter database rename file '/u02/app/oracle/oradata/datcdb/cdb/CDB/ydhl/datafile/KYEEMIS_TEMP02.dbf' to '/u01/app/oracle/oradata/cdb/ydhl/KYEEMIS_TEMP02.dbf';
alter database rename file '/u02/app/oracle/oradata/datcdb/cdb/CDB/ydhl/datafile/MHEALTH_TEMP01.dbf' to '/u01/app/oracle/oradata/cdb/ydhl/MHEALTH_TEMP01.dbf';
alter database rename file '/u02/app/oracle/oradata/datcdb/cdb/CDB/ydhl/datafile/MHEALTH_TEMP02.dbf' to '/u01/app/oracle/oradata/cdb/ydhl/MHEALTH_TEMP02.dbf';
alter database rename file '/u02/app/oracle/oradata/datcdb/cdb/CDB/ydhl/datafile/NEWHLJX_TEMP.DBF' to '/u01/app/oracle/oradata/cdb/ydhl/NEWHLJX_TEMP.DBF';
alter database rename file '/u02/app/oracle/oradata/datcdb/cdb/CDB/ydhl/datafile/NQHLZL_TEMP.DBF' to '/u01/app/oracle/oradata/cdb/ydhl/NQHLZL_TEMP.DBF';
alter database rename file '/u02/app/oracle/oradata/datcdb/cdb/CDB/ydhl/datafile/NQSYS_TEMP.DBF' to '/u01/app/oracle/oradata/cdb/ydhl/NQSYS_TEMP.DBF';
alter database rename file '/u02/app/oracle/oradata/datcdb/cdb/CDB/ydhl/datafile/temp01.dbf' to '/u01/app/oracle/oradata/cdb/ydhl/temp01.dbf';
alter database rename file '/u02/app/oracle/oradata/datcdb/cdb/CDB/ydhl/datafile/temp02.dbf' to '/u01/app/oracle/oradata/cdb/ydhl/temp02.dbf';
alter database rename file '/u02/app/oracle/oradata/datcdb/cdb/CDB/ydhl/datafile/temp05.dbf' to '/u01/app/oracle/oradata/cdb/ydhl/temp05.dbf';
alter database rename file '/u02/app/oracle/oradata/datcdb/cdb/CDB/ydhl/datafile/temp06.dbf' to '/u01/app/oracle/oradata/cdb/ydhl/temp06.dbf';



SQL> select name from v$tempfile order by 1;

NAME
--------------------------------------------------------------------------------
/u01/app/oracle/oradata/cdb/ICU/temp01.dbf
/u01/app/oracle/oradata/cdb/bagl/temp01.dbf
/u01/app/oracle/oradata/cdb/docare/temp01.dbf
/u01/app/oracle/oradata/cdb/docare5/temp01.dbf
/u01/app/oracle/oradata/cdb/eifdb/eifdb_o1_mf_temp_d0jnm064_.tmp
/u01/app/oracle/oradata/cdb/empi/temp01.dbf
/u01/app/oracle/oradata/cdb/health/temp01.dbf
/u01/app/oracle/oradata/cdb/lis_old/temp01.dbf
/u01/app/oracle/oradata/cdb/mandala/temp01.dbf
/u01/app/oracle/oradata/cdb/ncsys/temp01.dbf
/u01/app/oracle/oradata/cdb/o1_mf_temp_d0jnlyx7_.tmp

NAME
--------------------------------------------------------------------------------
/u01/app/oracle/oradata/cdb/orcl/TSP_TEMP02.dbf
/u01/app/oracle/oradata/cdb/orcl/temp01.dbf
/u01/app/oracle/oradata/cdb/orcl/temp02.dbf
/u01/app/oracle/oradata/cdb/tuteorcl/TS_HOPETARGLE_TEMP.dbf
/u01/app/oracle/oradata/cdb/tuteorcl/temp01.dbf
/u01/app/oracle/oradata/cdb/ydhl/KYEEMIS_TEMP01.dbf
/u01/app/oracle/oradata/cdb/ydhl/KYEEMIS_TEMP02.dbf
/u01/app/oracle/oradata/cdb/ydhl/MHEALTH_TEMP01.dbf
/u01/app/oracle/oradata/cdb/ydhl/MHEALTH_TEMP02.dbf
/u01/app/oracle/oradata/cdb/ydhl/NEWHLJX_TEMP.DBF
/u01/app/oracle/oradata/cdb/ydhl/NQHLZL_TEMP.DBF

NAME
--------------------------------------------------------------------------------
/u01/app/oracle/oradata/cdb/ydhl/NQSYS_TEMP.DBF
/u01/app/oracle/oradata/cdb/ydhl/temp01.dbf
/u01/app/oracle/oradata/cdb/ydhl/temp02.dbf
/u01/app/oracle/oradata/cdb/ydhl/temp05.dbf
/u01/app/oracle/oradata/cdb/ydhl/temp06.dbf
/u02/app/oracle/oradata/datcdb/cdb/CDB/3F45FA179EB0067FE0531400A8C09803/datafile
/o1_mf_temp_d0jnm064_.tmp


28 rows selected.



  1. 生产库关闭PDB,执行failover
alter pluggable database ydhl close immediate;
show pdbs;

SQL> alter database recover managed standby database cancel;

Database altered.

SQL> alter database recover managed standby database finish force;

Database altered.

SQL> select database_role from v$database;

DATABASE_ROLE
----------------
PHYSICAL STANDBY


SQL> alter database commit to switchover to primary;

Database altered.

SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.

Total System Global Area 6.8719E+10 bytes
Fixed Size                  6877112 bytes
Variable Size            1.2616E+10 bytes
Database Buffers         5.5969E+10 bytes
Redo Buffers              127340544 bytes
Database mounted.
Database opened.
SQL> select name,open_mode,database_role from v$database;

NAME      OPEN_MODE            DATABASE_ROLE
--------- -------------------- ----------------
CDB       READ WRITE           PRIMARY

SQL> show pdbs;

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         2 PDB$SEED                       READ ONLY  NO
         3 AAAAA                         READ WRITE NO
         4 YDHL                           READ WRITE NO
         5 BBBBB                        READ WRITE NO
         6 TBBBB                       READ WRITE NO
         7 CCCC                         READ WRITE NO
         8 DDDD                        READ WRITE NO
         9 EEEE                           READ WRITE NO
        10 FFFF                           READ WRITE NO
        11 EEEED                        READ WRITE NO
        12 AFEQG                         READ WRITE NO

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
        13 DFQA                           READ WRITE NO
        14 ORCL                           READ WRITE NO
        15 DFEG                         READ WRITE NO


  1. 修改PDB$SEED的临时表空间文件
SQL> alter session set "_oracle_script"=true;

Session altered.

SQL> alter pluggable database pdb$seed close immediate instances=all;

Pluggable database altered.

SQL> alter pluggable database pdb$seed open read write instances=all;

Pluggable database altered.

SQL> select inst_id,open_mode,name from gv$pdbs where name='PDB$SEED';

   INST_ID OPEN_MODE  NAME
---------- ---------- ------------------------------
         1 READ WRITE PDB$SEED


SQL> alter session set container=pdb$seed;

session altered.

SQL> show pdbs

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         2 PDB$SEED                       READ WRITE NO

SQL> create temporary tablespace temp1 tempfile '/u01/app/oracle/oradata/cdb/seed/temp1_01.dbf' size 1g autoextend on;

Tablespace created.

SQL> alter database default temporary tablespace temp1;

Database altered.

SQL> col PROPERTY_NAME for a35
SQL> col PROPERTY_VALUE for a15
SQL> col DESCRIPTION for a45
SQL> select * from database_properties where property_name='DEFAULT_TEMP_TABLESPACE';

PROPERTY_NAME                       PROPERTY_VALUE  DESCRIPTION
----------------------------------- --------------- ---------------------------------------------
DEFAULT_TEMP_TABLESPACE             TEMP1           Name of default temporary tablespace

SQL> drop tablespace temp including contents and datafiles;

Tablespace dropped.

SQL> create temporary tablespace temp tempfile '/u01/app/oracle/oradata/cdb/seed/temp01.dbf' size 1g autoextend on;

Tablespace created.

SQL> alter database default temporary tablespace temp;

Database altered.

SQL> col PROPERTY_NAME for a35
SQL> col PROPERTY_VALUE for a15
SQL> col DESCRIPTION for a45
SQL> select * from database_properties where property_name='DEFAULT_TEMP_TABLESPACE';

PROPERTY_NAME                       PROPERTY_VALUE  DESCRIPTION
----------------------------------- --------------- ---------------------------------------------
DEFAULT_TEMP_TABLESPACE             TEMP            Name of default temporary tablespace

SQL> drop tablespace temp1 including contents and datafiles;

Tablespace dropped.

SQL> shod pdbs
SP2-0042: unknown command "shod pdbs" - rest of line ignored.
SQL> show pdbs

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         2 PDB$SEED                       READ WRITE NO
SQL>

[oracle@ydhl ~]$ sqlplus / as sysdba

SQL*Plus: Release 12.1.0.2.0 Production on Fri Nov 26 23:31:49 2021

Copyright (c) 1982, 2014, Oracle.  All rights reserved.


Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options

SQL> alter session set "_oracle_script"=true;

Session altered.

SQL> alter pluggable database pdb$seed close immediate instances=all;

Pluggable database altered.

SQL> alter pluggable database pdb$seed open read only instances=all;

Pluggable database altered.

SQL> select inst_id,open_mode,name from gv$pdbs where name='PDB$SEED';

   INST_ID OPEN_MODE  NAME
---------- ---------- ------------------------------
         1 READ ONLY  PDB$SEED

SQL> alter session set "_oracle_script"=false;

Session altered.


  1. 删除多于的PDB
alter pluggable database xxxx close immediate;
alter pluggable database xxx close immediate;
alter pluggable database xxxx close immediate;
alter pluggable database xxxx close immediate;
alter pluggable database xxxx close immediate;
alter pluggable database xxxxclose immediate;
alter pluggable database vxxxx close immediate;
alter pluggable database xxxx close immediate;
alter pluggable database xxxx close immediate;
alter pluggable database xxxx close immediate;
alter pluggable database xxxx close immediate;
alter pluggable database xxxx close immediate;

drop pluggable database xxxx including datafiles;
drop pluggable database xxxx including datafiles;
drop pluggable database xxxx including datafiles;
drop pluggable database xxxx including datafiles;
drop pluggable database xxxx including datafiles;
drop pluggable databasexxxx including datafiles;
drop pluggable database xxxx including datafiles;
drop pluggable database xxxx including datafiles;
drop pluggable database xxxx including datafiles;
drop pluggable database xxxx including datafiles;
drop pluggable database xxxxL including datafiles;
drop pluggable database Exxxx including datafiles;

SQL> show pdbs

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         2 PDB$SEED                       READ ONLY  NO
         4 YDHL                           READ WRITE NO

  1. 数据库升级
    让DBUA能识别到12c的数据库,需要在/etc/oratab中添加12C数据库的数据库名和ORACLE_HOME绝对路径。
[root@ydhl ~]# vi /etc/oratab
添加:
cdb:/u01/app/oracle/product/12.1.0/db_1:N

[oracle@ydhl admin]$ $ORACLE_HOME/jdk/bin/java -jar /u01/app/oracle/product/19.3.0/db_1/rdbms/admin/preupgrade.jar TERMINAL TEXT FILE
==================
PREUPGRADE SUMMARY
==================
  /u01/app/oracle/cfgtoollogs/RZCDB/preupgrade/preupgrade.log
  /u01/app/oracle/cfgtoollogs/RZCDB/preupgrade/preupgrade_fixups.sql
  /u01/app/oracle/cfgtoollogs/RZCDB/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/oracle/cfgtoollogs/RZCDB/preupgrade/ -b preup_RZCDB /u01/app/oracle/cfgtoollogs/RZCDB/preupgrade/preupgrade_fixups.sql

2. Review logs under /u01/app/oracle/cfgtoollogs/RZCDB/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/oracle/cfgtoollogs/RZCDB/preupgrade/ -b postup_RZCDB /u01/app/oracle/cfgtoollogs/RZCDB/preupgrade/postupgrade_fixups.sql

2. Review logs under /u01/app/oracle/cfgtoollogs/RZCDB/preupgrade/

Preupgrade complete: 2021-11-26T23:58:10

执行fixup脚本:
[oracle@ydhl ~]$ $ORACLE_HOME/perl/bin/perl -I$ORACLE_HOME/perl/lib -I$ORACLE_HOME/rdbms/admin $ORACLE_HOME/rdbms/admin/catcon.pl -l /u01/app/oracle/cfgtoollogs/RZCDB/preupgrade/ -b preup_RZCDB /u01/app/oracle/cfgtoollogs/RZCDB/preupgrade/preupgrade_fixups.sql
catcon: ALL catcon-related output will be written to /u01/app/oracle/cfgtoollogs/RZCDB/preupgrade//preup_RZCDB_catcon_46012.lst
catcon: See /u01/app/oracle/cfgtoollogs/RZCDB/preupgrade//preup_RZCDB*.log files for output generated by scripts
catcon: See /u01/app/oracle/cfgtoollogs/RZCDB/preupgrade//preup_RZCDB_*.lst files for spool files, if any
catcon.pl: completed successfully


启动DBUA升级

[oracle@ydhl ~]$ export DISPLAY=x.x.x.x:0.0
[oracle@ydhl ~]$ /u01/app/oracle/product/19.3.0/db_1/bin/dbua 
Logs directory:  /u01/app/oracle/cfgtoollogs/dbua/upgrade2021-11-27_12-15-25AM

Oracle 12C升级至Oracle 19C_第2张图片
Oracle 12C升级至Oracle 19C_第3张图片
Oracle 12C升级至Oracle 19C_第4张图片
Oracle 12C升级至Oracle 19C_第5张图片
Oracle 12C升级至Oracle 19C_第6张图片
Oracle 12C升级至Oracle 19C_第7张图片
Oracle 12C升级至Oracle 19C_第8张图片
Oracle 12C升级至Oracle 19C_第9张图片
Oracle 12C升级至Oracle 19C_第10张图片
Oracle 12C升级至Oracle 19C_第11张图片
Oracle 12C升级至Oracle 19C_第12张图片
Oracle 12C升级至Oracle 19C_第13张图片

  1. 执行升级后脚本
[oracle@ydhl ~]$ ./19.sh 
[oracle@ydhl ~]$ . .bash_profile
[oracle@ydhl ~]$ env | grep ORACLE
ORACLE_SID=cdb
ORACLE_BASE=/u01/app/oracle
ORACLE_HOME=/u01/app/oracle/product/19.3.0/db_1
[oracle@ydhl ~]$ $ORACLE_HOME/perl/bin/perl -I$ORACLE_HOME/perl/lib -I$ORACLE_HOME/rdbms/admin $ORACLE_HOME/rdbms/admin/catcon.pl -l /u01/app/oracle/cfgtoollogs/RZCDB/preupgrade/ -b postup_RZCDB /u01/app/oracle/cfgtoollogs/RZCDB/preupgrade/postupgrade_fixups.sql
catcon::set_log_file_base_path: ALL catcon-related output will be written to [/u01/app/oracle/cfgtoollogs/RZCDB/preupgrade/postup_RZCDB_catcon_38846.lst]

catcon::set_log_file_base_path: catcon: See [/u01/app/oracle/cfgtoollogs/RZCDB/preupgrade/postup_RZCDB*.log] files for output generated by scripts

catcon::set_log_file_base_path: catcon: See [/u01/app/oracle/cfgtoollogs/RZCDB/preupgrade/postup_RZCDB_*.lst] files for spool files, if any

catcon.pl: completed successfully

  1. 升级后工作

重建监听
拷贝tnsnames.ora文件
拷贝sqlnet.ora文件
编译失效对象
收集统计信息

你可能感兴趣的:(Oracle日常运维,oracle,数据库,database)