还是在同一台电脑上,将从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)
-- 将安装包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。