This is the first of a series of blog post explaining the new AutoUpgrade utility step-by-step. You’ll find the tool and overview information in The New AutoUpgrade Utility in Oracle 19c
In this blog post here I will explain and demonstrate how you can create a sample config file and adjust it for a standard database upgrade.
You will see how to add additional options and change default settings. Furthermore, I will showcase how to change, adjust and tweak init.ora parameters during or after upgrade in the upcoming blog posts.
AutoUpgrade – Step-by-step
- The new AutoUpgrade Utility – Download, documentation and supported versions
- Create and adjust the config file for AutoUpgrade
- Config file for AutoUpgrade – Advanced options
- Config file for AutoUpgrade – Tweaking init parameters
- AutoUpgrade: ANALYZE, FIXUPS, UPGRADE and DEPLOY modes
- AutoUpgrade: Where do you find all the logfiles?
- UPG: The AutoUpgrade Command Line Interface
- Upgrading Multitenant databases with AutoUpgrade
- Moving to a new server with AutoUpgrade
- How to tweak the hidden settings in AutoUpgrade
- AutoUpgrade and Data Guard, RAC, Restart and non-CDB to PDB
- AutoUpgrade and Wallets
Create and adjust the config file for AutoUpgrade
When you start working with the AutoUpgrade utility, the only manual task at the moment for you is the creation and adjustment of the config file. At the moment, the config file is just a sample file.
$ java -jar $OH19/rdbms/admin/autoupgrade.jar -create_sample_file config Created sample configuration file /home/oracle/sample_config.cfg
The sample file contains 3 examples. In my example I just use the first example and adjust it based on my needs.
#Global configurations #Autoupgrade's global directory, non-job logs generated, #temp files created and other autoupgrade files will be #send here global.autoupg_log_dir=/default/current/location # # Database number 1 # upg1.dbname=employee upg1.start_time=NOW upg1.source_home=/u01/app/oracle/product/11.2.0/dbhome_1 upg1.target_home=/u01/app/oracle/product/19.1.0/dbhome_1 upg1.sid=emp upg1.log_dir=/scratch/auto upg1.upgrade_node=node1 upg1.target_version=19.1 #upg1.run_utlrp=yes #upg1.timezone_upg=yes
You can put as many databases into the config file as necessary. There is no limitation. And you can upgrade to different target homes and from different source homes as well.
Modifying the sample_config.cfg
First of all, the name of the config file is something you can choose by yourself. You don’t have to stay with the name the tool uses.
Second, there are two types of parameters:
- individual – in the sample file those are
upg3. But you can name it whatever you want.
You need to adjust the
global.autoupg_log_dir, This is the global logging directory. And I usually use this as my root logging directory.
In the next step I adjust the settings for the database upg1, which in my case will be an 18.104.22.168 database from the Hands-On Lab named
# # Database number 1 # upg1.dbname=UPGR upg1.start_time=NOW upg1.source_home=/u01/app/oracle/product/22.214.171.124 upg1.target_home=/u01/app/oracle/product/19 upg1.sid=UPGR upg1.log_dir=/home/oracle/logs/upgr upg1.upgrade_node=hol upg1.target_version=19
In this example, I set the
target_home individually. But you can also make this a
global parameter if you upgrade all databases to the same home:
Then of course you can remove it from the individual section.
You can do the same task with the
upgrade_node parameter,. It is meant for cases where you define a comprehensive config file for all your databases but differ now between nodes. For example, having two databases with two different
upgrade_node values will execute each section only in the case where
upgrade_node matches the hostname:
upg1.upgrade_node=hol ... upg2.upgrade_node=boston
In this case, database
upg1 will be upgraded only when
upgrade_node matches the hostname. And of course, the same applies to
upg2. In my case all my databases will be upgraded on the same host. But I can’t make this a
global parameter – it is meant to be a local or individual parameter only. It has to stay in each section.
And finally, as I will upgrade all my databases to Oracle 19c, the
target_version can be switched into a
global parameter as well.
dbname and SID
While I’m writing this the documentation is incorrect about the definition of
dbname. We’ll fix this soon. In between, please be aware that
dbname must match your
SID of course must match your database’s SID. If you are in doubt, open SQL*Plus and check with “
show parameter db_unique_name” or open your
/etc/oratab file instead.
upg1.dbname=UPGR ... upg1.sid=UPGR
Current status with only one database
When we look at the current status, my config file looks like this:
global.autoupg_log_dir=/home/oracle/logs global.target_home=/u01/app/oracle/product/19 global.target_version=19 # # Database number 1 # upg1.dbname=UPGR upg1.start_time=NOW upg1.source_home=/u01/app/oracle/product/126.96.36.199 upg1.sid=UPGR upg1.log_dir=/home/oracle/logs/upgr upg1.upgrade_node=hol.localdomain
Adding additional databases
Now I’m adding two additional databases –
FTEX, another Oracle 188.8.131.52 database, and
DB12, an 184.108.40.206 database.
global.autoupg_log_dir=/home/oracle/logs global.target_home=/u01/app/oracle/product/19 global.target_version=19 # # Database number 1 # upg1.dbname=UPGR upg1.start_time=NOW upg1.source_home=/u01/app/oracle/product/220.127.116.11 upg1.sid=UPGR upg1.log_dir=/home/oracle/logs/upgr upg1.upgrade_node=hol.localdomain # # Database number 2 # upg2.dbname=FTEX upg2.start_time=NOW upg2.source_home=/u01/app/oracle/product/18.104.22.168 upg2.sid=FTEX upg2.log_dir=/home/oracle/logs/ftex upg2.upgrade_node=hol.localdomain # # Database number 3 # upg3.dbname=DB12 upg3.start_time=NOW upg3.source_home=/u01/app/oracle/product/22.214.171.124 upg3.sid=DB12 upg3.log_dir=/home/oracle/logs/db12 upg3.upgrade_node=hol.localdomain
During the next step, we will add optional parameters and adjust the starting time for each upgrade.