Newsletters




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

Page 1 of 2 next >>

By Zane Warton

Upgrading your Oracle database from version 11.2.0.2 to the latest Oracle AI Database 26ai release gives you access to the cutting edge functionality that Oracle is delivering to this data platform.  

This guide will walk you through setting up a new Oracle Enterprise Linux (OEL) 8.7 environment to support 11g, 19c, and 26ai database software. I’ll also highlight some noteworthy features and benefits of 26ai.

Why Upgrade to Oracle AI Database 26ai? 

  • Enhanced Performance: Optimized for faster speeds, reduced latency, and improved response times.
  • Advanced AI Integration: Features built-in machine learning and Oracle AI Vector Search for in-database artificial intelligence and predictive analytics.
  • Real-Time Analytics: Instantly processes data to deliver immediate insights and actionable results.
  • Stronger Security: Includes advanced encryption, multi-factor authentication (MFA), real-time threat detection, and secure AI execution.
  • Broader Compatibility: Supports a wider range of platforms and integrates seamlessly with modern tools, including enhanced Java support.
  • Shrink Tablespace: Efficiently reclaims unused space to reduce storage costs.
  • Automatic Transaction Rollback: Prevents long-running jobs from blocking critical transactions by automatically rolling back problematic transactions.
  • Fast Ingest Upgrades: Improves performance for partitioned, compressed, and in-memory data loads.
  • Real-Time SQL Plan Management: Automatically detects and corrects performance regressions in SQL plans.
  • SQL Analysis Reports: Provides actionable recommendations for developers to optimize SQL code.
  • True Cache: Offers a self-managed in-memory cache for enhanced performance and scalability.

How to Upgrade to Oracle AI Database 26ai

One way to upgrade directly from any 10g, 11g, or 12c Oracle database is using datapump (exp/expdp) to create a logical export of the source data and import it directly into a 26ai database.

This process has significant disadvantages with particularly large or busy databases, so here we will be using a RMAN backup and upgrading to 26ai by using the traditional 11g upgrade script and the autoupgrade utility for the 19c and 26ai processes.

Upgrading to Oracle 26ai requires a 19c/21c database source and upgrading to 19c requires a version such as 11.2.0.4, 12.1.0.2, 12.2.0.1, or 18.

Overview of the Oracle Database 11.2.0.2 to 26ai Migration Process

  • Setup a new Linux server.
  • Install 11.2.0.4.
  • Restore your database from an RMAN backup.
  • Upgrade your database to 11.2.0.4 from 11.2.0.2.
  • Install and patch 19c.
  • Upgrade from 11g to 19c using autoupgrade.
  • Install Oracle AI Database 26ai.
  • Create a 26ai Container database (CDB).
  • Migrate and upgrade 19c into that CDB as a PDB database.

Migration Assumptions 

  • You have an RMAN backup of your 11.2.0.2 database that includes the control file and spfile.
  • We will be setting up a new server, using Oracle Enterprise Linux 8.7.
  • We will be using Oracle's Virtual Box to host the new server image, but you can extrapolate this to a compute instance on VMWare, AWS, OCI, or Azure.
  • For more details in depth please review the 11g/19c/26ai documentation and install guides.

OEL 8.7 Server Setup and configuration

As part of the upgrade process, and to perform this demo, we will set up a new Oracle Enterprise Linux (OEL) 8.7 server using Oracle's Virtual Box. 

Download Installation Media

  • Download the OEL 8.7 ISO image from Oracle’s software delivery cloud.
  • You can also download the 26ai, 19c, and 11.2.0.4 database install files from this location.

Setup Virtual Box Instance

  • Create a new Server, name it something (ol8 for me), set the Type is: Linux, Version: Oracle Linux 64 bit.
  • Select the ISO you just downloaded to boot with.
  • 10 GB Memory, 4 vCPU
  • 300 GB Virtual hard disk, not pre-allocated
  • I use a bridged network connection so I can connect to it with putty.


Install OEL 8.9

  • Begin Installation: Select "Install Oracle Linux 8.7" and proceed with the guided setup.
  • Partition Disks: To keep it simple, I just save 10 GB of disk for swap and put the rest under /
  • Select Software Packages: Choose the Server only install option, or "Server with GUI" if you prefer.
  • Configure Network: Enable the virtual network card.

Post-Installation Setup

  • Update the System: Once the installation is complete, update the system using "yum update"
  • Install Required Dependencies (this is a shortcut for many of the requirements for all 3 versions): 
    • yum -y install oracle-database-preinstall-19c.x86_64
    • perl.x86_64 - needed for part of the 19c java patch
  • Create initial directories and assign their ownership to oracle:oinstall

yum update

yum -y install oracle-database-preinstall-19c.x86_64 perl.x86_64

mkdir -p /u01 /oracle

chown oracle:oinstall /u0* /oracle

11.2.0.4 Installation

  • 11g will require these additional packages:

yum install -y gcc.x86_64 glibc glibc-devel

curl -o libaio-0.3.109-13.el7.i686.rpm https://yum.oracle.com/repo/OracleLinux/OL7/latest/x86_64/getPackage/libaio-0.3.109-13.el7.i686.rpm

curl -o libaio-0.3.109-13.el7.x86_64.rpm https://yum.oracle.com/repo/OracleLinux/OL7/latest/x86_64/getPackage/libaio-0.3.109-13.el7.x86_64.rpm

curl -o libaio-devel-0.3.109-13.el7.i686.rpm https://yum.oracle.com/repo/OracleLinux/OL7/latest/x86_64/getPackage/libaio-devel-0.3.109-13.el7.i686.rpm

curl -o libaio-devel-0.3.109-13.el7.x86_64.rpm https://yum.oracle.com/repo/OracleLinux/OL7/latest/x86_64/getPackage/libaio-devel-0.3.109-13.el7.x86_64.rpm

yum -y localinstall libaio-0.3.109-13.el7.i686.rpm

yum -y localinstall libaio-0.3.109-13.el7.x86_64.rpm

yum -y localinstall libaio-devel-0.3.109-13.el7.x86_64.rpm

yum -y localinstall libaio-devel-0.3.109-13.el7.i686.rpm

  • Now we install 11g.
  • As the Oracle id, Download installation software to /u01/inst, and unzip there.

cd /u01/inst/database

mkdir -p /u01/app/oracle/product/11

./runInstaller -silent -ignoreSysPrereqs -ignorePrereq -waitforcompletion -showProgress  \

FROM_LOCATION=/u01/inst/database/stage/products.xml \

oracle.install.option=INSTALL_DB_SWONLY \

UNIX_GROUP_NAME=oinstall \

INVENTORY_LOCATION=/u01/app/oraInventory \

ORACLE_HOME=/u01/app/oracle/product/11 \

ORACLE_HOME_NAME="OraDb11g_Home1" \

ORACLE_BASE=/u01/app/oracle \

oracle.install.db.InstallEdition=EE \

oracle.install.db.isCustomInstall=false \

oracle.install.db.DBA_GROUP=oinstall \

oracle.install.db.OPER_GROUP=oinstall \

DECLINE_SECURITY_UPDATES=true

Run the required root scripts mentioned at the end of the install.

Restore the Database Directly to 11.2.0.4

  • Add an entry to your /etc/oratab for your database name.

echo "bob:/u01/app/oracle/product/11:N" >>/etc/oratab

. oraenv

  • Copy your backup files to a suitable location (I used /u02/backup).
  • Make some required directories (you may need to restore spfile first, to adjust locations or create the right places.)

mkdir -p /oracle/admin/bob/adump/bob /oracle/oradata /oracle/oradata/BOB/controlfile /oracle/fra

  • Restore from your rman backup.

rman target /

startup nomount;

restore spfile from '/u02/backup/bob_COLD_102vit1e_1_1_20240710_1628.bus';

shutdown immediate;

startup nomount;

restore controlfile from '/u02/backup/bob_CTRL_112vit27_1_1_20240710_1628.bus';

alter database mount;

CONFIGURE DEVICE TYPE DISK PARALLELISM 3  BACKUP TYPE TO BACKUPSET;

restore database;

recover database;  --- Here is where you could potentially do multiple rounds of recovery, if you're restoring from a large database backup.

Upgrade Database to 11.2.0.4

  • Now we open in upgrade mode and upgrade the system to 11.2.0.4.

sqlplus / as sysdba

alter database open resetlogs upgrade;

cd $ORACLE_HOME/rdbms/admin

sqlplus / as sysdba

spool /tmp/upgrade.log

set echo on

@catupgrd.sql

  • Then start the instance for the next step.

startup mount

ORACLE instance started.

Total System Global Area  626327552 bytes

Fixed Size                  2255832 bytes

Variable Size             335545384 bytes

Database Buffers          281018368 bytes

Redo Buffers                7507968 bytes

Database mounted.

alter database archivelog;

Database opened.

Page 1 of 2 next >>

Sponsors