Oracle 19c Autoupgrade Utility (Part 2)
- Posted by Gavin Soorma
- On June 13, 2019
- 0 Comments
In AutoUpgrade 19c Part 1, we executed Autoupgrade in ANALYZE mode which performed a read-only check of the database and returned a report which highlighted any warnings or potential errors which might occur in the database upgrade as well as provided some recommendations.
When AutoUpgrade is executed in FIXUP mode, it performs the checks that it also performs while in Analyze mode and after completing these checks, AutoUpgrade then performs all automated fixup tasks that are required to fix the earlier release source database before before the upgrade is commenced.
Note that AutoUpgrade does not create a restore point while running in Fixup mode (this is only done in the Upgrade mode) – so it is recommended to take a backup or create a manual GRP before running Autoupgrade in fixup mode.
In the prechecks folder there will be SID_checklist.cfg file which will contain the prechecks which will be performed and for which precheck a corresponding fixup exists.
dbname] [DB1] ========================================== [container] [DB1] ========================================== [checkname] DICTIONARY_STATS [stage] PRECHECKS [fixup_available] YES [runfix] YES [severity] RECOMMEND ---------------------------------------------------- [checkname] POST_DICTIONARY [stage] POSTCHECKS [fixup_available] YES [runfix] YES [severity] RECOMMEND ---------------------------------------------------- [checkname] POST_FIXED_OBJECTS [stage] POSTCHECKS [fixup_available] YES [runfix] YES [severity] RECOMMEND ---------------------------------------------------- [checkname] PRE_FIXED_OBJECTS [stage] PRECHECKS [fixup_available] YES [runfix] YES [severity] RECOMMEND ---------------------------------------------------- [checkname] OLD_TIME_ZONES_EXIST [stage] POSTCHECKS [fixup_available] YES [runfix] YES [severity] WARNING ---------------------------------------------------- [checkname] PARAMETER_MIN_VAL [stage] PRECHECKS [fixup_available] YES [runfix] YES [severity] WARNING ---------------------------------------------------- [checkname] MANDATORY_UPGRADE_CHANGES [stage] PRECHECKS [fixup_available] YES [runfix] YES [severity] INFO ---------------------------------------------------- [checkname] RMAN_RECOVERY_VERSION [stage] PRECHECKS [fixup_available] NO [runfix] N/A [severity] INFO ---------------------------------------------------- [checkname] TABLESPACES_INFO [stage] PRECHECKS [fixup_available] NO [runfix] N/A [severity] INFO ----------------------------------------------------
Execute Autoupgrade in FIXUP mode
[oracle@host02 bin]$ $ORACLE_HOME/jdk/bin/java -jar /home/oracle/autoupgrade.jar -config /tmp/config.txt -mode fixups Autoupgrade tool launched with default options +--------------------------------+ | Starting AutoUpgrade execution | +--------------------------------+ 2 databases will be processed Type 'help' to list console commands upg> lsj +----+-------+---------+---------+--------+--------------+--------+--------+---------------+ |Job#|DB_NAME| STAGE|OPERATION| STATUS| START_TIME|END_TIME| UPDATED| MESSAGE| +----+-------+---------+---------+--------+--------------+--------+--------+---------------+ | 106| DB1|PRECHECKS|PREPARING| RUNNING|19/06/10 18:37| N/A|18:37:07|Loading DB info| | 107| DB2| SETUP|PREPARING|FINISHED|19/06/10 18:37| N/A|18:37:06| Scheduled| +----+-------+---------+---------+--------+--------------+--------+--------+---------------+ Total jobs 2 upg> status ---------------- Config ------------------- User configuration file [/tmp/config.txt] General logs location [/u02/app/oracle/autoupgrade # Top level logging directory (Required)/cfgtoollogs/upgrade/auto] Mode [FIXUPS] DB upg fatal errors ORA-00600,ORA-07445 DB Post upgrade abort time [60] minutes DB upg abort time [1440] minutes DB restore abort time [120] minutes DB drop GRP abort time [3] minutes ------------------------ Jobs ------------------------ Total databases in configuration file [2] Total Non-CDB being processed [2] Total CDB being processed [0] Jobs finished successfully [0] Jobs finished/aborted [0] jobs in progress [2] ------------ Resources ---------------- Threads in use [19] JVM used memory [26] MB CPU in use [13%] Processes in use [19] upg> tasks +---+--------------+-------------+ | ID| NAME| Job#| +---+--------------+-------------+ | 1| main| WAITING| | 30| jobs_mon| WAITING| | 31| console| RUNNABLE| | 32| queue_reader| WAITING| | 33| cmd-0| WAITING| | 44| job_manager-0| WAITING| | 47| event_loop|TIMED_WAITING| | 48| bqueue-106| WAITING| | 49| checks-106| WAITING| | 50|rep_checks-106|TIMED_WAITING| |104| db1-puic-0| WAITING| |105| db1-puic-1| WAITING| |169| quickSQL| RUNNABLE| |171| quickSQL| RUNNABLE| +---+--------------+-------------+ upg> lsj +----+-------+---------+---------+--------+--------------+--------+--------+---------+ |Job#|DB_NAME| STAGE|OPERATION| STATUS| START_TIME|END_TIME| UPDATED| MESSAGE| +----+-------+---------+---------+--------+--------------+--------+--------+---------+ | 106| DB1|PREFIXUPS|EXECUTING| RUNNING|19/06/10 18:37| N/A|18:37:34| | | 107| DB2| SETUP|PREPARING|FINISHED|19/06/10 18:37| N/A|18:37:06|Scheduled| +----+-------+---------+---------+--------+--------------+--------+--------+---------+ Total jobs 2 upg> lsj +----+-------+---------+---------+--------+--------------+--------+--------+-------------+ |Job#|DB_NAME| STAGE|OPERATION| STATUS| START_TIME|END_TIME| UPDATED| MESSAGE| +----+-------+---------+---------+--------+--------------+--------+--------+-------------+ | 106| DB1|PREFIXUPS|EXECUTING| RUNNING|19/06/10 18:37| N/A|18:37:42|Remaining 5/5| | 107| DB2| SETUP|PREPARING|FINISHED|19/06/10 18:37| N/A|18:37:06| Scheduled| +----+-------+---------+---------+--------+--------------+--------+--------+-------------+ Total jobs 2 upg> lsj +----+-------+---------+---------+--------+--------------+--------+--------+-------------+ |Job#|DB_NAME| STAGE|OPERATION| STATUS| START_TIME|END_TIME| UPDATED| MESSAGE| +----+-------+---------+---------+--------+--------------+--------+--------+-------------+ | 106| DB1|PREFIXUPS|EXECUTING| RUNNING|19/06/10 18:37| N/A|18:37:42|Remaining 5/5| | 107| DB2| SETUP|PREPARING|FINISHED|19/06/10 18:37| N/A|18:37:06| Scheduled| +----+-------+---------+---------+--------+--------------+--------+--------+-------------+ Total jobs 2 upg> Job 106 completed Job 107 completed ------------------- Final Summary -------------------- Number of databases [ 2 ] Jobs finished successfully [2] Jobs failed [0] Jobs pending [0] ------------- JOBS FINISHED SUCCESSFULLY ------------- Job 106 FOR DB1 Job 107 FOR DB2 [oracle@host02 bin]$
If we query the LAST_ANALYZED column we can see that the data dictionary statistics are current and have been gathered by the Autoupgrade fixup jobs which got executed.
SQL> select max(last_analyzed) from dba_tables where owner='SYS' 2 and table_name='ACCESS$'; MAX(LAST_ --------- 10-JUN-19 SQL> prompt 'Statistics for Fixed Objects' select NVL(TO_CHAR(last_analyzed, 'YYYY-Mon-DD'), 'NO STATS') last_analyzed, COUNT(*) fixed_objects FROM dba_tab_statistics WHERE object_type = 'FIXED TABLE' GROUP BY TO_CHAR(last_analyzed, 'YYYY-Mon-DD') ORDER BY 1 DESC; SQL> 'Statistics for Fixed Objects' LAST_ANALYZED FIXED_OBJECTS ------------- ------------- NO STATS 152 2019-Jun-10 1137
0 Comments