Welcome to Salem Houali ‘s Oracle Developer Notes

Oracle True Cache installation on database 26ai

Configure true Cache on Oracle AI Database Free
Ref. Oracle documentation

True Cache is an in-memory, read-only cache in front of an Oracle AI Database.

Like Oracle Active Data Guard, True Cache is a fully functional, read-only replica of the primary database, except that it’s mostly diskless.

Unlike conventional caches, True Cache automatically keeps the most frequently accessed data in the cache, and it keeps the cache consistent with the primary database, other objects in the same cache, and other caches, this ensures low-latency access to the data.

True Cache implements Oracle AI Database security policies.

This enables you to cache sensitive data, like private personal information, that you might not ordinarily cache.

Note

To configure True Cache on Oracle AI Database Free, we need to do it in two steps: First step: Set up Oracle AI Database Free on the primary node Second step: Configure True Cache in another True Cache node.

Prepare the environment We have two virtual machines (ol9m1 &ol9m2) running on the same operating system Operating System: Oracle Linux Server 9.7 — Machine 1 (ol9m1) , For the Primary Database

– Machine 2 (ol9m2) , For the True Cache Instance

Verify that we can establish communication between our virtual machines (ol9m1 & ol9m2),  primary database and a True Cache node) using Basic ICMP Connectivity (Ping)
And at last, let’s make sure the 1521 port would be open for the SQL *Net communication
root@ol9m1 linecode]# firewall-cmd –zone=public –add-port=1521/tcp –permanent
success
[root@ol9m1 linecode]# firewall-cmd –reload
success
[root@ol9m1 linecode]# firewall-cmd –zone=public –list-ports
1521/tcp

Step1 : Set up Oracle AI Database Free on the primary node

Install Oracle AI Database Free RPM for Linux x86-64

Log in as the root user.
Install the Oracle AI Database Preinstallation RPM.
run the following command

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

Go to the Oracle yum site: https://yum.oracle.com/repo/OracleLinux/OL9/appstream/x86_64/

and search for

log in as root to configure the database
sudo -s
/etc/init.d/oracle-free-26ai configure

Setting Oracle AI Database Free Environment Variables

After Oracle AI Database Free is installed and configured, we need to set the environment before you use Oracle AI Database Free.
  • let’s modify the oracle user’s profile

This complete the first step of the demo

Step2 : Configure Oracle True Cache Node

Install Oracle AI Database 26 binaries
dnf -y install oracle-ai-database-preinstall-26ai


Create the True Cache Instance

Ensure that the primary database is running on the primary node in archive logging (ARCHIVELOG) mode.

Enable archive log mode

Set the environment variables
export ORACLE_SID=FREE
export ORACLE_BASE=/opt/oracle
export ORACLE_HOME=/opt/oracle/product/26ai/dbhomeFree
export PATH=/home/oracle/.local/bin:/home/oracle/bin:/usr/share/Modules/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/opt/oracle/product/23ai/dbhomeFree/bin
Next, we create and configure the True Cache instance on Machine 2. (ol9m2). We only need to copy the password file from the primary to the True Cache host first:

oracle@ol9m1 oracle]$ scp /opt/oracle/product/26ai/dbhomeFree/dbs/orapwFREE oracle@ol9m2:/opt/oracle/tmp
oracle@ol9m2's password: 
orapwFREE 100% 2048 2.8MB/s 00:00 
[oracle@ol9m1 oracle]$

Run the following command:
./dbca -silent -createTrueCache -gdbName FREE -sourceDBConnectionString ol9m1:1521/FREE -passwordFileFromSourceDB /opt/oracle/tmp/orapwFREE -dbUniqueName FREE_TC -sid FREE
[oracle@ol9m2 bin]$ ./dbca -silent -createTrueCache -gdbName FREE -sourceDBConnectionString ol9m1:1521/FREE -passwordFileFromSourceDB /opt/oracle/tmp/orapwFREE -dbUniqueName FREE_TC -sid FREE
Enter Remote DB SYS user password:
Session ID of the current execution is: 1
—————–
Running Extract_password_file_from_blob_file job
Completed Extract_password_file_from_blob_file job
25% complete
—————–
Running Create_static_listener job
Completed Create_static_listener job
38% complete
—————–
Running Register_listener job
Completed Register_listener job
50% complete
—————–
Running Extract_tde_wallet_from_blob_file job
Skipping. Job is detected as not applicable.
54% complete
—————–
Running Setup_required_directories job
Completed Setup_required_directories job
57% complete
—————–
Running Create_pfile job
Completed Create_pfile job
61% complete
—————–
Running Start_nomount_instance job
Completed Start_nomount_instance job
64% complete
—————–
Running Create_TDE_wallet job
Skipping. Job is detected as not applicable.
68% complete
—————–
Running Create_truecache_instance job
Completed Create_truecache_instance job
71% complete
—————–
Running Add_oratab_entry job
Completed Add_oratab_entry job
75% complete
—————–
Running Reopen_wallet job
Skipping. Job is detected as not applicable.
100% complete
Look at the log file “/opt/oracle/cfgtoollogs/dbca/FREE_TC/FREE_TC.log” for further details.
[oracle@ol9m2 bin]$

Verification Steps
Now let’s verify the setup on the true cache instance.

[oracle@ol9m2 admin]$ sqlplus / as sysdba
SQL*Plus: Release 23.26.0.0.0 – Production on Mon Dec 22 14:32:41 2025
Version 23.26.0.0.0
Copyright (c) 1982, 2025, Oracle. All rights reserved.
Connected to:
Oracle AI Database 26ai Free Release 23.26.0.0.0 – Develop, Learn, and Run for Free
Version 23.26.0.0.0
SQL> select name, open_mode, database_role from v$database;
NAME OPEN_MODE DATABASE_ROLE
——— ——————– —————-
FREE READ ONLY WITH APPLY TRUE CACHE
SQL> show pdbs;
CON_ID CON_NAME OPEN MODE RESTRICTED
———- —————————— ———- ———-
2 PDB$SEED READ ONLY NO
3 FREEPDB1 READ ONLY NO
SQL>
SQL> select TRUE_CACHE_NAME, PRIMARY_NAME, STATUS, REMOTE_VERSION, CON_ID from v$true_cache;
TRUE_CACHE_NAME PRIMARY_NAME STATUS REMOTE_VERSION CON_ID
————— ————— ————— —————— ———-
FREE_TC FREE HEALTHY 23.0.0.0.0 0
SQL>

This completes the demonstration 

One Response to “Oracle True Cache installation on database 26ai”

Leave a Reply