How to upgrade to Oracle Database 18c from 12c on Linux

Following, the step to upgrade an Oracle Database 12c to a new Oracle Database 18c (version 18.3)  

During the upgrade, the database can’t provide any service because will be open with “upgrade” option. Ensure to have a database backup before apply the upgrade. 

We are used an an Oracle Linux 7.5 environment.

#STEP1: Download Oracle Database 18.3 release
https://www.oracle.com/technetwork/database/enterprise-edition/downloads/oracle18c-linux-180000-5022980.html

#STEP2: Install the software 
Open Linux Desktop or setting X11
mkdir /oracle/product/18
cd /oracle/product/18
unzip LINUX.X64_180000_db_home.zip
export ORACLE_HOME=/oracle/product/18
./runInstaller






























#STEP3: Pre-check upgrade
export ORACLE_HOME=/oracle/product/12.2

==>Startup database OLD HOME
sqlplus / as sysdba

SQL*Plus: Release 12.2.0.1.0 Production on Mer Ago 15 00:26:26 2018

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

Connesso a un'istanza sospesa.

SQL> startup
Istanza ORACLE avviata.

Total System Global Area  536870912 bytes
Fixed Size		    8622776 bytes
Variable Size		  398462280 bytes
Database Buffers	  121634816 bytes
Redo Buffers		    8151040 bytes
MOUNT del database eseguito.
Database aperto.
SQL> exit
Disconnesso da Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production

==>Pre upgrade 
/oracle/product/18/jdk/bin/java -jar /oracle/product/18/rdbms/admin/preupgrade.jar TERMINAL TEXT

Report generated by Oracle Database Pre-Upgrade Information Tool Version
18.0.0.0.0 on 2018-08-15T00:29:22

Upgrade-To version: 18.0.0.0.0

=======================================
Status of the database prior to upgrade
=======================================
      Database Name:  ORCL
     Container Name:  ORCL
       Container ID:  0
            Version:  12.2.0.1.0
         Compatible:  12.2.0
          Blocksize:  8192
           Platform:  Linux x86 64-bit
      Timezone File:  26
  Database log mode:  NOARCHIVELOG
           Readonly:  FALSE
            Edition:  EE

  Oracle Component                       Upgrade Action    Current Status
  ----------------                       --------------    --------------
  Oracle Server                          [to be upgraded]  VALID         
  Oracle Workspace Manager               [to be upgraded]  VALID         
  Oracle XML Database                    [to be upgraded]  VALID         

==============
BEFORE UPGRADE
==============

  REQUIRED ACTIONS
  ================
  None

  RECOMMENDED ACTIONS
  ===================
  1.  Update NUMERIC INITIALIZATION PARAMETERS to meet estimated minimums. 
      This action may be done now or when starting the database in upgrade mode
      using the 18.0.0.0.0 ORACLE HOME.
      
       Parameter                                 Currently  18.0.0.0.0 minimum
       ---------                                 ---------  ------------------
      *memory_target                             536870912          1203765248
       processes                                       150                 300
      
      The database upgrade process requires certain initialization parameters
      to meet minimum values.  The Oracle upgrade process itself has minimum
      values which may be higher and are marked with an asterisk.  After
      upgrading, those asterisked parameter values may be reset if needed.

  2.  (AUTOFIXUP) Gather stale data dictionary statistics prior to database
      upgrade in off-peak time using:
      
        EXECUTE DBMS_STATS.GATHER_DICTIONARY_STATS;
      
      Dictionary statistics do not exist or are stale (not up-to-date).
      
      Dictionary statistics help the Oracle optimizer find efficient SQL
      execution plans and are essential for proper upgrade timing. Oracle
      recommends gathering dictionary statistics in the last 24 hours before
      database upgrade.
      
      For information on managing optimizer statistics, refer to the 12.2.0.1
      Oracle Database SQL Tuning Guide.

  INFORMATION ONLY
  ================
  3.  To help you keep track of your tablespace allocations, the following
      AUTOEXTEND tablespaces are expected to successfully EXTEND during the
      upgrade process.
      
                                                 Min Size
      Tablespace                        Size     For Upgrade
      ----------                     ----------  -----------
      SYSAUX                             970 MB      1106 MB
      SYSTEM                             700 MB       910 MB
      TEMP                                42 MB       150 MB
      UNDOTBS1                           380 MB       414 MB
      
      Minimum tablespace sizes for upgrade are estimates.

  ORACLE GENERATED FIXUP SCRIPT
  =============================
  All of the issues in database ORCL
  which are identified above as BEFORE UPGRADE "(AUTOFIXUP)" can be resolved by
  executing the following

    SQL>@/oracle/cfgtoollogs/orcl/preupgrade/preupgrade_fixups.sql

=============
AFTER UPGRADE
=============

  REQUIRED ACTIONS
  ================
  None

  RECOMMENDED ACTIONS
  ===================
  4.  Upgrade the database time zone file using the DBMS_DST package.
      
      The database is using time zone file version 26 and the target 18.0.0.0.0
      release ships with time zone file version 31.
      
      Oracle recommends upgrading to the desired (latest) version of the time
      zone file.  For more information, refer to "Upgrading the Time Zone File
      and Timestamp with Time Zone Data" in the 18.0.0.0.0 Oracle Database
      Globalization Support Guide.

  5.  (AUTOFIXUP) Gather dictionary statistics after the upgrade using the
      command:
      
        EXECUTE DBMS_STATS.GATHER_DICTIONARY_STATS;
      
      Oracle recommends gathering dictionary statistics after upgrade.
      
      Dictionary statistics provide essential information to the Oracle
      optimizer to help it find efficient SQL execution plans. After a database
      upgrade, statistics need to be re-gathered as there can now be tables
      that have significantly changed during the upgrade or new tables that do
      not have statistics gathered yet.

  6.  Gather statistics on fixed objects after the upgrade and when there is a
      representative workload on the system using the command:
      
        EXECUTE DBMS_STATS.GATHER_FIXED_OBJECTS_STATS;
      
      This recommendation is given for all preupgrade runs.
      
      Fixed object statistics provide essential information to the Oracle
      optimizer to help it find efficient SQL execution plans.  Those
      statistics are specific to the Oracle Database release that generates
      them, and can be stale upon database upgrade.
      
      For information on managing optimizer statistics, refer to the 12.2.0.1
      Oracle Database SQL Tuning Guide.

  ORACLE GENERATED FIXUP SCRIPT
  =============================
  All of the issues in database ORCL
  which are identified above as AFTER UPGRADE "(AUTOFIXUP)" can be resolved by
  executing the following

    SQL>@/oracle/cfgtoollogs/orcl/preupgrade/postupgrade_fixups.sql


==================
PREUPGRADE SUMMARY
==================
  /oracle/cfgtoollogs/orcl/preupgrade/preupgrade.log
  /oracle/cfgtoollogs/orcl/preupgrade/preupgrade_fixups.sql
  /oracle/cfgtoollogs/orcl/preupgrade/postupgrade_fixups.sql

Execute fixup scripts as indicated below:

Before upgrade log into the database and execute the preupgrade fixups
@/oracle/cfgtoollogs/orcl/preupgrade/preupgrade_fixups.sql

After the upgrade:

Log into the database and execute the postupgrade fixups
@/oracle/cfgtoollogs/orcl/preupgrade/postupgrade_fixups.sql

Preupgrade complete: 2018-08-15T00:29:22


#STEP4: Apply preupgrade

sqlplus / as sysdba

SQL*Plus: Release 12.2.0.1.0 Production on Mer Ago 15 23:13:18 2018

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


Connesso a:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production

SQL> @/oracle/cfgtoollogs/orcl/preupgrade/preupgrade_fixups.sql
Executing Oracle PRE-Upgrade Fixup Script

Auto-Generated by:       Oracle Preupgrade Script
                         Version: 18.0.0.0.0 Build: 1
Generated on:            2018-08-15 00:29:17

For Source Database:     ORCL
Source Database Version: 12.2.0.1.0
For Upgrade to Version:  18.0.0.0.0

Preup                             Preupgrade
Action                            Issue Is
Number  Preupgrade Check Name     Remedied    Further DBA Action
------  ------------------------  ----------  --------------------------------
    1.  parameter_min_val         NO          Manual fixup recommended.
    2.  dictionary_stats          YES         None.
    3.  tablespaces_info          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.

Procedura PL/SQL completata correttamente.

SQL> alter system set sga_max_size=1024M scope=spfile;

Modificato sistema.

SQL> alter system set processes=300 scope=spfile;

Modificato sistema.

SQL> shutdown immediate
Database chiuso.
NOMOUNT del database eseguito.
Istanza ORACLE chiusa.

#STEP5: Open in upgrade mode 
cp /oracle/product/12.2/dbs/orapworcl /oracle/product/18/dbs/
cp /oracle/product/12.2/dbs/spfileorcl.ora /oracle/product/18/dbs/
export ORACLE_HOME=/oracle/product/18
export PATH=$ORACLE_HOME/bin:$PATH

sqlplus / as sysdba

SQL*Plus: Release 18.0.0.0.0 - Production on Mer Ago 15 23:36:42 2018
Version 18.3.0.0.0

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

Connesso a un'istanza sospesa.

SQL> startup upgrade
Istanza ORACLE avviata.

Total System Global Area 1073740616 bytes
Fixed Size		    8665928 bytes
Variable Size		 1006632960 bytes
Database Buffers	   50331648 bytes
Redo Buffers		    8110080 bytes
MOUNT del database eseguito.
Database aperto.
SQL> exit
Disconnesso da Oracle Database 18c Enterprise Edition Release 18.0.0.0.0 - Production
Version 18.3.0.0.0

mv OPatch OPatch.old
unzip /oracle/software/p6880880_180000_Linux-x86-64.zip -d $ORACLE_HOME
opatch version 
opatch lsinv

#STEP6: Run upgrade
mkdir /oracle/log
cd /oracle/product/18/rdbms/admin
/oracle/product/18/perl/bin/perl catctl.pl -n 4 -l /oracle/log catupgrd.sql

Argument list for [catctl.pl]
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 = /oracle/log
Priority List Name    L = 0
Upgrade Mode active   M = 0
SQL Process Count     n = 4
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: [18.0.0.0.0]
           STATUS: [Production]
            BUILD: [RDBMS_18.3.0.0.0DBRU_LINUX.X64_180627]


/oracle/product/18/rdbms/admin/orahome = [/oracle/product/18]
/oracle/product/18/bin/orabasehome = [/oracle/product/18]
catctlGetOrabase = [/oracle/product/18]

Analyzing file /oracle/product/18/rdbms/admin/catupgrd.sql

Log file directory = [/oracle/log]

catcon::set_log_file_base_path: ALL catcon-related output will be written to 
[/oracle/log/catupgrd_catcon_28179.lst]

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

catcon::set_log_file_base_path: catcon: See [/oracle/log/catupgrd_*.lst] files for spool files, if any


Number of Cpus        = 2
Database Name         = orcl
DataBase Version      = 12.2.0.1.0
Parallel SQL Process Count            = 4
Components in [orcl]
    Installed [APEX CATALOG CATPROC OWM XDB]
Not Installed [APS CATJAVA CONTEXT DV EM JAVAVM MGW ODM OLS ORDIM RAC SDO WK XML XOQ]

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

------------------------------------------------------
Phases [0-108]         End Time:[2018_08_16 00:11:47]
------------------------------------------------------

Grand Total Time: 1868s 

 LOG FILES: (/oracle/log/catupgrd*.log)

Upgrade Summary Report Located in:
/oracle/log/upg_summary.log

Grand Total Upgrade Time:    [0d:0h:31m:8s]
[oracle@ol7 admin]$ 
[oracle@ol7 admin]$ cat /oracle/log/upg_summary.log

Oracle Database Release 18 Post-Upgrade Status Tool    08-16-2018 00:10:5

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

Oracle Server                          UPGRADED      18.3.0.0.0  00:22:51
Oracle Workspace Manager               UPGRADED      18.3.0.0.0  00:01:11
Oracle Real Application Clusters     OPTION OFF      18.3.0.0.0  00:00:00
Oracle XML Database                    UPGRADED      18.3.0.0.0  00:02:21
Upgrade Datapatch                                                00:02:08
Final Actions                                                    00:02:14
Post Upgrade                                                     00:00:05
Post Upgrade Datapatch                                           00:00:19

Total Upgrade Time: 00:29:22

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

Grand Total Upgrade Time:    [0d:0h:31m:8s]

 
#STEP8: Post upgrade

sqlplus / as sysdba

SQL*Plus: Release 18.0.0.0.0 - Production on Gio Ago 16 00:20:54 2018
Version 18.3.0.0.0

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

Connesso a un'istanza sospesa.

SQL> startup
Istanza ORACLE avviata.

Total System Global Area 1073740616 bytes
Fixed Size		    8665928 bytes
Variable Size		 1006632960 bytes
Database Buffers	   50331648 bytes
Redo Buffers		    8110080 bytes
MOUNT del database eseguito.
Database aperto.
SQL> @/oracle/cfgtoollogs/orcl/preupgrade/postupgrade_fixups.sql

Modificata sessione.


Procedura PL/SQL completata correttamente.


Procedura PL/SQL completata correttamente.


Procedura PL/SQL completata correttamente.


Package creato.

Nessun errore.

Creato package body.


Procedura PL/SQL completata correttamente.

Nessun errore.





Package creato.

Nessun errore.

Creato package body.

Nessun errore.

Executing Oracle POST-Upgrade Fixup Script

Auto-Generated by:       Oracle Preupgrade Script
                         Version: 18.0.0.0.0 Build: 1
Generated on:            2018-08-15 00:29:22

For Source Database:     ORCL
Source Database Version: 12.2.0.1.0
For Upgrade to Version:  18.0.0.0.0

Preup                             Preupgrade
Action                            Issue Is
Number  Preupgrade Check Name     Remedied    Further DBA Action
------  ------------------------  ----------  --------------------------------
    4.  old_time_zones_exist      NO          Manual fixup recommended.
    5.  post_dictionary           YES         None.
    6.  post_fixed_objects        NO          Informational only.
                                              Further action is optional.

The fixup scripts have been run and resovled 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.

Procedura PL/SQL completata correttamente.


Modificata sessione.

SQL> exit

sqlplus / as sysdba

SQL*Plus: Release 18.0.0.0.0 - Production on Gio Ago 16 00:25:34 2018
Version 18.3.0.0.0

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


Connesso a:
Oracle Database 18c Enterprise Edition Release 18.0.0.0.0 - Production
Version 18.3.0.0.0

SQL> set timing on
SQL> EXECUTE DBMS_STATS.GATHER_FIXED_OBJECTS_STATS;

Procedura PL/SQL completata correttamente.

Passati: 00:02:08.96
SQL> select  version FROM v$timezone_file;

   VERSION
----------
	26

Passati: 00:00:00.02
SQL> select TZ_VERSION from registry$database;

TZ_VERSION
----------
	26

Passati: 00:00:00.02
SQL> exit
Disconnesso da Oracle Database 18c Enterprise Edition Release 18.0.0.0.0 - Production
Version 18.3.0.0.0

==>Scripts to automatically update the RDBMS DST (timezone) version in an 11gR2 or 12c database.
==>(Doc ID 1585343.1)
==>https://support.oracle.com/epmos/faces/DocumentDisplay?id=1585343.1
cd /oracle/software
unzip DBMS_DST_scriptsV1.9.zip
cd /oracle/software/DBMS_DST_scriptsV1.9/
sqlplus / as sysdba @countstatsTSTZ.sql

SQL*Plus: Release 18.0.0.0.0 - Production on Gio Ago 16 00:36:18 2018
Version 18.3.0.0.0

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


Connesso a:
Oracle Database 18c Enterprise Edition Release 18.0.0.0.0 - Production
Version 18.3.0.0.0

.
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
14/05/2017 - SYS.AQ$_ALERT_QT_S.CREATION_TIME - 4
14/05/2017 - SYS.AQ$_ALERT_QT_S.DELETION_TIME - 4
14/05/2017 - SYS.AQ$_ALERT_QT_S.MODIFICATION_TIME - 4
11/05/2017 - SYS.AQ$_AQ$_MEM_MC_S.CREATION_TIME - 3
11/05/2017 - SYS.AQ$_AQ$_MEM_MC_S.DELETION_TIME - 3
11/05/2017 - SYS.AQ$_AQ$_MEM_MC_S.MODIFICATION_TIME - 3
11/05/2017 - SYS.AQ$_AQ_PROP_TABLE_S.CREATION_TIME - 1
11/05/2017 - SYS.AQ$_AQ_PROP_TABLE_S.DELETION_TIME - 1
11/05/2017 - SYS.AQ$_AQ_PROP_TABLE_S.MODIFICATION_TIME - 1
11/05/2017 - SYS.AQ$_ORA$PREPLUGIN_BACKUP_QTB_S.CREATION_TIME - 1
11/05/2017 - SYS.AQ$_ORA$PREPLUGIN_BACKUP_QTB_S.DELETION_TIME - 1
11/05/2017 - SYS.AQ$_ORA$PREPLUGIN_BACKUP_QTB_S.MODIFICATION_TIME - 1
16/08/2018 - SYS.AQ$_PDB_MON_EVENT_QTABLE$_S.CREATION_TIME - 1
16/08/2018 - SYS.AQ$_PDB_MON_EVENT_QTABLE$_S.DELETION_TIME - 1
16/08/2018 - SYS.AQ$_PDB_MON_EVENT_QTABLE$_S.MODIFICATION_TIME - 1
11/05/2017 - SYS.AQ$_SCHEDULER$_EVENT_QTAB_S.CREATION_TIME - 3
11/05/2017 - SYS.AQ$_SCHEDULER$_EVENT_QTAB_S.DELETION_TIME - 3
11/05/2017 - SYS.AQ$_SCHEDULER$_EVENT_QTAB_S.MODIFICATION_TIME - 3
11/05/2017 - SYS.AQ$_SCHEDULER$_REMDB_JOBQTAB_S.CREATION_TIME - 1
11/05/2017 - SYS.AQ$_SCHEDULER$_REMDB_JOBQTAB_S.DELETION_TIME - 1
11/05/2017 - SYS.AQ$_SCHEDULER$_REMDB_JOBQTAB_S.MODIFICATION_TIME - 1
15/05/2017 - SYS.AQ$_SCHEDULER_FILEWATCHER_QT_S.CREATION_TIME - 1
15/05/2017 - SYS.AQ$_SCHEDULER_FILEWATCHER_QT_S.DELETION_TIME - 1
15/05/2017 - SYS.AQ$_SCHEDULER_FILEWATCHER_QT_S.MODIFICATION_TIME - 1
16/08/2018 - SYS.AQ$_SUBSCRIBER_TABLE.CREATION_TIME - 1
16/08/2018 - SYS.AQ$_SUBSCRIBER_TABLE.DELETION_TIME - 1
16/08/2018 - SYS.AQ$_SUBSCRIBER_TABLE.MODIFICATION_TIME - 1
11/05/2017 - SYS.AQ$_SYS$SERVICE_METRICS_TAB_S.CREATION_TIME - 4
11/05/2017 - SYS.AQ$_SYS$SERVICE_METRICS_TAB_S.DELETION_TIME - 4
11/05/2017 - SYS.AQ$_SYS$SERVICE_METRICS_TAB_S.MODIFICATION_TIME - 4
16/08/2018 - SYS.KET$_AUTOTASK_STATUS.ABA_START_TIME - 1
16/08/2018 - SYS.KET$_AUTOTASK_STATUS.ABA_STATE_TIME - 1
16/08/2018 - SYS.KET$_AUTOTASK_STATUS.MW_RECORD_TIME - 1
16/08/2018 - SYS.KET$_AUTOTASK_STATUS.MW_START_TIME - 1
16/08/2018 - SYS.KET$_AUTOTASK_STATUS.RECONCILE_TIME - 1
16/08/2018 - SYS.KET$_CLIENT_CONFIG.FIELD_2 - 7
16/08/2018 - SYS.KET$_CLIENT_CONFIG.LAST_CHANGE - 7
16/08/2018 - SYS.KET$_CLIENT_TASKS.CURR_WIN_START - 3
16/08/2018 - SYS.KET$_CLIENT_TASKS.LG_DATE - 3
16/08/2018 - SYS.KET$_CLIENT_TASKS.LT_DATE - 3
16/08/2018 - SYS.OPTSTAT_HIST_CONTROL$.SPARE6 - 42
16/08/2018 - SYS.OPTSTAT_HIST_CONTROL$.SVAL2 - 42
15/08/2018 - SYS.OPTSTAT_SNAPSHOT$.TIMESTAMP - 1297
15/05/2017 - SYS.OPTSTAT_USER_PREFS$.CHGTIME - 70
15/05/2017 - SYS.RADM_FPTM$.TSWTZ_COL - 1
15/05/2017 - SYS.REG$.NTFN_GROUPING_START_TIME - 2
15/05/2017 - SYS.REG$.REG_TIME - 2
16/08/2018 - SYS.SCHEDULER$_EVENT_LOG.LOG_DATE - 165
15/08/2018 - SYS.SCHEDULER$_GLOBAL_ATTRIBUTE.ATTR_TSTAMP - 11
16/08/2018 - SYS.SCHEDULER$_JOB.END_DATE - 25
16/08/2018 - SYS.SCHEDULER$_JOB.LAST_ENABLED_TIME - 25
16/08/2018 - SYS.SCHEDULER$_JOB.LAST_END_DATE - 25
16/08/2018 - SYS.SCHEDULER$_JOB.LAST_START_DATE - 25
16/08/2018 - SYS.SCHEDULER$_JOB.NEXT_RUN_DATE - 25
16/08/2018 - SYS.SCHEDULER$_JOB.START_DATE - 25
16/08/2018 - SYS.SCHEDULER$_JOB_RUN_DETAILS.LOG_DATE - 80
16/08/2018 - SYS.SCHEDULER$_JOB_RUN_DETAILS.REQ_START_DATE - 80
16/08/2018 - SYS.SCHEDULER$_JOB_RUN_DETAILS.START_DATE - 80
15/05/2017 - SYS.SCHEDULER$_SCHEDULE.END_DATE - 4
15/05/2017 - SYS.SCHEDULER$_SCHEDULE.REFERENCE_DATE - 4
16/08/2018 - SYS.SCHEDULER$_WINDOW.ACTUAL_START_DATE - 9
16/08/2018 - SYS.SCHEDULER$_WINDOW.END_DATE - 9
16/08/2018 - SYS.SCHEDULER$_WINDOW.LAST_START_DATE - 9
16/08/2018 - SYS.SCHEDULER$_WINDOW.MANUAL_OPEN_TIME - 9
16/08/2018 - SYS.SCHEDULER$_WINDOW.NEXT_START_DATE - 9
16/08/2018 - SYS.SCHEDULER$_WINDOW.START_DATE - 9
15/08/2018 - SYS.SCHEDULER$_WINDOW_DETAILS.LOG_DATE - 1
15/08/2018 - SYS.SCHEDULER$_WINDOW_DETAILS.REQ_START_DATE - 1
15/08/2018 - SYS.SCHEDULER$_WINDOW_DETAILS.START_DATE - 1
16/08/2018 - SYS.STATS_TARGET$.END_TIME - 739
16/08/2018 - SYS.STATS_TARGET$.START_TIME - 739
15/05/2017 - SYS.TAB_STATS$.SPARE6 - 1137
16/08/2018 - SYS.WRI$_ALERT_HISTORY.CREATION_TIME - 21
16/08/2018 - SYS.WRI$_ALERT_HISTORY.TIME_SUGGESTED - 21
16/08/2018 - SYS.WRI$_OPTSTAT_HISTGRM_HISTORY.SAVTIME - 58914
16/08/2018 - SYS.WRI$_OPTSTAT_HISTGRM_HISTORY.SPARE6 - 58914
16/08/2018 - SYS.WRI$_OPTSTAT_HISTHEAD_HISTORY.SAVTIME - 11027
16/08/2018 - SYS.WRI$_OPTSTAT_HISTHEAD_HISTORY.SPARE6 - 11027
16/08/2018 - SYS.WRI$_OPTSTAT_IND_HISTORY.SAVTIME - 860
16/08/2018 - SYS.WRI$_OPTSTAT_IND_HISTORY.SPARE6 - 860
16/08/2018 - SYS.WRI$_OPTSTAT_OPR.END_TIME - 21
16/08/2018 - SYS.WRI$_OPTSTAT_OPR.SPARE6 - 21
16/08/2018 - SYS.WRI$_OPTSTAT_OPR.START_TIME - 21
16/08/2018 - SYS.WRI$_OPTSTAT_OPR_TASKS.END_TIME - 1787
16/08/2018 - SYS.WRI$_OPTSTAT_OPR_TASKS.SPARE6 - 1787
16/08/2018 - SYS.WRI$_OPTSTAT_OPR_TASKS.START_TIME - 1787
16/08/2018 - SYS.WRI$_OPTSTAT_TAB_HISTORY.SAVTIME - 783
16/08/2018 - SYS.WRI$_OPTSTAT_TAB_HISTORY.SPARE6 - 783
16/08/2018 - SYS.WRM$_DATABASE_INSTANCE.STARTUP_TIME_TZ - 9
15/08/2018 - SYS.WRM$_SNAPSHOT.BEGIN_INTERVAL_TIME_TZ - 1
15/08/2018 - SYS.WRM$_SNAPSHOT.END_INTERVAL_TIME_TZ - 1
11/05/2017 - SYS.XS$PRIN.END_DATE - 15
11/05/2017 - SYS.XS$PRIN.START_DATE - 15
Total numrow of SYS TSTZ columns is : 153465
There are in total 160 non-SYS TSTZ columns.
.
For non-SYS tables ...
Note: empty tables are not listed.
Stat date  - Owner.Tablename.Columnname - num_rows
07/06/2017 - APEX_050100.WWV_FLOW_DEBUG_MESSAGES.MESSAGE_TIMESTAMP - 12
11/05/2017 - GSMADMIN_INTERNAL.AQ$_CHANGE_LOG_QUEUE_TABLE_S.CREATION_TIME - 1
11/05/2017 - GSMADMIN_INTERNAL.AQ$_CHANGE_LOG_QUEUE_TABLE_S.DELETION_TIME - 1
11/05/2017 - GSMADMIN_INTERNAL.AQ$_CHANGE_LOG_QUEUE_TABLE_S.MODIFICATION_TIME -
1
11/05/2017 - WMSYS.AQ$_WM$EVENT_QUEUE_TABLE_S.CREATION_TIME - 1
11/05/2017 - WMSYS.AQ$_WM$EVENT_QUEUE_TABLE_S.DELETION_TIME - 1
11/05/2017 - WMSYS.AQ$_WM$EVENT_QUEUE_TABLE_S.MODIFICATION_TIME - 1
11/05/2017 - WMSYS.WM$WORKSPACES_TABLE$.CREATETIME - 1
11/05/2017 - WMSYS.WM$WORKSPACES_TABLE$.LAST_CHANGE - 1
Total numrow of non-SYS TSTZ columns is : 20
There are in total 24 non-SYS TSTZ columns.
Total Minutes elapsed : 0
SQL> 
SQL> @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 18.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 DSTv31 .
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> @upg_tzv_apply.sql
INFO: If an ERROR occurs the script will EXIT sqlplus.
INFO: The database RDBMS DST version will be updated to DSTv31 .
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 chiuso.
NOMOUNT del database eseguito.
Istanza ORACLE chiusa.
Istanza ORACLE avviata.

Total System Global Area 1073740616 bytes
Fixed Size		    8665928 bytes
Variable Size		 1006632960 bytes
Database Buffers	   50331648 bytes
Redo Buffers		    8110080 bytes
MOUNT del database eseguito.
Database aperto.
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 chiuso.
NOMOUNT del database eseguito.
Istanza ORACLE chiusa.
Istanza ORACLE avviata.

Total System Global Area 1073740616 bytes
Fixed Size		    8665928 bytes
Variable Size		 1006632960 bytes
Database Buffers	   50331648 bytes
Redo Buffers		    8110080 bytes
MOUNT del database eseguito.
Database aperto.
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: "GSMADMIN_INTERNAL"."AQ$_CHANGE_LOG_QUEUE_TABLE_L"
Number of failures: 0
Table list: "GSMADMIN_INTERNAL"."AQ$_CHANGE_LOG_QUEUE_TABLE_S"
Number of failures: 0
Table list: "APEX_050100"."WWV_FLOW_DEBUG_MESSAGES2"
Number of failures: 0
Table list: "APEX_050100"."WWV_FLOW_FEEDBACK_FOLLOWUP"
Number of failures: 0
Table list: "APEX_050100"."WWV_FLOW_WORKSHEET_NOTIFY"
Number of failures: 0
Table list: "APEX_050100"."WWV_FLOW_FEEDBACK"
Number of failures: 0
Table list: "APEX_050100"."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 DSTv31 .
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> select  version FROM v$timezone_file;

   VERSION
----------
	31

1 riga selezionata.

SQL> 

sqlplus / as sysdba  @/oracle/cfgtoollogs/orcl/preupgrade/postupgrade_fixups.sql

SQL*Plus: Release 18.0.0.0.0 - Production on Gio Ago 16 00:47:31 2018
Version 18.3.0.0.0

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


Connesso a:
Oracle Database 18c Enterprise Edition Release 18.0.0.0.0 - Production
Version 18.3.0.0.0


Modificata sessione.


Procedura PL/SQL completata correttamente.


Procedura PL/SQL completata correttamente.


Procedura PL/SQL completata correttamente.


Package creato.

Nessun errore.

Creato package body.


Procedura PL/SQL completata correttamente.

Nessun errore.





Package creato.

Nessun errore.

Creato package body.

Nessun errore.
Executing Oracle POST-Upgrade Fixup Script

Auto-Generated by:       Oracle Preupgrade Script
                         Version: 18.0.0.0.0 Build: 1
Generated on:            2018-08-15 00:29:22

For Source Database:     ORCL
Source Database Version: 12.2.0.1.0
For Upgrade to Version:  18.0.0.0.0

Preup                             Preupgrade
Action                            Issue Is
Number  Preupgrade Check Name     Remedied    Further DBA Action
------  ------------------------  ----------  --------------------------------
    4.  old_time_zones_exist      YES         None.
    5.  post_dictionary           YES         None.
    6.  post_fixed_objects        NO          Informational only.
                                              Further action is optional.

The fixup scripts have been run and resovled 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.

Procedura PL/SQL completata correttamente.


Modificata sessione.

SQL>

sqlplus / as sysdba @?/rdbms/admin/utlu122s.sql

SQL*Plus: Release 18.0.0.0.0 - Production on Gio Ago 16 00:48:26 2018
Version 18.3.0.0.0

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


Connesso a:
Oracle Database 18c Enterprise Edition Release 18.0.0.0.0 - Production
Version 18.3.0.0.0





Oracle Database Release 18 Post-Upgrade Status Tool    08-16-2018 00:48:2

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

Oracle Server			       UPGRADED      18.3.0.0.0  00:22:51
Oracle Workspace Manager	       UPGRADED      18.3.0.0.0  00:01:11
Oracle Real Application Clusters     OPTION OFF      18.3.0.0.0  00:00:00
Oracle XML Database		       UPGRADED      18.3.0.0.0  00:02:21
Upgrade Datapatch						 00:02:08
Final Actions							 00:02:14
Post Upgrade							 00:00:05
Post Upgrade Datapatch						 00:00:19

Total Upgrade Time: 00:29:22

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

Summary Report File = /oracle/log/upg_summary.log

00:48:26 SQL> 

sqlplus / as sysdba @?/rdbms/admin/catuppst.sql

SQL*Plus: Release 18.0.0.0.0 - Production on Gio Ago 16 00:49:01 2018
Version 18.3.0.0.0

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


Connesso a:
Oracle Database 18c Enterprise Edition Release 18.0.0.0.0 - Production
Version 18.3.0.0.0


Modificata sessione.


Modificata sessione.


Modificata sessione.


Modificato sistema.


Procedura PL/SQL completata correttamente.


Modificata sessione.


TIMESTAMP
--------------------------------------------------------------------------------
COMP_TIMESTAMP DBRESTART	      2018-08-16 00:49:01
DBUA_TIMESTAMP DBRESTART     FINISHED 2018-08-16 00:49:01
DBUA_TIMESTAMP DBRESTART	 NONE 2018-08-16 00:49:01



TIMESTAMP
--------------------------------------------------------------------------------
DBUA_TIMESTAMP CATUPPST       STARTED 2018-08-16 00:49:01


TIMESTAMP
--------------------------------------------------------------------------------
COMP_TIMESTAMP POSTUP_BGN	      2018-08-16 00:49:01
DBUA_TIMESTAMP POSTUP_BGN    FINISHED 2018-08-16 00:49:01
DBUA_TIMESTAMP POSTUP_BGN	 NONE 2018-08-16 00:49:01



TIMESTAMP
--------------------------------------------------------------------------------
COMP_TIMESTAMP CATREQ_BGN	      2018-08-16 00:49:01
DBUA_TIMESTAMP CATREQ_BGN    FINISHED 2018-08-16 00:49:01
DBUA_TIMESTAMP CATREQ_BGN	 NONE 2018-08-16 00:49:01



Procedura PL/SQL completata correttamente.

catrequtlmg: b_StatEvt	   = TRUE
catrequtlmg: b_SelProps    = FALSE
catrequtlmg: b_UpgradeMode = FALSE
catrequtlmg: b_InUtlMig    = FALSE

Procedura PL/SQL completata correttamente.


Procedura PL/SQL completata correttamente.


TIMESTAMP
--------------------------------------------------------------------------------
COMP_TIMESTAMP CATREQ_END	      2018-08-16 00:49:01
DBUA_TIMESTAMP CATREQ_END    FINISHED 2018-08-16 00:49:01
DBUA_TIMESTAMP CATREQ_END	 NONE 2018-08-16 00:49:01


catuppst: Dropping library DBMS_DDL_INTERNAL_LIB

Procedura PL/SQL completata correttamente.

catuppst: Dropping view _CURRENT_EDITION_OBJ_MIG

Procedura PL/SQL completata correttamente.

catuppst: Dropping view _ACTUAL_EDITION_OBJ_MIG

Procedura PL/SQL completata correttamente.

catuppst: Dropping view DBA_PART_KEY_COLUMNS_V$_MIG

Procedura PL/SQL completata correttamente.

catuppst: Dropping view DBA_SUBPART_KEY_COLUMNS_V$_MIG

Procedura PL/SQL completata correttamente.

catuppst: Dropping table OBJ$MIG
catuppst: Dropping table USER$MIG
catuppst: Dropping table COL$MIG
catuppst: Dropping table CLU$MIG
catuppst: Dropping table CON$MIG
catuppst: Dropping table BOOTSTRAP$MIG
catuppst: Dropping table TAB$MIG
catuppst: Dropping table TS$MIG
catuppst: Dropping table IND$MIG
catuppst: Dropping table ICOL$MIG
catuppst: Dropping table LOB$MIG
catuppst: Dropping table COLTYPE$MIG
catuppst: Dropping table SUBCOLTYPE$MIG
catuppst: Dropping table NTAB$MIG
catuppst: Dropping table REFCON$MIG
catuppst: Dropping table OPQTYPE$MIG
catuppst: Dropping table ICOLDEP$MIG
catuppst: Dropping table VIEWTRCOL$MIG
catuppst: Dropping table ATTRCOL$MIG
catuppst: Dropping table TYPE_MISC$MIG
catuppst: Dropping table LIBRARY$MIG
catuppst: Dropping table ASSEMBLY$MIG
catuppst: Dropping table TSQ$MIG
catuppst: Dropping table FET$MIG

Procedura PL/SQL completata correttamente.


Procedura PL/SQL completata correttamente.


Modificata sessione.


Procedura PL/SQL completata correttamente.


Modificata sessione.


Procedura PL/SQL completata correttamente.


Procedura PL/SQL completata correttamente.






Procedura PL/SQL completata correttamente.


TIMESTAMP
--------------------------------------------------------------------------------
COMP_TIMESTAMP POSTUP_END	      2018-08-16 00:49:07
DBUA_TIMESTAMP POSTUP_END    FINISHED 2018-08-16 00:49:07
DBUA_TIMESTAMP POSTUP_END	 NONE 2018-08-16 00:49:07



TIMESTAMP
--------------------------------------------------------------------------------
COMP_TIMESTAMP CATUPPST 	      2018-08-16 00:49:07
DBUA_TIMESTAMP CATUPPST      FINISHED 2018-08-16 00:49:07
DBUA_TIMESTAMP CATUPPST 	 NONE 2018-08-16 00:49:07



Modificata sessione.

SQL> exit
Disconnesso da Oracle Database 18c Enterprise Edition Release 18.0.0.0.0 - Production
Version 18.3.0.0.0


#STEP9: Finalize upgrade

sqlplus / as sysdba @?/rdbms/admin/utlrp.sql

SQL*Plus: Release 18.0.0.0.0 - Production on Gio Ago 16 00:49:48 2018
Version 18.3.0.0.0

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


Connesso a:
Oracle Database 18c Enterprise Edition Release 18.0.0.0.0 - Production
Version 18.3.0.0.0


Modificata sessione.


TIMESTAMP
--------------------------------------------------------------------------------
COMP_TIMESTAMP UTLRP_BGN	      2018-08-16 00:49:48

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>#

Procedura PL/SQL completata correttamente.


TIMESTAMP
--------------------------------------------------------------------------------
COMP_TIMESTAMP UTLRP_END	      2018-08-16 00:57:39

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
-------------------
		 28

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


Funzione creata.


Procedura PL/SQL completata correttamente.


Funzione eliminata.


Procedura PL/SQL completata correttamente.

SQL> exit


sqlplus / as sysdba

SQL*Plus: Release 18.0.0.0.0 - Production on Gio Ago 16 00:25:34 2018
Version 18.3.0.0.0

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


Connesso a:
Oracle Database 18c Enterprise Edition Release 18.0.0.0.0 - Production
Version 18.3.0.0.0

SQL> show parameter compatible

NAME				     TYPE	 VALUE
------------------------------------ ----------- ------------------------------
compatible			     string	 12.2.0
noncdb_compatible		     boolean	 FALSE
SQL> ALTER SYSTEM SET COMPATIBLE = '18.0.0' SCOPE=SPFILE;

Modificato sistema.

SQL> select count(*) from dba_objects where status='INVALID';

  COUNT(*)
----------
	     0

SQL> shutdown immediate

sqlplus / as sysdba 

SQL*Plus: Release 18.0.0.0.0 - Production on Gio Ago 16 01:05:35 2018
Version 18.3.0.0.0

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


Connesso a:
Oracle Database 18c Enterprise Edition Release 18.0.0.0.0 - Production
Version 18.3.0.0.0

SQL> shutdown immediate
Database chiuso.
NOMOUNT del database eseguito.
Istanza ORACLE chiusa.
SQL> startup
Istanza ORACLE avviata.

Total System Global Area 1073740616 bytes
Fixed Size		    8665928 bytes
Variable Size		 1006632960 bytes
Database Buffers	   50331648 bytes
Redo Buffers		    8110080 bytes
MOUNT del database eseguito.
Database aperto.
SQL> exit

 
#STEP10: Uninstall old release

cd /oracle/product/12.2/deinstall/
./deinstall
 

UPGRADE DONE!

Leave a Comment