Step by Step Upgrading Database using Autoupgrade utility
<<Back to DB Administration Main Page
Step1: create config file
java -jar autoupgrade.jar -create_sample_file config /oracle/ORCL/ORCL_autoupgrade.cfg
Step2: Adjust the config file parameters
global.autoupg_log_dir=/ora_app/cfgtoollogs/autoupgrade
upg1.log_dir=/ora_app/cfgtoollogs/autoupgrade/ORCL
upg1.sid=ORCL
upg1.source_home=/ora_app/product/12.1.0.2/home12
upg1.target_home=/ora_app/product/19c/home19
upg1.start_time=NOW
upg1.upgrade_node=host1.merckgroup.com
upg1.run_utlrp=yes
upg1.timezone_upg=yes
step3: Run PreCheck
java -jar autoupgrade.jar -config /ora_work/ORCL/ORCL_autoupgrade.cfg -mode analyze
AutoUpgrade 24.6.240905 launched with default internal options
Processing config file ...
+--------------------------------+
| Starting AutoUpgrade execution |
+--------------------------------+
1 Non-CDB(s) will be analyzed
Type 'help' to list console commands
upg> Job 100 completed
------------------- Final Summary --------------------
Number of databases [ 1 ]
Jobs finished [1]
Jobs failed [0]
Please check the summary report at:
/ora_app/cfgtoollogs/autoupgrade/cfgtoollogs/upgrade/auto/status/status.html
/ora_app/cfgtoollogs/autoupgrade/cfgtoollogs/upgrade/auto/status/status.log
Step4:Perform Fixups if required
java -jar autoupgrade.jar -config /ora_work/ORCL/ORCL_autoupgrade.cfg -mode fixups
AutoUpgrade 24.6.240905 launched with default internal options
Processing config file ...
+--------------------------------+
| Starting AutoUpgrade execution |
+--------------------------------+
1 Non-CDB(s) will be processed
Type 'help' to list console commands
upg>
upg> Job 101 completed
------------------- Final Summary --------------------
Number of databases [ 1 ]
Jobs finished [1]
Jobs failed [0]
Please check the summary report at:
/ora_app/cfgtoollogs/autoupgrade/cfgtoollogs/upgrade/auto/status/status.html
/ora_app/cfgtoollogs/autoupgrade/cfgtoollogs/upgrade/auto/status/status.log
Step5:Check Status
upg> lsj
+----+-------+---------+---------+-------+----------+--------+-------+
|Job#|DB_NAME| STAGE|OPERATION| STATUS|START_TIME| UPDATED|MESSAGE|
+----+-------+---------+---------+-------+----------+--------+-------+
| 101|ORCL|PREFIXUPS|EXECUTING|RUNNING| 10:53:22|100s ago| |
+----+-------+---------+---------+-------+----------+--------+-------+
Total jobs 1
Step5:Perform Upgrade
java -jar autoupgrade.jar -config /ora_work/ORCL/ORCL_autoupgrade.cfg -mode deploy
AutoUpgrade 24.6.240905 launched with default internal options
Processing config file ...
+--------------------------------+
| Starting AutoUpgrade execution |
+--------------------------------+
1 Non-CDB(s) will be processed
Type 'help' to list console commands
upg>
upg> help
exit // To close and exit
help // Displays help
lsj [<option>] [-a <number>] // list jobs by status up to n elements.
-f Filter by finished jobs.
-r Filter by running jobs.
-e Filter by jobs with errors.
-p Filter by jobs being prepared.
-n <number> Display up to n jobs.
-a <number> Repeats the command (in <number> seconds).
lsr // Displays the restoration queue
lsa // Displays the stop queue
tasks // Displays the tasks running
clear // Clears the terminal
resume -job <number> [-ignore_errors=<ORA-#####,ORA-#####>] // Restarts a job with option to ignore errors
status [<option>] [-a <number>] // Summary of current execution
-config Show Config Information
-job <number> Summary of a given job
-job <number> -c <dbname> Show details of container
-a [<number>] Repeats the command (in <number> seconds).
restore -job <number> // Restores the database to its state prior to the upgrade
restore all_failed // Restores all failed jobs to their previous states prior to the upgrade
logs // Displays all the log locations
stop -job <number> // Stops the specified job
h[ist] // Displays the command line history
/[<number>] // Executes the command specified from the history. The default is the last command
meta // Displays Internal latch count
hwinfo // Displays additional information
fxlist -job <number> [<option>] // FixUps summary
-c <dbname> Container specific FixUps
-c <dbname> alter <check> run <yes|no|skip> Update Run Configuration
upg> status
Config
User configuration file [/ora_work/ORCL/ORCL_autoupgrade.cfg]
General logs location [/ora_app/cfgtoollogs/autoupgrade/cfgtoollogs/upgrade/auto]
Mode [DEPLOY]
Jobs Summary
Total databases in configuration file [1]
Total Non-CDB being processed [1]
Total Containers being processed [0]
Jobs finished successfully [0]
Jobs finished/stopped [0]
Jobs in progress [1]
Progress
+---+---------------------------------------------------------+
|Job| Progress|
+---+---------------------------------------------------------+
|102|[|||||||||||||||||||| ] 38 %|
+---+---------------------------------------------------------+
upg> lsj
+----+-------+---------+---------+-------+----------+-------+-----------+
|Job#|DB_NAME| STAGE|OPERATION| STATUS|START_TIME|UPDATED| MESSAGE|
+----+-------+---------+---------+-------+----------+-------+-----------+
| 102|ORCL|DBUPGRADE|EXECUTING|RUNNING| 16:01:11|55s ago|0%Upgraded |
+----+-------+---------+---------+-------+----------+-------+-----------+
Total jobs 1
upg> tasks
+---+----------------------+-------------+
| ID| NAME| Job#|
+---+----------------------+-------------+
| 1| main| WAITING|
| 16| Attach API wait loop| RUNNABLE|
| 54| event_loop|TIMED_WAITING|
| 55| console| RUNNABLE|
| 56| queue_reader| WAITING|
| 58| cmd-0| WAITING|
| 59| StatUpg| WAITING|
| 60| event_loop|TIMED_WAITING|
| 61| ClassCache Reaper| WAITING|
| 62| job_manager-0| WAITING|
| 67| exec_loop| WAITING|
| 68| exec_loop| WAITING|
|437| monitor_ORCL_102|TIMED_WAITING|
|441| catctl_ORCL| WAITING|
|442| abort_monitor_ORCL|TIMED_WAITING|
|443| Thread-25| RUNNABLE|
+---+----------------------+-------------+
upg> logs
AutoUpgrade logs folder [/ora_app/cfgtoollogs/autoupgrade/cfgtoollogs/upgrade/auto]
logs folder [ORCL][/ora_app/cfgtoollogs/autoupgrade/ORCL/ORCL]
upg> hwinfo
AutoUpgrade up time:5 min
System time: 2024-09-25 16:06:10
Hostname: host1.merckgroup.com
HW CPU Cores: 2
upg> status
Config
User configuration file [/ora_work/ORCL/ORCL_autoupgrade.cfg]
General logs location [/ora_app/cfgtoollogs/autoupgrade/cfgtoollogs/upgrade/auto]
Mode [DEPLOY]
Jobs Summary
Total databases in configuration file [1]
Total Non-CDB being processed [1]
Total Containers being processed [0]
Jobs finished successfully [0]
Jobs finished/stopped [0]
Jobs in progress [1]
Progress
+---+---------------------------------------------------------+
|Job| Progress|
+---+---------------------------------------------------------+
|102|[|||||||||||||||||||||||| ] 46 %|
+---+---------------------------------------------------------+
upg> tasks
+---+----------------------+-------------+
| ID| NAME| Job#|
+---+----------------------+-------------+
| 1| main| WAITING|
| 16| Attach API wait loop| RUNNABLE|
| 54| event_loop|TIMED_WAITING|
| 55| console| RUNNABLE|
| 56| queue_reader| WAITING|
| 58| cmd-0| WAITING|
| 59| StatUpg| WAITING|
| 60| event_loop|TIMED_WAITING|
| 61| ClassCache Reaper| WAITING|
| 62| job_manager-0| WAITING|
| 67| exec_loop| WAITING|
| 68| exec_loop| WAITING|
|437| monitor_ORCL_102|TIMED_WAITING|
|441| catctl_ORCL| WAITING|
|442| abort_monitor_ORCL|TIMED_WAITING|
|443| Thread-25| RUNNABLE|
+---+----------------------+-------------+
upg>
upg> status
Config
User configuration file [/ora_work/ORCL/ORCL_autoupgrade.cfg]
General logs location [/ora_app/cfgtoollogs/autoupgrade/cfgtoollogs/upgrade/auto]
Mode [DEPLOY]
Jobs Summary
Total databases in configuration file [1]
Total Non-CDB being processed [1]
Total Containers being processed [0]
Jobs finished successfully [0]
Jobs finished/stopped [0]
Jobs in progress [1]
Progress
+---+---------------------------------------------------------+
|Job| Progress|
+---+---------------------------------------------------------+
|102|[|||||||||||||||||||||||| ] 46 %|
+---+---------------------------------------------------------+
upg> Job 102 completed
------------------- Final Summary --------------------
Number of databases [ 1 ]
Jobs finished [1]
Jobs failed [0]
Jobs restored [0]
Jobs pending [0]
---- Drop GRP at your convenience once you consider it is no longer needed ----
Drop GRP from ORCL: drop restore point AUTOUPGRADE_9212_ORCL121020
AutoUpgrade with Source and Target Database Homes on Different Servers
-->On the target server, start up the database in upgrade mode, and then run AutoUpgrade in upgrade mode
java -jar autoupgrade.jar -config config.txt -mode upgrade
Comments
Post a Comment