Oracle database 12.2.0.1升-级到19.3.0.0

还是在同一台电脑上,将从11.2.0.4升-级到12.2.0.1的12c升-级到19c。

参考文档:

https://oracledocs.blog.csdn.net/article/details/104015483
https://docs.oracle.com/en/database/oracle/oracle-database/19/upgrd/example-manual-upgrade-windows-non-cdb-11203-to-122.html#GUID-6DCC7A57-7F82-467B-9B39-6568CEDF04BC
Master Note for Oracle Application Express (APEX) Upgrades (Doc ID 1088970.1)
https://www.oracle.com/technetwork/developer-tools/apex/downloads/apex-182-archive-5440684.html
https://docs.oracle.com/en/database/oracle/application-express/18.2/htmig/installing-AE-into-different-PDBs.html#GUID-711396F6-DC1C-4EF8-8CA5-4C36E8615DFD
DBA_REGISTRY Shows Oracle Application Express Invalid or Wrong (Older) Version (Doc ID 389839.1)
How to Uninstall Oracle HTML DB / Application Express from a 10G/11G Database (Doc ID 558340.1)
如何下载并运行Oracle数据库预升-级实用程序 (Doc ID 1577379.1)

Oracle 19c - 手动升级到 Non-CDB Oracle Database 19c 的完整核对清单 (Doc ID 2577572.1)  -- 2020-01-21 add

 

-- 将安装包LINUX.X64_193000_db_home.zip放在/u01/app/oracle/product/19.0.0/dbhome_1目录下,解压后,安装。

-- pre检查,会生成pre、post脚本,也可以从MOS 1577379.1上直接下载。就不用执行这步骤了。

/u01/app/oracle/product/12.2.0/dbhome_1/jdk/bin/java -jar /u01/app/oracle/product/19.0.0/dbhome_1/rdbms/admin/preupgrade.jar FILE TEXT DIR /u01/ 

[oracle@wls10306-02 ~]$ /u01/app/oracle/product/12.2.0/dbhome_1/jdk/bin/java -jar /u01/app/oracle/product/19.0.0/dbhome_1/rdbms/admin/preupgrade.jar FILE TEXT DIR /u01/  
==================
PREUPGRADE SUMMARY
==================
  /u01/preupgrade.log
  /u01/preupgrade_fixups.sql
  /u01/postupgrade_fixups.sql

Execute fixup scripts as indicated below:

Before upgrade:

Log into the database and execute the preupgrade fixups
@/u01/preupgrade_fixups.sql

After the upgrade:

Log into the database and execute the postupgrade fixups
@/u01/postupgrade_fixups.sql

Preupgrade complete: 2020-01-17T17:09:28
[oracle@wls10306-02 ~]$ 
[oracle@wls10306-02 ~]$ 

-- 执行pre 脚本,需要手工执行的执行下。

SQL> @/u01/preupgrade_fixups.sql                                                                                                                      
Executing Oracle PRE-Upgrade Fixup Script

Auto-Generated by:       Oracle Preupgrade Script
                         Version: 19.0.0.0.0 Build: 1
Generated on:            2020-01-17 17:07:11

For Source Database:     TEST
Source Database Version: 12.2.0.1.0
For Upgrade to Version:  19.0.0.0.0

Preup                             Preupgrade
Action                            Issue Is
Number  Preupgrade Check Name     Remedied    Further DBA Action
------  ------------------------  ----------  --------------------------------
    1.  job_queue_process_0       NO          Manual fixup required.
    2.  parameter_min_val         NO          Manual fixup recommended.
    3.  enabled_indexes_tbl       YES         None.
    4.  invalid_objects_exist     NO          Manual fixup recommended.
    5.  amd_exists                NO          Manual fixup recommended.
    6.  apex_manual_upgrade       NO          Manual fixup recommended.
    7.  mv_refresh                NO          Informational only.
                                              Further action is optional.
    8.  hidden_params             NO          Informational only.
                                              Further action is optional.
    9.  mv_refresh                NO          Informational only.
                                              Further action is optional.
   10.  tablespaces_info          NO          Informational only.
                                              Further action is optional.
   11.  rman_recovery_version     NO          Informational only.
                                              Further action is optional.

The fixup scripts have been run and resolved what they can. However,
there are still issues originally identified by the preupgrade that
have not been remedied and are still present in the database.
Depending on the severity of the specific issue, and the nature of
the issue itself, that could mean that your database is not ready
for upgrade.  To resolve the outstanding issues, start by reviewing
the preupgrade_fixups.sql and searching it for the name of
the failed CHECK NAME or Preupgrade Action Number listed above.
There you will find the original corresponding diagnostic message
from the preupgrade which explains in more detail what still needs
to be done.

PL/SQL procedure successfully completed.

SQL> 

-- 修改一些参数,并进行编译对象,移除olap组件等

SQL> alter system set job_queue_processes=1000;

System altered.

SQL> alter system set memory_target=1400M scope=spfile;

System altered.

SQL> alter system set memory_max_target=1400M scope=spfile;

System altered.

SQL> 

SQL> @?/rdbms/admin/utlrp.sql

/u01/app/oracle/product/12.2.0/dbhome_1/olap/admin/catnoamd.sql  -- 这个是移除olap组件的

-- 编译过程

SQL> @?/rdbms/admin/utlrp.sql

TIMESTAMP
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
COMP_TIMESTAMP UTLRP_BGN              2020-01-17 17:15:35

DOC>   The following PL/SQL block invokes UTL_RECOMP to recompile invalid
DOC>   objects in the database. Recompilation time is proportional to the
DOC>   number of invalid objects in the database, so this command may take
DOC>   a long time to execute on a database with a large number of invalid
DOC>   objects.
DOC>
DOC>   Use the following queries to track recompilation progress:
DOC>
DOC>   1. Query returning the number of invalid objects remaining. This
DOC>      number should decrease with time.
DOC>         SELECT COUNT(*) FROM obj$ WHERE status IN (4, 5, 6);
DOC>
DOC>   2. Query returning the number of objects compiled so far. This number
DOC>      should increase with time.
DOC>         SELECT COUNT(*) FROM UTL_RECOMP_COMPILED;
DOC>
DOC>   This script automatically chooses serial or parallel recompilation
DOC>   based on the number of CPUs available (parameter cpu_count) multiplied
DOC>   by the number of threads per CPU (parameter parallel_threads_per_cpu).
DOC>   On RAC, this number is added across all RAC nodes.
DOC>
DOC>   UTL_RECOMP uses DBMS_SCHEDULER to create jobs for parallel
DOC>   recompilation. Jobs are created without instance affinity so that they
DOC>   can migrate across RAC nodes. Use the following queries to verify
DOC>   whether UTL_RECOMP jobs are being created and run correctly:
DOC>
DOC>   1. Query showing jobs created by UTL_RECOMP
DOC>         SELECT job_name FROM dba_scheduler_jobs
DOC>            WHERE job_name like 'UTL_RECOMP_SLAVE_%';
DOC>
DOC>   2. Query showing UTL_RECOMP jobs that are running
DOC>         SELECT job_name FROM dba_scheduler_running_jobs
DOC>            WHERE job_name like 'UTL_RECOMP_SLAVE_%';
DOC>#


PL/SQL procedure successfully completed.


TIMESTAMP
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
COMP_TIMESTAMP UTLRP_END              2020-01-17 17:38:02

DOC> The following query reports the number of invalid objects.
DOC>
DOC> If the number is higher than expected, please examine the error
DOC> messages reported with each object (using SHOW ERRORS) to see if they
DOC> point to system misconfiguration or resource constraints that must be
DOC> fixed before attempting to recompile these objects.
DOC>#

OBJECTS WITH ERRORS
-------------------
                 48

DOC> The following query reports the number of exceptions caught during
DOC> recompilation. If this number is non-zero, please query the error
DOC> messages in the table UTL_RECOMP_ERRORS to see if any of these errors
DOC> are due to misconfiguration or resource constraints that must be
DOC> fixed before objects can compile successfully.
DOC> Note: Typical compilation errors (due to coding errors) are not
DOC>       logged into this table: they go into DBA_ERRORS instead.
DOC>#

ERRORS DURING RECOMPILATION
---------------------------
                          0


Function created.


PL/SQL procedure successfully completed.


Function dropped.

...Starting validation 17:38:13
...Database user "SYS", database schema "APEX_050000", user# "129" 17:38:13
...grant execute on "SYS"."DBMS_CRYPTO_INTERNAL" to APEX_050000 17:38:17
...272 packages
...265 package bodies
...465 tables
...8 functions
...16 procedures
...4 sequences
...497 triggers
...1582 indexes
...255 views
...0 libraries
...14 types
...5 type bodies
...0 operators
...0 index types
...Begin key object existence check 17:38:19
...Completed key object existence check 17:38:19
...Setting DBMS Registry 17:38:19
...Setting DBMS Registry Complete 17:38:19
...Exiting validate 17:38:19

PL/SQL procedure successfully completed.

SQL> SQL> 

-- 查看apex版本,是apex 5 。

SQL> Col Comp_name Format a22
Col Status Format a12
Select Comp_name, status, Version
From Dba_Registry
Order by Comp_name;SQL> SQL>   2    3  

COMP_NAME	       STATUS	    VERSION
---------------------- ------------ ------------------------------
JServer JAVA Virtual M VALID	    12.2.0.1.0
achine

OLAP Analytic Workspac VALID	    12.2.0.1.0
e

OLAP Catalog	       REMOVED	    11.2.0.4.0
Oracle Application Exp VALID	    5.0.4.00.12
ress

Oracle Database Catalo VALID	    12.2.0.1.0

COMP_NAME	       STATUS	    VERSION
---------------------- ------------ ------------------------------
g Views

Oracle Database Java P VALID	    12.2.0.1.0
ackages

Oracle Database Packag VALID	    12.2.0.1.0
es and Types

Oracle Multimedia      VALID	    12.2.0.1.0
Oracle OLAP API        VALID	    12.2.0.1.0
Oracle Text	       VALID	    12.2.0.1.0

COMP_NAME	       STATUS	    VERSION
---------------------- ------------ ------------------------------
Oracle Workspace Manag VALID	    12.2.0.1.0
er

Oracle XDK	       VALID	    12.2.0.1.0
Oracle XML Database    VALID	    12.2.0.1.0
Spatial 	       VALID	    12.2.0.1.0

14 rows selected.

SQL> 


SQL> select owner from dba_objects where object_name='WWV_FLOWS';

OWNER
--------------------------------------------------------------------------------
APEX_030200
APEX_050000

SQL> 

select count(*) from APEX_030200.WWV_FLOWS where id = 4000;
select count(*) from APEX_030200.WWV_FLOWS where id = 4000;
SQL> select count(*) from APEX_030200.WWV_FLOWS where id = 4000;

  COUNT(*)
----------
	 1

SQL> select count(*) from APEX_030200.WWV_FLOWS where id = 4000;

  COUNT(*)
----------
	 1

SQL> 

If the query returns 0, it is a runtime only installation, and apxrtins.sql should be used for the upgrade. If the query returns 1, this is a development install and apexins.sql should be used.这里查询返回了1.所以使用apexins.sql来安装。

将apex安装包apex_18.2.zip传到/home/oracle/目录下,解压,安装。

@/home/oracle/apex/apexins.sql SYSAUX SYSAUX TEMP /i/   -- 注意,这样不行,需要进入到apex升级文件所在目录下,然后连接到数据库,再执行语句 
cd /home/oracle/apex
sqlplus /nolog
conn / as sysdba
@/home/oracle/apex/apexins.sql SYSAUX SYSAUX TEMP /i/

-- 摘录部分升级过程

Thank you for installing Oracle Application Express 18.2.0.00.12

Oracle Application Express is installed in the APEX_180200 schema.

The structure of the link to the Application Express administration services is as follows:
http://host:port/pls/apex/apex_admin (Oracle HTTP Server with mod_plsql)
http://host:port/apex/apex_admin     (Oracle XML DB HTTP listener with the embedded PL/SQL gateway)
http://host:port/apex/apex_admin     (Oracle REST Data Services)

The structure of the link to the Application Express development interface is as follows:
http://host:port/pls/apex (Oracle HTTP Server with mod_plsql)
http://host:port/apex     (Oracle XML DB HTTP listener with the embedded PL/SQL gateway)
http://host:port/apex     (Oracle REST Data Services)

timing for: Phase 3 (Switch)
Elapsed: 00:01:45.94
timing for: Complete Installation
Elapsed: 00:14:29.99

PL/SQL procedure successfully completed.





1 row selected.

...null1.sql
SYS> 

-- 查看升-级后的版本 ,但是这里看apex状态是invalid的。

SYS> Col Comp_name Format a22
Col Status Format a12
Select Comp_name, status, Version
From Dba_Registry
Order by Comp_name;SYS> SYS>   2    3  

COMP_NAME              STATUS       VERSION
---------------------- ------------ ------------------------------
JServer JAVA Virtual M VALID        12.2.0.1.0
achine

OLAP Analytic Workspac VALID        12.2.0.1.0
e

OLAP Catalog           REMOVED      11.2.0.4.0
Oracle Application Exp INVALID      18.2.0.00.12
ress

Oracle Database Catalo VALID        12.2.0.1.0
g Views

Oracle Database Java P VALID        12.2.0.1.0
ackages

Oracle Database Packag VALID        12.2.0.1.0
es and Types

Oracle Multimedia      VALID        12.2.0.1.0
Oracle OLAP API        VALID        12.2.0.1.0
Oracle Text            VALID        12.2.0.1.0
Oracle Workspace Manag VALID        12.2.0.1.0
er

Oracle XDK             VALID        12.2.0.1.0
Oracle XML Database    VALID        12.2.0.1.0
Spatial                VALID        12.2.0.1.0

14 rows selected.

SYS> 

-- 开始升-级

cd /u01/app/oracle/product/19.0.0/dbhome_1/bin
[oracle@wls10306-02 bin]$ ./sqlplus /nolog

SQL*Plus: Release 19.0.0.0.0 - Production on Sat Jan 18 08:42:25 2020
Version 19.3.0.0.0

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

SQL> create spfile='/u01/app/oracle/product/19.0.0/dbhome_1/dbs/spfiletest.ora' from pfile='/home/oracle/pfile';
SP2-0640: Not connected
SQL> conn / as sysdba
Connected to an idle instance.
SQL> create spfile='/u01/app/oracle/product/19.0.0/dbhome_1/dbs/spfiletest.ora' from pfile='/home/oracle/pfile';

File created.

SQL> startup upgrade
ORACLE instance started.

Total System Global Area 1476391088 bytes
Fixed Size		    8896688 bytes
Variable Size		  956301312 bytes
Database Buffers	  503316480 bytes
Redo Buffers		    7876608 bytes
Database mounted.
Database opened.
SQL> 


[oracle@wls10306-02 dbhome_1]$ export ORACLE_HOME=/u01/app/oracle/product/19.0.0/dbhome_1
[oracle@wls10306-02 dbhome_1]$ 
[oracle@wls10306-02 dbhome_1]$ export PATH=$ORACLE_HOME/bin:$PATH
[oracle@wls10306-02 dbhome_1]$ sqlplus /nolog

SQL*Plus: Release 19.0.0.0.0 - Production on Sat Jan 18 09:21:55 2020
Version 19.3.0.0.0

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

SQL> conn / as sysdba
Connected to an idle instance.
SQL> startup upgrade 
ORACLE instance started.

Total System Global Area 1476391088 bytes
Fixed Size		    8896688 bytes
Variable Size		  956301312 bytes
Database Buffers	  503316480 bytes
Redo Buffers		    7876608 bytes
Database mounted.
Database opened.
SQL> exit
Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0
[oracle@wls10306-02 dbhome_1]$ which dbupgrade
/u01/app/oracle/product/19.0.0/dbhome_1/bin/dbupgrade

-- 开始升-级,升-级过程比较快,大约35分钟升-级完毕。

[oracle@wls10306-02 dbhome_1]$ ./dbupgrade
-bash: ./dbupgrade: No such file or directory
[oracle@wls10306-02 dbhome_1]$ dbupgrade

Argument list for [/u01/app/oracle/product/19.0.0/dbhome_1/rdbms/admin/catctl.pl]
For Oracle internal use only A = 0
Run in                       c = 0
Do not run in                C = 0
Input Directory              d = 0
Echo OFF                     e = 1
Simulate                     E = 0
Forced cleanup               F = 0
Log Id                       i = 0
Child Process                I = 0
Log Dir                      l = 0
Priority List Name           L = 0
Upgrade Mode active          M = 0
SQL Process Count            n = 0
SQL PDB Process Count        N = 0
Open Mode Normal             o = 0
Start Phase                  p = 0
End Phase                    P = 0
Reverse Order                r = 0
AutoUpgrade Resume           R = 0
Script                       s = 0
Serial Run                   S = 0
RO User Tablespaces          T = 0
Display Phases               y = 0
Debug catcon.pm              z = 0
Debug catctl.pl              Z = 0

catctl.pl VERSION: [19.0.0.0.0]
           STATUS: [Production]
            BUILD: [RDBMS_19.3.0.0.0DBRU_LINUX.X64_190417]


/u01/app/oracle/product/19.0.0/dbhome_1/rdbms/admin/orahome = [/u01/app/oracle/product/19.0.0/dbhome_1]
/u01/app/oracle/product/19.0.0/dbhome_1/bin/orabasehome = [/u01/app/oracle/product/19.0.0/dbhome_1]
catctlGetOraBaseLogDir = [/u01/app/oracle/product/19.0.0/dbhome_1]

Analyzing file /u01/app/oracle/product/19.0.0/dbhome_1/rdbms/admin/catupgrd.sql

Log file directory = [/tmp/cfgtoollogs/upgrade20200118092241]

catcon::set_log_file_base_path: ALL catcon-related output will be written to [/tmp/cfgtoollogs/upgrade20200118092241/catupgrd_catcon_16889.lst]

catcon::set_log_file_base_path: catcon: See [/tmp/cfgtoollogs/upgrade20200118092241/catupgrd*.log] files for output generated by scripts

catcon::set_log_file_base_path: catcon: See [/tmp/cfgtoollogs/upgrade20200118092241/catupgrd_*.lst] files for spool files, if any


Number of Cpus        = 1
Database Name         = test
DataBase Version      = 12.2.0.1.0
catcon::set_log_file_base_path: ALL catcon-related output will be written to [/u01/app/oracle/product/19.0.0/dbhome_1/cfgtoollogs/test/upgrade20200118092252/catupgrd_catcon_16889.lst]

catcon::set_log_file_base_path: catcon: See [/u01/app/oracle/product/19.0.0/dbhome_1/cfgtoollogs/test/upgrade20200118092252/catupgrd*.log] files for output generated by scripts

catcon::set_log_file_base_path: catcon: See [/u01/app/oracle/product/19.0.0/dbhome_1/cfgtoollogs/test/upgrade20200118092252/catupgrd_*.lst] files for spool files, if any


Log file directory = [/u01/app/oracle/product/19.0.0/dbhome_1/cfgtoollogs/test/upgrade20200118092252]

Parallel SQL Process Count            = 4
Components in [test]
    Installed [APEX APS CATALOG CATJAVA CATPROC CONTEXT JAVAVM ORDIM OWM SDO XDB XML XOQ]
Not Installed [DV EM MGW ODM OLS RAC WK]

------------------------------------------------------
Phases [0-107]         Start Time:[2020_01_18 09:23:04]
------------------------------------------------------

***********   Executing Change Scripts   ***********
Serial   Phase #:0    [test] Files:1    Time: 46s
***************   Catalog Core SQL   ***************
Serial   Phase #:1    [test] Files:5    Time: 56s
Restart  Phase #:2    [test] Files:1    Time: 1s
***********   Catalog Tables and Views   ***********
Parallel Phase #:3    [test] Files:19   Time: 29s
Restart  Phase #:4    [test] Files:1    Time: 1s
*************   Catalog Final Scripts   ************
Serial   Phase #:5    [test] Files:7    Time: 22s
*****************   Catproc Start   ****************
Serial   Phase #:6    [test] Files:1    Time: 15s
*****************   Catproc Types   ****************
Serial   Phase #:7    [test] Files:2    Time: 10s
Restart  Phase #:8    [test] Files:1    Time: 1s
****************   Catproc Tables   ****************
Parallel Phase #:9    [test] Files:67   Time: 42s
Restart  Phase #:10   [test] Files:1    Time: 2s
*************   Catproc Package Specs   ************
Serial   Phase #:11   [test] Files:1    Time: 57s
Restart  Phase #:12   [test] Files:1    Time: 1s
**************   Catproc Procedures   **************
Parallel Phase #:13   [test] Files:94   Time: 13s
Restart  Phase #:14   [test] Files:1    Time: 2s
Parallel Phase #:15   [test] Files:120  Time: 21s
Restart  Phase #:16   [test] Files:1    Time: 1s
Serial   Phase #:17   [test] Files:22   Time: 4s
Restart  Phase #:18   [test] Files:1    Time: 2s
*****************   Catproc Views   ****************
Parallel Phase #:19   [test] Files:32   Time: 28s
Restart  Phase #:20   [test] Files:1    Time: 1s
Serial   Phase #:21   [test] Files:3    Time: 13s
Restart  Phase #:22   [test] Files:1    Time: 1s
Parallel Phase #:23   [test] Files:25   Time: 234s
Restart  Phase #:24   [test] Files:1    Time: 1s
Parallel Phase #:25   [test] Files:12   Time: 145s
Restart  Phase #:26   [test] Files:1    Time: 1s
Serial   Phase #:27   [test] Files:1    Time: 0s
Serial   Phase #:28   [test] Files:3    Time: 4s
Serial   Phase #:29   [test] Files:1    Time: 0s
Restart  Phase #:30   [test] Files:1    Time: 1s
***************   Catproc CDB Views   **************
Serial   Phase #:31   [test] Files:1    Time: 2s
Restart  Phase #:32   [test] Files:1    Time: 1s
Serial   Phase #:34   [test] Files:1    Time: 0s
*****************   Catproc PLBs   *****************
Serial   Phase #:35   [test] Files:293  Time: 123s
Serial   Phase #:36   [test] Files:1    Time: 0s
Restart  Phase #:37   [test] Files:1    Time: 0s
Serial   Phase #:38   [test] Files:6    Time: 6s
Restart  Phase #:39   [test] Files:1    Time: 1s
***************   Catproc DataPump   ***************
Serial   Phase #:40   [test] Files:3    Time: 43s
Restart  Phase #:41   [test] Files:1    Time: 1s
******************   Catproc SQL   *****************
Parallel Phase #:42   [test] Files:13   Time: 138s
Restart  Phase #:43   [test] Files:1    Time: 0s
Parallel Phase #:44   [test] Files:11   Time: 13s
Restart  Phase #:45   [test] Files:1    Time: 1s
Parallel Phase #:46   [test] Files:3    Time: 4s
Restart  Phase #:47   [test] Files:1    Time: 1s
*************   Final Catproc scripts   ************
Serial   Phase #:48   [test] Files:1    Time: 7s
Restart  Phase #:49   [test] Files:1    Time: 2s
**************   Final RDBMS scripts   *************
Serial   Phase #:50   [test] Files:1    Time: 5s
************   Upgrade Component Start   ***********
Serial   Phase #:51   [test] Files:1    Time: 2s
Restart  Phase #:52   [test] Files:1    Time: 1s
**********   Upgrading Java and non-Java   *********
Serial   Phase #:53   [test] Files:2    Time: 191s
*****************   Upgrading XDB   ****************
Restart  Phase #:54   [test] Files:1    Time: 0s
Serial   Phase #:56   [test] Files:3    Time: 9s
Serial   Phase #:57   [test] Files:3    Time: 5s
Parallel Phase #:58   [test] Files:10   Time: 6s
Parallel Phase #:59   [test] Files:25   Time: 8s
Serial   Phase #:60   [test] Files:4    Time: 9s
Serial   Phase #:61   [test] Files:1    Time: 0s
Serial   Phase #:62   [test] Files:32   Time: 6s
Serial   Phase #:63   [test] Files:1    Time: 0s
Parallel Phase #:64   [test] Files:6    Time: 9s
Serial   Phase #:65   [test] Files:2    Time: 18s
Serial   Phase #:66   [test] Files:3    Time: 29s
****************   Upgrading ORDIM   ***************
Restart  Phase #:67   [test] Files:1    Time: 2s
Serial   Phase #:69   [test] Files:1    Time: 4s
Parallel Phase #:70   [test] Files:2    Time: 36s
Restart  Phase #:71   [test] Files:1    Time: 0s
Parallel Phase #:72   [test] Files:2    Time: 4s
Serial   Phase #:73   [test] Files:2    Time: 5s
*****************   Upgrading SDO   ****************
Restart  Phase #:74   [test] Files:1    Time: 1s
Serial   Phase #:76   [test] Files:1    Time: 42s
Serial   Phase #:77   [test] Files:2    Time: 5s
Restart  Phase #:78   [test] Files:1    Time: 0s
Serial   Phase #:79   [test] Files:1    Time: 42s
Restart  Phase #:80   [test] Files:1    Time: 1s
Parallel Phase #:81   [test] Files:3    Time: 67s
Restart  Phase #:82   [test] Files:1    Time: 0s
Serial   Phase #:83   [test] Files:1    Time: 7s
Restart  Phase #:84   [test] Files:1    Time: 1s
Serial   Phase #:85   [test] Files:1    Time: 12s
Restart  Phase #:86   [test] Files:1    Time: 0s
Parallel Phase #:87   [test] Files:4    Time: 122s
Restart  Phase #:88   [test] Files:1    Time: 2s
Serial   Phase #:89   [test] Files:1    Time: 4s
Restart  Phase #:90   [test] Files:1    Time: 1s
Serial   Phase #:91   [test] Files:2    Time: 12s
Restart  Phase #:92   [test] Files:1    Time: 1s
Serial   Phase #:93   [test] Files:1    Time: 2s
Restart  Phase #:94   [test] Files:1    Time: 1s
*******   Upgrading ODM, WK, EXF, RUL, XOQ   *******
Serial   Phase #:95   [test] Files:1    Time: 15s
Restart  Phase #:96   [test] Files:1    Time: 1s
***********   Final Component scripts    ***********
Serial   Phase #:97   [test] Files:1    Time: 3s
*************   Final Upgrade scripts   ************
Serial   Phase #:98   [test] Files:1    Time: 197s
*******************   Migration   ******************
Serial   Phase #:99   [test] Files:1    Time: 2s
***   End PDB Application Upgrade Pre-Shutdown   ***
Serial   Phase #:100  [test] Files:1    Time: 2s
Serial   Phase #:101  [test] Files:1    Time: 0s
Serial   Phase #:102  [test] Files:1    Time: 39s
*****************   Post Upgrade   *****************
Serial   Phase #:103  [test] Files:1    Time: 15s
****************   Summary report   ****************
Serial   Phase #:104  [test] Files:1    Time: 2s
***   End PDB Application Upgrade Post-Shutdown   **
Serial   Phase #:105  [test] Files:1    Time: 3s
Serial   Phase #:106  [test] Files:1    Time: 0s
Serial   Phase #:107  [test] Files:1     Time: 58s

------------------------------------------------------
Phases [0-107]         End Time:[2020_01_18 09:58:11]
------------------------------------------------------

Grand Total Time: 2109s 

 LOG FILES: (/u01/app/oracle/product/19.0.0/dbhome_1/cfgtoollogs/test/upgrade20200118092252/catupgrd*.log)

Upgrade Summary Report Located in:
/u01/app/oracle/product/19.0.0/dbhome_1/cfgtoollogs/test/upgrade20200118092252/upg_summary.log

Grand Total Upgrade Time:    [0d:0h:35m:9s]
[oracle@wls10306-02 dbhome_1]$ 

-- 升-级完,运行postupgrade脚本

[oracle@wls10306-02 dbhome_1]$ sqlplus /nolog

SQL*Plus: Release 19.0.0.0.0 - Production on Sat Jan 18 10:10:25 2020
Version 19.3.0.0.0

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

SQL> conn / as sysdba
Connected to an idle instance.
SQL> startup
ORACLE instance started.

Total System Global Area 1476391088 bytes
Fixed Size		    8896688 bytes
Variable Size		 1006632960 bytes
Database Buffers	  452984832 bytes
Redo Buffers		    7876608 bytes
Database mounted.
Database opened.
SQL> /u01/postupgrade_fixups.sql
SP2-0734: unknown command beginning "/u01/postu..." - rest of line ignored.
SQL> @/u01/postupgrade_fixups.sql

SQL> @/u01/postupgrade_fixups.sql

Session altered.


PL/SQL procedure successfully completed.


PL/SQL procedure successfully completed.


PL/SQL procedure successfully completed.


Package created.

No errors.

Package body created.


PL/SQL procedure successfully completed.

No errors.





Package created.

No errors.

Package body created.

No errors.
Executing Oracle POST-Upgrade Fixup Script

Auto-Generated by:       Oracle Preupgrade Script
                         Version: 19.0.0.0.0 Build: 1
Generated on:            2020-01-17 17:09:26

For Source Database:     TEST
Source Database Version: 12.2.0.1.0
For Upgrade to Version:  19.0.0.0.0

Preup                             Preupgrade
Action                            Issue Is
Number  Preupgrade Check Name     Remedied    Further DBA Action
------  ------------------------  ----------  --------------------------------
   12.  depend_usr_tables         YES         None.
   13.  old_time_zones_exist      NO          Manual fixup recommended.
   14.  dir_symlinks              YES         None.
   15.  post_dictionary           YES         None.
   16.  post_fixed_objects        NO          Informational only.
                                              Further action is optional.
   17.  upg_by_std_upgrd          NO          Informational only.
                                              Further action is optional.

The fixup scripts have been run and resolved what they can. However,
there are still issues originally identified by the preupgrade that
have not been remedied and are still present in the database.
Depending on the severity of the specific issue, and the nature of
the issue itself, that could mean that your database upgrade is not
fully complete.  To resolve the outstanding issues, start by reviewing
the postupgrade_fixups.sql and searching it for the name of
the failed CHECK NAME or Preupgrade Action Number listed above.
There you will find the original corresponding diagnostic message
from the preupgrade which explains in more detail what still needs
to be done.

PL/SQL procedure successfully completed.


Session altered.

SQL> 

-- 查看timezone ,是26 。19c的timezone版本即使26(可以通过docs.oracle.com查看).这里就不用升-级了 。

SQL> SELECT PROPERTY_NAME, SUBSTR(property_value, 1, 30) value
FROM DATABASE_PROPERTIES
WHERE PROPERTY_NAME LIKE 'DST_%'
ORDER BY PROPERTY_NAME;  2    3    4  

PROPERTY_NAME
--------------------------------------------------------------------------------------------------------------------------------
VALUE
------------------------------------------------------------------------------------------------------------------------
DST_PRIMARY_TT_VERSION
26

DST_SECONDARY_TT_VERSION
0

DST_UPGRADE_STATE
NONE


SQL> 

-- 查看组件版本  (重新便已完毕,还是invalid为啥呢)

SQL> set line 200
col COMP_ID format a10
col COMP_NAME format a35
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 modifiedSQL> SQL> SQL>   2    3  ;

COMP_ID    COMP_NAME                           VERSION                                  STATUS
---------- ----------------------------------- ---------------------------------------- --------------------------------------------
AMD        OLAP Catalog                        11.2.0.4.0                               REMOVED
APEX       Oracle Application Express          18.2.0.00.                               INVALID
RAC        Oracle Real Application Cluste      19.0.0.0.0                               OPTION OFF
CATALOG    Oracle Database Catalog Views       19.0.0.0.0                               UPGRADED
CATPROC    Oracle Database Packages and T      19.0.0.0.0                               UPGRADED
JAVAVM     JServer JAVA Virtual Machine        19.0.0.0.0                               UPGRADED
XML        Oracle XDK                          19.0.0.0.0                               UPGRADED
CATJAVA    Oracle Database Java Packages       19.0.0.0.0                               UPGRADED
APS        OLAP Analytic Workspace             19.0.0.0.0                               UPGRADED
CONTEXT    Oracle Text                         19.0.0.0.0                               UPGRADED
OWM        Oracle Workspace Manager            19.0.0.0.0                               UPGRADED

COMP_ID    COMP_NAME                           VERSION                                  STATUS
---------- ----------------------------------- ---------------------------------------- --------------------------------------------
XDB        Oracle XML Database                 19.0.0.0.0                               UPGRADED
ORDIM      Oracle Multimedia                   19.0.0.0.0                               UPGRADED
SDO        Spatial                             19.0.0.0.0                               UPGRADED
XOQ        Oracle OLAP API                     19.0.0.0.0                               UPGRADED

15 rows selected.

SQL> 

-- 修复apex组件状态invalid 。查看是否有invalid的object,在使用utlrp.sql编译的时候,的确最后发现有一个对象没有编译。
This error occurs when one or more Application Express objects within the installation are invalid。

SQL> SELECT count(1) FROM dba_objects where status = 'INVALID' AND (owner like 'FLOWS%' or owner like 'APEX%');

  COUNT(1)
----------
	 1

SQL> 

set serveroutput on 
exec validate_apex; 

-- 使用脚本apex_verify.sql来检查,发现触发器FLOWS_FILES.WWV_BIU_FLOW_FILE_OBJECTS没有编译,编译出错。
卸载apex,重新安装,问题解决(参照MOS上的其他解决方法,没有解决,检查当初升-级到12.2.0.1的时候apex,是正确的。但是再升-级到apex18.2就发现这个触发器对象无法编译)
卸载后,重新安装,安装后,再次查看apex组件,状态是valid 。

SQL> set line 200
col COMP_ID format a10
col COMP_NAME format a35
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 modifiedSQL> SQL> SQL>   2    3  
  4  ;

COMP_ID    COMP_NAME			       VERSION					STATUS
---------- ----------------------------------- ---------------------------------------- --------------------------------------------
AMD	   OLAP Catalog 		       11.2.0.4.0				REMOVED
RAC	   Oracle Real Application Cluste      19.0.0.0.0				OPTION OFF
CATALOG    Oracle Database Catalog Views       19.0.0.0.0				VALID
CATPROC    Oracle Database Packages and T      19.0.0.0.0				VALID
JAVAVM	   JServer JAVA Virtual Machine        19.0.0.0.0				VALID
OWM	   Oracle Workspace Manager	       19.0.0.0.0				VALID
CATJAVA    Oracle Database Java Packages       19.0.0.0.0				VALID
XML	   Oracle XDK			       19.0.0.0.0				VALID
CONTEXT    Oracle Text			       19.0.0.0.0				VALID
XDB	   Oracle XML Database		       19.0.0.0.0				VALID
ORDIM	   Oracle Multimedia		       19.0.0.0.0				VALID

COMP_ID    COMP_NAME			       VERSION					STATUS
---------- ----------------------------------- ---------------------------------------- --------------------------------------------
APS	   OLAP Analytic Workspace	       19.0.0.0.0				VALID
SDO	   Spatial			       19.0.0.0.0				VALID
XOQ	   Oracle OLAP API		       19.0.0.0.0				VALID
APEX	   Oracle Application Express	       18.2.0.00.				VALID

15 rows selected.

SQL> 

到此升-级完毕(备注:12c系列,包含12c,18c,19c的升-级套路都是一样的)。

end。

-- 2020-01-21 add. 补充执行脚本utlusts.sql 和升级timezone。

重新看了一遍官方文档,2577572.1 。提示要执行utlusts.sql脚本 (当初升级的时候还在想,升级到11g有个utlu112i.sql脚本执行检查,12c有个utlu122s.sql脚本执行后检查组件状态,怎么19c找不到了。原来是utlusts.sql这个)。执行后,发现timezone的版本比较低。需要升级。
(看官方文档,docs.oracle.com上的升级提示,说19.0.0.0自带的timezone版本是26.所以前几天升级的没有升级。今天看了测试文档,执行了这个脚本,提示19.3.0.0的timezone版本是32)

SQL> @?/rdbms/admin/utlusts.sql
Enter value for 1: 

Oracle Database Release 19 Post-Upgrade Status Tool    01-21-2020 14:24:1
Database Name: TEST

Component				Current 	Full	 Elapsed Time
Name					Status		Version  HH:MM:SS

Oracle Server				  VALID      19.3.0.0.0  00:18:20
JServer JAVA Virtual Machine		  VALID      19.3.0.0.0  00:01:00
Oracle XDK				  VALID      19.3.0.0.0  00:00:59
Oracle Database Java Packages		  VALID      19.3.0.0.0  00:00:10
OLAP Analytic Workspace 		  VALID      19.3.0.0.0  00:00:07
Oracle Text				  VALID      19.3.0.0.0  00:00:24
Oracle Workspace Manager		  VALID      19.3.0.0.0  00:00:26
Oracle Real Application Clusters     OPTION OFF      19.3.0.0.0  00:00:00
Oracle XML Database			  VALID      19.3.0.0.0  00:01:33
Oracle Multimedia			  VALID      19.3.0.0.0  00:00:44
Spatial 				  VALID      19.3.0.0.0  00:05:13
Oracle OLAP API 			  VALID      19.3.0.0.0  00:00:12
Datapatch							 00:03:11
Final Actions							 00:03:18
Post Upgrade							 00:00:11
Post Compile							 00:15:09

Total Upgrade Time: 00:48:25

Database time zone version is 26. It is older than current release time
zone version 32. Time zone upgrade is needed using the DBMS_DST package.

SQL> 

Oracle docs文档上的timezone是26.但是其版本是19.0.0.0。 我这里测试的版本是19.3.0.0.

Example 4-27 Manual Fixup Instructions for Time Zone Version (old_time_zones_exist)

+ Upgrade the database time zone version using the DBMS_DST package. 


                   The database is using timezone datafile version 14 and the target

                   19.0.0.0.0 database ships with timezone datafile version 26.

                   Oracle recommends using the most recent timezone data.  For further

                   information, refer to My Oracle Support Note 1585343.1
                                           

                   SQL> @C:\Users\oracle\Downloads\DBMS_DST_scriptsV1.9\DBMS_DST_scriptsV1.9\countstatsTSTZ.sql

                   .............
.............................

-- 执行timezone升级, 还是使用DBMS_DST_scriptsV1.9.zip 这个文件  

SQL> @/home/oracle/DBMS_DST_scriptsV1.9/countstatsTSTZ.sql
 .
 Amount of TSTZ data using num_rows stats info in DBA_TABLES.
 .
 For SYS tables first...
 Note: empty tables are not listed.
 Stat date  - Owner.Tablename.Columnname - num_rows
16/01/2020 - SYS.AQ$_ALERT_QT_S.CREATION_TIME - 5
16/01/2020 - SYS.AQ$_ALERT_QT_S.DELETION_TIME - 5
16/01/2020 - SYS.AQ$_ALERT_QT_S.MODIFICATION_TIME - 5
24/08/2013 - SYS.AQ$_AQ$_MEM_MC_S.CREATION_TIME - 3
24/08/2013 - SYS.AQ$_AQ$_MEM_MC_S.DELETION_TIME - 3
24/08/2013 - SYS.AQ$_AQ$_MEM_MC_S.MODIFICATION_TIME - 3
18/01/2020 - SYS.AQ$_AQ_PROP_TABLE_S.CREATION_TIME - 1
18/01/2020 - SYS.AQ$_AQ_PROP_TABLE_S.DELETION_TIME - 1
18/01/2020 - SYS.AQ$_AQ_PROP_TABLE_S.MODIFICATION_TIME - 1
19/01/2020 - SYS.AQ$_ORA$PREPLUGIN_BACKUP_QTB_S.CREATION_TIME - 1
19/01/2020 - SYS.AQ$_ORA$PREPLUGIN_BACKUP_QTB_S.DELETION_TIME - 1
19/01/2020 - SYS.AQ$_ORA$PREPLUGIN_BACKUP_QTB_S.MODIFICATION_TIME - 1
18/01/2020 - SYS.AQ$_PDB_MON_EVENT_QTABLE$_S.CREATION_TIME - 1
18/01/2020 - SYS.AQ$_PDB_MON_EVENT_QTABLE$_S.DELETION_TIME - 1
18/01/2020 - SYS.AQ$_PDB_MON_EVENT_QTABLE$_S.MODIFICATION_TIME - 1
17/01/2020 - SYS.AQ$_SCHEDULER$_EVENT_QTAB_S.CREATION_TIME - 3
17/01/2020 - SYS.AQ$_SCHEDULER$_EVENT_QTAB_S.DELETION_TIME - 3
17/01/2020 - SYS.AQ$_SCHEDULER$_EVENT_QTAB_S.MODIFICATION_TIME - 3
19/01/2020 - SYS.AQ$_SCHEDULER$_REMDB_JOBQTAB_S.CREATION_TIME - 1
19/01/2020 - SYS.AQ$_SCHEDULER$_REMDB_JOBQTAB_S.DELETION_TIME - 1
19/01/2020 - SYS.AQ$_SCHEDULER$_REMDB_JOBQTAB_S.MODIFICATION_TIME - 1
18/01/2020 - SYS.AQ$_SCHEDULER_FILEWATCHER_QT_S.CREATION_TIME - 1
18/01/2020 - SYS.AQ$_SCHEDULER_FILEWATCHER_QT_S.DELETION_TIME - 1
18/01/2020 - SYS.AQ$_SCHEDULER_FILEWATCHER_QT_S.MODIFICATION_TIME - 1
18/01/2020 - SYS.AQ$_SUBSCRIBER_TABLE.CREATION_TIME - 1
18/01/2020 - SYS.AQ$_SUBSCRIBER_TABLE.DELETION_TIME - 1
18/01/2020 - SYS.AQ$_SUBSCRIBER_TABLE.MODIFICATION_TIME - 1
19/01/2020 - SYS.AQ$_SYS$SERVICE_METRICS_TAB_S.CREATION_TIME - 4
19/01/2020 - SYS.AQ$_SYS$SERVICE_METRICS_TAB_S.DELETION_TIME - 4
19/01/2020 - SYS.AQ$_SYS$SERVICE_METRICS_TAB_S.MODIFICATION_TIME - 4
19/01/2020 - SYS.KET$_AUTOTASK_STATUS.ABA_START_TIME - 1
19/01/2020 - SYS.KET$_AUTOTASK_STATUS.ABA_STATE_TIME - 1
19/01/2020 - SYS.KET$_AUTOTASK_STATUS.MW_RECORD_TIME - 1
19/01/2020 - SYS.KET$_AUTOTASK_STATUS.MW_START_TIME - 1
19/01/2020 - SYS.KET$_AUTOTASK_STATUS.RECONCILE_TIME - 1
18/01/2020 - SYS.KET$_CLIENT_CONFIG.FIELD_2 - 7
18/01/2020 - SYS.KET$_CLIENT_CONFIG.LAST_CHANGE - 7
19/01/2020 - SYS.KET$_CLIENT_TASKS.CURR_WIN_START - 3
19/01/2020 - SYS.KET$_CLIENT_TASKS.LG_DATE - 3
19/01/2020 - SYS.KET$_CLIENT_TASKS.LT_DATE - 3
19/01/2020 - SYS.OPTSTAT_HIST_CONTROL$.SPARE6 - 45
19/01/2020 - SYS.OPTSTAT_HIST_CONTROL$.SVAL2 - 45
18/01/2020 - SYS.OPTSTAT_SNAPSHOT$.TIMESTAMP - 3491
18/01/2020 - SYS.OPTSTAT_USER_PREFS$.CHGTIME - 72
18/01/2020 - SYS.RADM_FPTM$.TSWTZ_COL - 1
17/01/2020 - SYS.REG$.NTFN_GROUPING_START_TIME - 2
17/01/2020 - SYS.REG$.REG_TIME - 2
19/01/2020 - SYS.SCHEDULER$_EVENT_LOG.LOG_DATE - 221
19/01/2020 - SYS.SCHEDULER$_GLOBAL_ATTRIBUTE.ATTR_TSTAMP - 11
19/01/2020 - SYS.SCHEDULER$_JOB.END_DATE - 28
19/01/2020 - SYS.SCHEDULER$_JOB.LAST_ENABLED_TIME - 28
19/01/2020 - SYS.SCHEDULER$_JOB.LAST_END_DATE - 28
19/01/2020 - SYS.SCHEDULER$_JOB.LAST_START_DATE - 28
19/01/2020 - SYS.SCHEDULER$_JOB.NEXT_RUN_DATE - 28
19/01/2020 - SYS.SCHEDULER$_JOB.START_DATE - 28
19/01/2020 - SYS.SCHEDULER$_JOB_RUN_DETAILS.LOG_DATE - 164
19/01/2020 - SYS.SCHEDULER$_JOB_RUN_DETAILS.REQ_START_DATE - 164
19/01/2020 - SYS.SCHEDULER$_JOB_RUN_DETAILS.START_DATE - 164
17/01/2020 - SYS.SCHEDULER$_SCHEDULE.END_DATE - 4
17/01/2020 - SYS.SCHEDULER$_SCHEDULE.REFERENCE_DATE - 4
19/01/2020 - SYS.SCHEDULER$_WINDOW.ACTUAL_START_DATE - 9
19/01/2020 - SYS.SCHEDULER$_WINDOW.END_DATE - 9
19/01/2020 - SYS.SCHEDULER$_WINDOW.LAST_START_DATE - 9
19/01/2020 - SYS.SCHEDULER$_WINDOW.MANUAL_OPEN_TIME - 9
19/01/2020 - SYS.SCHEDULER$_WINDOW.NEXT_START_DATE - 9
19/01/2020 - SYS.SCHEDULER$_WINDOW.START_DATE - 9
19/01/2020 - SYS.SCHEDULER$_WINDOW_DETAILS.LOG_DATE - 1
19/01/2020 - SYS.SCHEDULER$_WINDOW_DETAILS.REQ_START_DATE - 1
19/01/2020 - SYS.SCHEDULER$_WINDOW_DETAILS.START_DATE - 1
18/01/2020 - SYS.STATS_TARGET$.END_TIME - 468
18/01/2020 - SYS.STATS_TARGET$.START_TIME - 468
19/01/2020 - SYS.TAB_STATS$.SPARE6 - 1128
19/01/2020 - SYS.WRI$_ALERT_HISTORY.CREATION_TIME - 48
19/01/2020 - SYS.WRI$_ALERT_HISTORY.TIME_SUGGESTED - 48
18/01/2020 - SYS.WRI$_OPTSTAT_HISTGRM_HISTORY.SAVTIME - 96108
18/01/2020 - SYS.WRI$_OPTSTAT_HISTGRM_HISTORY.SPARE6 - 96108
18/01/2020 - SYS.WRI$_OPTSTAT_HISTHEAD_HISTORY.SAVTIME - 87836
18/01/2020 - SYS.WRI$_OPTSTAT_HISTHEAD_HISTORY.SPARE6 - 87836
18/01/2020 - SYS.WRI$_OPTSTAT_IND_HISTORY.SAVTIME - 7174
18/01/2020 - SYS.WRI$_OPTSTAT_IND_HISTORY.SPARE6 - 7174
18/01/2020 - SYS.WRI$_OPTSTAT_OPR.END_TIME - 498
18/01/2020 - SYS.WRI$_OPTSTAT_OPR.SPARE6 - 498
18/01/2020 - SYS.WRI$_OPTSTAT_OPR.START_TIME - 498
18/01/2020 - SYS.WRI$_OPTSTAT_OPR_TASKS.END_TIME - 11109
18/01/2020 - SYS.WRI$_OPTSTAT_OPR_TASKS.SPARE6 - 11109
18/01/2020 - SYS.WRI$_OPTSTAT_OPR_TASKS.START_TIME - 11109
18/01/2020 - SYS.WRI$_OPTSTAT_TAB_HISTORY.SAVTIME - 5732
18/01/2020 - SYS.WRI$_OPTSTAT_TAB_HISTORY.SPARE6 - 5732
19/01/2020 - SYS.WRM$_DATABASE_INSTANCE.STARTUP_TIME_TZ - 11
19/01/2020 - SYS.WRM$_PDB_INSTANCE.OPEN_TIME_TZ - 1
19/01/2020 - SYS.WRM$_PDB_INSTANCE.STARTUP_TIME_TZ - 1
19/01/2020 - SYS.WRM$_PDB_IN_SNAP.OPEN_TIME_TZ - 1
18/01/2020 - SYS.WRM$_SNAPSHOT.BEGIN_INTERVAL_TIME_TZ - 23
18/01/2020 - SYS.WRM$_SNAPSHOT.END_INTERVAL_TIME_TZ - 23
17/01/2020 - SYS.XS$PRIN.END_DATE - 15
17/01/2020 - SYS.XS$PRIN.START_DATE - 15
 Total numrow of SYS TSTZ columns is : 435477
 There are in total 165 non-SYS TSTZ columns.
 .
 For non-SYS tables ...
 Note: empty tables are not listed.
 Stat date  - Owner.Tablename.Columnname - num_rows
19/01/2020 - GSMADMIN_INTERNAL.AQ$_CHANGE_LOG_QUEUE_TABLE_S.CREATION_TIME - 1
19/01/2020 - GSMADMIN_INTERNAL.AQ$_CHANGE_LOG_QUEUE_TABLE_S.DELETION_TIME - 1
19/01/2020 - GSMADMIN_INTERNAL.AQ$_CHANGE_LOG_QUEUE_TABLE_S.MODIFICATION_TIME -
1
18/01/2020 - IX.AQ$_ORDERS_QUEUETABLE_S.CREATION_TIME - 4
18/01/2020 - IX.AQ$_ORDERS_QUEUETABLE_S.DELETION_TIME - 4
18/01/2020 - IX.AQ$_ORDERS_QUEUETABLE_S.MODIFICATION_TIME - 4
18/01/2020 - IX.AQ$_STREAMS_QUEUE_TABLE_S.CREATION_TIME - 1
18/01/2020 - IX.AQ$_STREAMS_QUEUE_TABLE_S.DELETION_TIME - 1
18/01/2020 - IX.AQ$_STREAMS_QUEUE_TABLE_S.MODIFICATION_TIME - 1
17/01/2020 - WMSYS.AQ$_WM$EVENT_QUEUE_TABLE_S.CREATION_TIME - 1
17/01/2020 - WMSYS.AQ$_WM$EVENT_QUEUE_TABLE_S.DELETION_TIME - 1
17/01/2020 - WMSYS.AQ$_WM$EVENT_QUEUE_TABLE_S.MODIFICATION_TIME - 1
17/01/2020 - WMSYS.WM$WORKSPACES_TABLE$.CREATETIME - 1
17/01/2020 - WMSYS.WM$WORKSPACES_TABLE$.LAST_CHANGE - 1
 Total numrow of non-SYS TSTZ columns is : 23
 There are in total 36 non-SYS TSTZ columns.
 Total Minutes elapsed : 0
SQL> @/home/oracle/DBMS_DST_scriptsV1.9/upg_tzv_check.sql
INFO: Starting with RDBMS DST update preparation.
INFO: NO actual RDBMS DST update will be done by this script.
INFO: If an ERROR occurs the script will EXIT sqlplus.
INFO: Doing checks for known issues ...
INFO: Database version is 19.0.0.0 .
INFO: Database RDBMS DST version is DSTv26 .
INFO: No known issues detected.
INFO: Now detecting new RDBMS DST version.
A prepare window has been successfully started.
INFO: Newest RDBMS DST version detected is DSTv32 .
INFO: Next step is checking all TSTZ data.
INFO: It might take a while before any further output is seen ...
A prepare window has been successfully ended.
INFO: A newer RDBMS DST version than the one currently used is found.
INFO: Note that NO DST update was yet done.
INFO: Now run upg_tzv_apply.sql to do the actual RDBMS DST update.
INFO: Note that the upg_tzv_apply.sql script will
INFO: restart the database 2 times WITHOUT any confirmation or prompt.
SQL> 
SQL> @/home/oracle/DBMS_DST_scriptsV1.9/upg_tzv_apply.sql
INFO: If an ERROR occurs the script will EXIT sqlplus.
INFO: The database RDBMS DST version will be updated to DSTv32 .
WARNING: This script will restart the database 2 times
WARNING: WITHOUT asking ANY confirmation.
WARNING: Hit control-c NOW if this is not intended.
INFO: Restarting the database in UPGRADE mode to start the DST upgrade.
Database closed.
Database dismounted.
ORACLE instance shut down.
ORACLE instance started.

Total System Global Area  838858176 bytes
Fixed Size		    8902080 bytes
Variable Size		  394264576 bytes
Database Buffers	  432013312 bytes
Redo Buffers		    3678208 bytes
Database mounted.
Database opened.
INFO: Starting the RDBMS DST upgrade.
INFO: Upgrading all SYS owned TSTZ data.
INFO: It might take time before any further output is seen ...
An upgrade window has been successfully started.
INFO: Restarting the database in NORMAL mode to upgrade non-SYS TSTZ data.
Database closed.
Database dismounted.
ORACLE instance shut down.
ORACLE instance started.

Total System Global Area  838858176 bytes
Fixed Size		    8902080 bytes
Variable Size		  394264576 bytes
Database Buffers	  432013312 bytes
Redo Buffers		    3678208 bytes
Database mounted.
Database opened.
INFO: Upgrading all non-SYS TSTZ data.
INFO: It might take time before any further output is seen ...
INFO: Do NOT start any application yet that uses TSTZ data!
INFO: Next is a list of all upgraded tables:
Table list: "MDSYS"."SDO_DIAG_MESSAGES_TABLE"
Number of failures: 0
Table list: "IX"."AQ$_STREAMS_QUEUE_TABLE_S"
Number of failures: 0
Table list: "IX"."AQ$_ORDERS_QUEUETABLE_S"
Number of failures: 0
Table list: "IX"."AQ$_STREAMS_QUEUE_TABLE_L"
Number of failures: 0
Table list: "IX"."AQ$_ORDERS_QUEUETABLE_L"
Number of failures: 0
Table list: "GSMADMIN_INTERNAL"."AQ$_CHANGE_LOG_QUEUE_TABLE_S"
Number of failures: 0
Table list: "GSMADMIN_INTERNAL"."AQ$_CHANGE_LOG_QUEUE_TABLE_L"
Number of failures: 0
Table list: "APEX_180200"."WWV_QS_RANDOM_NAMES"
Number of failures: 0
Table list: "APEX_180200"."WWV_FLOW_DEBUG_MESSAGES2"
Number of failures: 0
Table list: "APEX_180200"."WWV_FLOW_ACTIVITY_LOG1$"
Number of failures: 0
Table list: "APEX_180200"."WWV_FLOW_ACTIVITY_LOG2$"
Number of failures: 0
Table list: "APEX_180200"."WWV_FLOW_FEEDBACK_FOLLOWUP"
Number of failures: 0
Table list: "APEX_180200"."WWV_FLOW_WORKSHEET_NOTIFY"
Number of failures: 0
Table list: "APEX_180200"."WWV_FLOW_FEEDBACK"
Number of failures: 0
Table list: "APEX_180200"."WWV_FLOW_DEBUG_MESSAGES"
Number of failures: 0
INFO: Total failures during update of TSTZ data: 0 .
An upgrade window has been successfully ended.
INFO: Your new Server RDBMS DST version is DSTv32 .
INFO: The RDBMS DST update is successfully finished.
INFO: Make sure to exit this sqlplus session.
INFO: Do not use it for timezone related selects.
SQL> 

-- 检查升级后的情况,database的timezone版本已经升级到32了 。

SQL> @?/rdbms/admin/utlusts.sql
Enter value for 1: 

Oracle Database Release 19 Post-Upgrade Status Tool    01-21-2020 14:43:2
Database Name: TEST

Component				Current 	Full	 Elapsed Time
Name					Status		Version  HH:MM:SS

Oracle Server				  VALID      19.3.0.0.0  00:18:20
JServer JAVA Virtual Machine		  VALID      19.3.0.0.0  00:01:00
Oracle XDK				  VALID      19.3.0.0.0  00:00:59
Oracle Database Java Packages		  VALID      19.3.0.0.0  00:00:10
OLAP Analytic Workspace 		  VALID      19.3.0.0.0  00:00:07
Oracle Text				  VALID      19.3.0.0.0  00:00:24
Oracle Workspace Manager		  VALID      19.3.0.0.0  00:00:26
Oracle Real Application Clusters     OPTION OFF      19.3.0.0.0  00:00:00
Oracle XML Database			  VALID      19.3.0.0.0  00:01:33
Oracle Multimedia			  VALID      19.3.0.0.0  00:00:44
Spatial 				  VALID      19.3.0.0.0  00:05:13
Oracle OLAP API 			  VALID      19.3.0.0.0  00:00:12
Datapatch							 00:03:11
Final Actions							 00:03:18
Post Upgrade							 00:00:11
Post Compile							 00:15:09

Total Upgrade Time: 00:48:25

Database time zone version is 32. It meets current release needs.

SQL> 

-- 另外,MOS 2577572.1文档上提到,从18c开始,oracle自带timezone升级的这些脚本。对比了下DBMS_DST_scriptsV1.9.zip和$ORACLE_HOME/rdbms/admin 里面的utltz_*脚本。内容是一样的。所以执行那个都可以。

[oracle@wls10306-02 admin]$ ll /u01/app/oracle/product/19.0.0/dbhome_1/rdbms/admin/utltz_*
-rw-r--r-- 1 oracle oinstall  7423 Feb 25  2017 /u01/app/oracle/product/19.0.0/dbhome_1/rdbms/admin/utltz_countstar.sql
-rw-r--r-- 1 oracle oinstall  8317 Feb 25  2017 /u01/app/oracle/product/19.0.0/dbhome_1/rdbms/admin/utltz_countstats.sql
-rw-r--r-- 1 oracle oinstall 21526 Sep  9  2017 /u01/app/oracle/product/19.0.0/dbhome_1/rdbms/admin/utltz_upg_apply.sql   
-rw-r--r-- 1 oracle oinstall 33684 Sep  9  2017 /u01/app/oracle/product/19.0.0/dbhome_1/rdbms/admin/utltz_upg_check.sql   
[oracle@wls10306-02 admin]$ 

END

你可能感兴趣的:(12C/18C/19C)