Newsletters




Oracle Database Upgrade: How to Migrate from 11.2.0.2 and Beyond to Oracle AI Database 26ai

<< back Page 2 of 2

Install 19c

  • Create a path for 19c, unzip the database, and install.

mkdir /u01/app/oracle/product/19

cd /u01/inst

unzip -q 19c_db_V982063-01.zip -d /u01/app/oracle/product/19

export ORACLE_HOME=/u01/app/oracle/product/19

export INST_DIR=/u01/inst

export ORACLE_BASE=/u01/app/oracle

export ORACLE_GROUP=oinstall

export EDITION=EE

export CV_ASSUME_DISTID=OEL8.5

cd $ORACLE_HOME

./runInstaller -waitforcompletion  -silent \

    oracle.install.option=INSTALL_DB_SWONLY \

    ORACLE_HOSTNAME=${ORACLE_HOSTNAME} \

    UNIX_GROUP_NAME=${ORACLE_GROUP} \

    SELECTED_LANGUAGES=en \

    ORACLE_HOME=${ORACLE_HOME} \

    ORACLE_BASE=${ORACLE_BASE} \

    oracle.install.db.InstallEdition=${EDITION} \

    oracle.install.db.OSDBA_GROUP=${ORACLE_GROUP} \

    oracle.install.db.OSBACKUPDBA_GROUP=${ORACLE_GROUP} \

    oracle.install.db.OSDGDBA_GROUP=${ORACLE_GROUP} \

    oracle.install.db.OSKMDBA_GROUP=${ORACLE_GROUP} \

    oracle.install.db.OSRACDBA_GROUP=${ORACLE_GROUP} \

    SECURITY_UPDATES_VIA_MYORACLESUPPORT=false \

    DECLINE_SECURITY_UPDATES=true

bob:> sudo /u01/app/oracle/product/19/root.sh

Check /u01/app/oracle/product/19/install/root_ol8_2024-07-11_16-20-02-692938618.log for the output of the root script.

Patch Oracle 19c Database to 19.23

  • Download the required patches and patch the database.
  • This also gives you a new version of the autoupgrade.jar file.
  • You can use wget to download the patch files.

cd /u01/inst

wget --http-user="user@datavail.com" --http-password="password" --output-document="19.24-db-p36582781_190000_Linux-x86-64.zip" https://updates.oracle.com/Orion/Services/download/p36582781_190000_Linux-x86-64.zip?aru=25751445&patch_file=p36582781_190000_Linux-x86-64.zip

wget --http-user="user@datavail.com" --http-password="password" --output-document="p6880880_190000_Linux-x86-64.zip" "https://updates.oracle.com/Orion/Download/process_form/p6880880_190000_Linux-x86-64.zip?file_id=112014090&aru=25200703&userid=o-zane.warton@datavail.com&email=zane.warton@datavail.com&patch_password=&patch_file=p6880880_190000_Linux-x86-64.zip"

  • Install the patches.
  • Set the 19c environment for the patch and unzip the patches.

echo 19:/u01/app/oracle/product/19:N >> /etc/oratab

. oraenv, enter 19

unzip -q 19.23-db-p36233263_190000_Linux-x86-64.zip

unzip -q 19.23-jvm-p36199232_190000_Linux-x86-64.zip

unzip -oq p6880880_190000_Linux-x86-64.zip -d $ORACLE_HOME

$ORACLE_HOME/OPatch/opatch lspatches

29585399;OCW RELEASE UPDATE 19.3.0.0.0 (29585399)

29517242;Database Release Update : 19.3.0.0.190416 (29517242)

cd 36233263

$ORACLE_HOME/OPatch/opatch apply

cd ../36199232

$ORACLE_HOME/OPatch/opatch lspatches

36199232;OJVM RELEASE UPDATE: 19.23.0.0.240416 (36199232)

36233263;Database Release Update : 19.23.0.0.240416 (36233263)

29585399;OCW RELEASE UPDATE 19.3.0.0.0 (29585399)

Upgrade 11.2.0.4 to 19c

  • We use the autoupgrade utility to upgrade to 19c.
  • Make some directories to hold the upgrade files:
    • mkdir -p ~/upgrade ~/upgrade/global ~/upgrade/log
    • cd ~/upgrade
  • Create a sample config file.
  • Edit that config file with these values.

export NEW_ORACLE_HOME=/u01/app/oracle/product/19

$NEW_ORACLE_HOME/jdk/bin/java -jar $NEW_ORACLE_HOME/rdbms/admin/autoupgrade.jar -create_sample_file config  noncdbtopdb

 mv sample_config.cfg config.cfg

I suggest using the following parameters:

global.autoupg_log_dir=/home/oracle/upgrade/global

upg1.log_dir=/home/oracle/upgrade/log

upg1.sid=bob

upg1.source_home=/u01/app/oracle/product/11

upg1.target_home=/u01/app/oracle/product/19

upg1.run_utlrp=yes

upg1.timezone_upg=yes


Run the autoupgrade using analyze mode to see if any manual changes are needed.

$NEW_ORACLE_HOME/jdk/bin/java -jar $NEW_ORACLE_HOME/rdbms/admin/autoupgrade.jar -config config.cfg -mode ANALYZE

Check log to confirm if it passed checks.

cat /home/oracle/upgrade/global/cfgtoollogs/upgrade/auto/status/status.log

  • Deploy to upgrade.

$NEW_ORACLE_HOME/jdk/bin/java -jar $NEW_ORACLE_HOME/rdbms/admin/autoupgrade.jar -config config.cfg -mode DEPLOY

You can use these commands to monitor the upgrade process:

lsj

tasks

status -a 7

Install Oracle AI Database 26ai

  • Now we install 26ai.
  • This is currently the Free version available here.
  • Or we can use wget again as root.

wget --no-check-certificate -c --header "Cookie: oraclelicense=accept-securebackup-cookie" https://download.oracle.com/otn-pub/otn_software/db-free/oracle-database-free-23ai-1.0-1.el8.x86_64.rpm

  • Run the pre-install and the rpm install as root.

dnf install -y oracle-ai-database-preinstall-26ai

dnf -y localinstall oracle-ai-database-free-26ai-23.26.0-1.el8.x86_64.rpm

  • To keep things simple, we setup the 26ai Free database using default parameters.
  • This will automatically create a CDB we can use for the 19c->26ai upgrade.

export DB_PASSWORD=DBA_Password8

(echo "${DB_PASSWORD}"; echo "${DB_PASSWORD}";) | /etc/init.d/oracle-free-26ai configure

Upgrade 19c to 26ai pdb

  • Drop a restore point created in the prior upgrade.

drop restore point AUTOUPGRADE_9212_BOB112040;

  • Set compatibility to 19c and restart the instance.

alter system set compatible='19.0.0' scope=spfile;

shutdown immediate

startup

  • Re-run the prior steps for autoupgrade, this time using non cdb to pdb option.

export NEW_ORACLE_HOME=/opt/oracle/product/26ai/dbhomeFree

cd ~/upgrade

rm -rf global log

$NEW_ORACLE_HOME/jdk/bin/java -jar $NEW_ORACLE_HOME/rdbms/admin/autoupgrade.jar -create_sample_file config  noncdbtopdb

global.autoupg_log_dir=/home/oracle/upgrade/global

upg1.log_dir=/home/oracle/upgrade/log

upg1.sid=bob

upg1.source_home=/u01/app/oracle/product/19

upg1.target_home=/opt/oracle/product/26ai/dbhomeFree

upg1.run_utlrp=yes

upg1.timezone_upg=yes

upg1.target_pdb_name=bob

upg1.target_cdb=FREE

Use the same analyze and deploy steps as before/

$NEW_ORACLE_HOME/jdk/bin/java -jar $NEW_ORACLE_HOME/rdbms/admin/autoupgrade.jar -config config.cfg -mode ANALYZE

$NEW_ORACLE_HOME/jdk/bin/java -jar $NEW_ORACLE_HOME/rdbms/admin/autoupgrade.jar -config config.cfg -mode DEPLOY

Note: You can not quite get to open mode with the current release of the free version of the on-premise Oracle AI Database 26ai.  You will see this error during the final open process:


Upgrading to 26ai and setting up a new OEL 8.9 server is a strategic move that can significantly enhance your system's performance, security, and functionality. By following the outlined steps and taking advantage of the new features, you can ensure a smooth transition and position your organization to leverage the full potential of this powerful software.

Explore more Oracle insights at Datavail.com.

<< back Page 2 of 2

Sponsors