Things to Know
You can upgrade to Oracle AI Database 26ai if your database runs 19c or 21c.
- If you have an older like 11g or 12c database , you must first upgrade to 19c and then upgrade again to 26ai.
- If you are on 23ai, you can just patch the database; no upgrade needed, no need to re-certify your app.
- Oracle AI Database 26ai supports the multitenant architecture only. If your database is a non-CDB, you must also convert it to a pluggable database as part of the upgrade.
- Oracle AI Database 26ai is the next long-term support release. It means you can stay current with patches for many years. Premier Support ends in December 2031.
In Oracle AI Database 26ai, AutoUpgrade is the only recommended tool for upgrading your database. Oracle desupported the Database Upgrade Assistant (DBUA).
Prerequisites
Make sure you have all the OS prerequisites in place by running the 26ai preinstall package. On Oracle Linux you can do this by installing the preinstall package. It probably makes sense to update the remaining packages also.
# root user
# dnf install -y oracle-ai-database-preinstall-26ai
# yum update -y
Install 26ai Software
The following commands will perform a silent installation of the 26ai software.
# oracle user
$mkdir -p /oracle/product/26.0.0/dbhome_1
$mkdir -p /oracle/oraInventory
$export ORACLE_BASE=/oracle
$export ORACLE_HOME=$ORACLE_BASE/product/26.0.0/dbhome_1
$export ORA_INVENTORY=/oracle/oraInventory
$cd $ORACLE_HOME
$unzip -oq $ORACLE_HOME/LINUX.X64_2326100_db_home.zip
$./runInstaller -ignorePrereq -waitforcompletion -silent \
-responseFile ${ORACLE_HOME}/install/response/db_install.rsp \
installOption=INSTALL_DB_SWONLY \
UNIX_GROUP_NAME=oinstall \
INVENTORY_LOCATION=${ORA_INVENTORY} \
ORACLE_HOME=${ORACLE_HOME} \
ORACLE_BASE=${ORACLE_BASE} \
installEdition=EE \
OSDBA=dba \
OSBACKUPDBA=dba \
OSDGDBA=dba \
OSKMDBA=dba \
OSRACDBA=dba
OR
[oracle@Linux8 dbhome_1]$ ./runInstaller--------GUI Base Installation
Run the root scripts when prompted.
As a root user, execute the following script(s):
1. /oracle/product/26.0.0/dbhome_1/root.sh
At this point you should also patch the new Oracle home if required. In my case patch not required on new 26ai home.
Download the latest "autoupgrade.jar" file from this link.
Create a Directory for AutoUpgrade
[oracle@Linux8 dbhome_1]$ java -version
openjdk version "1.8.0_492"
OpenJDK Runtime Environment (build 1.8.0_492-b09)
OpenJDK 64-Bit Server VM (build 25.492-b09, mixed mode)
[oracle@Linux8 dbhome_1]$ mkdir -p /oracle/autoupgrade/logs
[oracle@Linux8 dbhome_1]$ mkdir -p /oracle/autoupgrade/orcl
[oracle@Linux8 dbhome_1]$ mkdir -p /oracle/autoupgrade/config
[oracle@Linux8 dbhome_1]$ cd /oracle/autoupgrade
[oracle@Linux8 autoupgrade]$ ll
total 7020
-rw-r--r-- 1 oracle oinstall 7174061 Jul 27 02:33 autoupgrade.jar
drwxr-xr-x 2 oracle oinstall 4096 Jul 27 06:40 config
drwxr-xr-x 2 oracle oinstall 4096 Jul 27 06:36 logs
drwxr-xr-x 2 oracle oinstall 4096 Jul 27 06:37 orcl
Create the AutoUpgrade Configuration File
$ cat /oracle/autoupgrade/config/config.cfg
#Config file content
upg1.sid=orcl
upg1.source_home=/oracle/product/19.3.0/dbhome_1
upg1.target_home=/oracle/product/26.0.0/dbhome_1
upg1.target_version=26
upg1.log_dir=/u01/app/oracle/autoupgrade/orcl
upg1.timezone_upg=yes
upg1.run_utlrp=yes
Run AutoUpgrade Analyze Mode
Set 26ai environment:
export ORACLE_HOME=/oracle/product/26.0.0/dbhome_1
export PATH=$ORACLE_HOME/bin:$PATH
Run in analyze mode:
$ /oracle/product/26.0.0/dbhome_1/jdk/bin/java -jar /oracle/autoupgrade/autoupgrade.jar -config /oracle/autoupgrade/config/config.cfg -mode analyze
This step checks:
~Database compatibility
~ Invalid objects
~ Tablespace issues
~ Time zone issues
~ Parameter problems
~ Component compatibility
Screens of Analyze mode run:
$ORACLE_BASE/product/26.0.0/dbhome_1/jdk/bin/java \ -jar $ORACLE_BASE/autoupgrade/autoupgrade.jar \ -config $ORACLE_BASE/autoupgrade/config/config.cfg -mode analyze
AutoUpgrade 26.2.260205 launched with default internal options Processing config file ... +--------------------------------+ | Starting AutoUpgrade execution | +--------------------------------+ 1 CDB(s) plus 2 PDB(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: /oracle/autoupgrade/logs/cfgtoollogs/upgrade/auto/status/status.html /oracle/autoupgrade/logs/cfgtoollogs/upgrade/auto/status/status.log
Once complete, let’s review status.html again. It should all clean and good to go with upgrade.
Run AutoUpgrade Fixups (Optional)
$ORACLE_BASE/product/26.0.0/dbhome_1/jdk/bin/java \ -jar $ORACLE_BASE/autoupgrade/autoupgrade.jar \
-config $ORACLE_BASE/autoupgrade/config.cfg -mode fixups
AutoUpgrade 26.2.260205 launched with default internal options Processing config file ... +--------------------------------+ | Starting AutoUpgrade execution | +--------------------------------+ 1 CDB(s) plus 2 PDB(s) will be processed Type 'help' to list console commands upg> Job 101 completed ------------------- Final Summary -------------------- Number of databases [ 1 ] Jobs finished [1] Jobs failed [0] Please check the summary report at: /oracle/autoupgrade/logs/cfgtoollogs/upgrade/auto/status/status.html /oracle/autoupgrade/logs/cfgtoollogs/upgrade/auto/status/status.log
Once complete, let’s review status.html again. It should all clean and good to go with upgrade.
Run AutoUpgrade Deploy
We are now ready to run the database upgrade with the following command. The upgrade takes some time, so you will be left at the "upg" prompt until it's complete.
$ORACLE_BASE/product/26.0.0/dbhome_1/jdk/bin/java \ -jar $ORACLE_BASE/autoupgrade/autoupgrade.jar \
-config $ORACLE_BASE/autoupgrade/config.cfg -mode deploy
AutoUpgrade 26.2.260205 launched with default internal options Processing config file ... +--------------------------------+ | Starting AutoUpgrade execution | +--------------------------------+ 1 CDB(s) plus 2 PDB(s) will be processed Type 'help' to list console commands upg>
Use the "help" command to see the command line options. We can list the current jobs and check on the job status using the following commands.
upg> lsj +----+-------+---------+---------+-------+----------+-------+-------+ |Job#|DB_NAME| STAGE|OPERATION| STATUS|START_TIME|UPDATED|MESSAGE| +----+-------+---------+---------+-------+----------+-------+-------+ | 102| orcl|DBUPGRADE|EXECUTING|RUNNING| 05:11:48| 3s ago|Running| +----+-------+---------+---------+-------+----------+-------+-------+ Total jobs 1 upg> status -job 102 Details Job No 102 Oracle SID orcl Start Time 26/07/28 05:11:48 Elapsed (min): 0 End time: N/A Logfiles Logs Base: /oracle/autoupgrade/orcl/orcl Job logs: /oracle/autoupgrade/orcl/orcl/102 Stage logs: /oracle/autoupgrade/orcl/orcl/102/prechecks TimeZone: /oracle/autoupgrade/orcl/orcl/temp Remote Dirs: Stages SETUP <1 min GRP <1 min PREUPGRADE <1 min PRECHECKS <1 min PREFIXUPS <1 min DRAIN <1 min DBUPGRADE ~0 min (RUNNING) POSTCHECKS POSTFIXUPS POSTUPGRADE SYSUPDATES Stage-Progress Per Container +--------+---------+ |Database|DBUPGRADE| +--------+---------+ |CDB$ROOT| 0 % | |PDB$SEED| 0 % | | PDB1| 0 % | +--------+---------+ upg>
Once the job completes a summary message is displayed.
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_ORCL1930000 Please check the summary report at: /oracle/autoupgrade/logs/cfgtoollogs/upgrade/auto/status/status.html /oracle/autoupgrade/logs/cfgtoollogs/upgrade/auto/status/status.log
The "status.html" contains the top-level information about the upgrade process.
$export ORACLE_HOME=$ORACLE_BASE/product/26.0.0/dbhome_1 $export PATH=$ORACLE_HOME/bin:$PATH $export ORACLE_SID=orcl SQL> sqlplus / as sysdba SQL>shutdown immediate; SQL>startup; SQL>show pdbs SQL>exit
Final Steps
Edit the "/etc/oratab" file and any environment files as required.
When I’m done testing the database – including application testing – and I decided that a rollback is not needed, I’ll drop the GRP:
SQL> drop restore point AUTOUPGRADE_9212_ORCL193000;
No comments:
Post a Comment