<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Dimitri Gielis (full posts)</title><description>Dimitri Gielis, founder of United Codes and Tsaru and co-founder of Inspectwise. Writing about Oracle APEX, the Oracle Database and AI-assisted development.</description><link>https://dgielis.com</link><item><title>How we monitor our Oracle APEX servers with AI</title><link>https://dgielis.com/monitoring-our-servers-with-ai</link><guid isPermaLink="true">https://dgielis.com/monitoring-our-servers-with-ai</guid><description>For weeks I asked an AI every morning &quot;how are the servers doing?&quot;, now it checks on its own. How it works together with AHF and APEX Project Eye, the real problems it found, and what I learned about letting AI look after your servers.</description><pubDate>Wed, 04 Nov 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;img src=&quot;https://dgielis.com/images/posts/monitoring-our-servers-with-ai/how-are-the-servers-doing.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;&lt;p&gt;“How are the servers doing?”&lt;/p&gt;
&lt;p&gt;For several weeks, that’s what I typed every morning in Claude Code. A few minutes later I knew if our database, ORDS and Nginx were fine, and if not, why. Today I don’t type it anymore: the check runs on its own, and I only hear from it when there is something to look at.&lt;/p&gt;
&lt;p&gt;In my &lt;a href=&quot;https://dgielis.com/oracle-autonomous-health-framework-ahf&quot;&gt;last post&lt;/a&gt; I wrote about AHF, Oracle’s health check for the database server. This post is about the rest: how we watch the whole stack, and what AI changed there. We know Oracle well at United Codes, but nobody here is a full-time sysadmin watching servers all day. I think that’s the case for a lot of you running your own environment, so I hope our learnings help. They’re our learnings, not a best-practice guide.&lt;/p&gt;
&lt;h2 id=&quot;what-we-run&quot;&gt;What we run&lt;/h2&gt;
&lt;p&gt;For many environments we use Oracle Autonomous AI Database, where Oracle does the monitoring, patching and backups for us. But we also run our own servers, for development, to control which versions we run, and to test things for customers on the same setup they have. That’s where we have to do the monitoring ourselves.&lt;/p&gt;
&lt;p&gt;That setup is pretty standard for Oracle APEX: Nginx in front, two ORDS instances behind it, and a database server with our Oracle AI Database 26ai CDB and an older 19c one. Every page request goes Nginx → ORDS → database. So when a customer says “the app is slow”, the problem can be in any of the three. That’s why checking only the database is not enough.&lt;/p&gt;
&lt;h2 id=&quot;what-the-ai-checks&quot;&gt;What the AI checks&lt;/h2&gt;
&lt;p&gt;I didn’t build a monitoring product. I gave the AI SSH access to the servers and a description of how they’re set up, and asked it to check what I would check if I had the time: are the services up, errors in the logs of Nginx, ORDS and the database, memory, disk space, backups, failed jobs, and what AHF and APEX Project Eye found (more on both below).&lt;/p&gt;
&lt;h2 id=&quot;give-it-a-map-of-your-servers&quot;&gt;Give it a map of your servers&lt;/h2&gt;
&lt;p&gt;This is the most important learning. &lt;strong&gt;The AI is only as good as what it knows about your setup.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;So we keep notes it reads every time: which server does what, where the logs are, how to run SQL, which ports ORDS runs on. And small things like “both servers log in UTC, I talk in Belgian time”. That one sounds silly, but it saved us a lot of confusion: when I say “the app was slow at 3 o’clock”, it first converts the time and then looks at Nginx, ORDS and the alert log for the same window.&lt;/p&gt;
&lt;p&gt;After every check it also writes down what it saw: the numbers, what changed, what to watch. So the next check doesn’t just say “all OK”, it says “this disk went from 82% to 88% in a few days, at this rate it’s full in two weeks”. &lt;strong&gt;A trend is worth more than a status.&lt;/strong&gt;&lt;/p&gt;
&lt;h2 id=&quot;what-a-check-looks-like&quot;&gt;What a check looks like&lt;/h2&gt;
&lt;p&gt;This is a real answer (a bit shorter):&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Web server&lt;/strong&gt; (Nginx + ORDS): OK. Up 5 days. Both ORDS instances respond. No 5xx in the last hour, no ORDS errors today.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Database server&lt;/strong&gt;: OK. Last night’s backup finished in 58 minutes. The ORA-04036 session kills seem to have stopped: 53 on the day we moved PRD, none since.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Things to watch:&lt;/strong&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;One disk is 88% full, it was 82% a few days ago.&lt;/li&gt;
&lt;li&gt;A scheduler job fails every night in DEV: it doesn’t compile, a column was changed.&lt;/li&gt;
&lt;/ol&gt;
&lt;/blockquote&gt;
&lt;p&gt;That’s what I want: what’s fine, what’s not, and what to do about it. In a minute of reading.&lt;/p&gt;
&lt;h2 id=&quot;ahf-finds-it-the-ai-explains-it&quot;&gt;AHF finds it, the AI explains it&lt;/h2&gt;
&lt;p&gt;This morning showed best how it all fits together.&lt;/p&gt;
&lt;p&gt;Claude did its morning check: all healthy. Then I saw an email from AHF, sent at 02:58:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;DIA0 Critical Database Process As Root: Hang ID 1 blocks 1 sessions&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;So TFA saw a hang in our 19c CDB, and Claude didn’t. It searched the alert log for &lt;code&gt;ORA-&lt;/code&gt; lines, and this message has no &lt;code&gt;ORA-&lt;/code&gt; in it. &lt;strong&gt;AHF watches patterns I (and the AI) didn’t think of.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;I pasted the email in Claude Code. A few minutes later I had the full story: at 02:30 the nightly RMAN level 1 backup of our 26ai CDB starts. &lt;strong&gt;Block change tracking was disabled&lt;/strong&gt;, so every “incremental” backup still reads all datafiles, for an hour, every night. Part of the 19c datafiles are on the same disk, so its database writer couldn’t get its writes through. The Hang Manager trace showed “IO load is abnormally high” every night since we scheduled those backups. Last night was just the first time it was bad enough to be called a hang.&lt;/p&gt;
&lt;p&gt;The fix is one command:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;sql&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;alter&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt; database&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt; enable&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt; block&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt; change tracking &lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;using&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt; file&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; &apos;/u03/oradata/CDB2/bct_cdb2.chg&apos;&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I ran it, Claude verified it, and wrote in its notes to check the first backup after Sunday’s level 0: does it use the change tracking file, and is the IO warning gone at night.&lt;/p&gt;
&lt;p&gt;That’s the combo I like: &lt;strong&gt;AHF finds it, the AI explains it, proposes a fix and keeps watching it.&lt;/strong&gt;&lt;/p&gt;
&lt;h2 id=&quot;apex-project-eye-watches-the-apps&quot;&gt;APEX Project Eye watches the apps&lt;/h2&gt;
&lt;p&gt;AHF looks at the database. But a server can be perfectly healthy while an app is not.&lt;/p&gt;
&lt;p&gt;For the apps we use &lt;a href=&quot;https://www.united-codes.com/products/apexprojecteye/&quot;&gt;APEX Project Eye&lt;/a&gt; (APE). I’m biased as we built it at United Codes. We started it to see the activity in our own Oracle APEX instance, and it grew from there. Today it also gives insights into the APEX apps themselves, can generate documentation for them, and runs quality assurance checks while you develop. Just like &lt;a href=&quot;https://www.united-codes.com/products/dblinter/&quot;&gt;dbLinter&lt;/a&gt; does for the database and PL/SQL, APE does it for Oracle APEX apps. And in the next major release we’re adding an SLA module.&lt;/p&gt;
&lt;p&gt;The part I use for monitoring is the &lt;strong&gt;Watchtower&lt;/strong&gt;. It runs a scanner every day with sensors like long running pages, new kinds of errors, failed automations and failing web service calls, and it sends a summary.&lt;/p&gt;
&lt;p&gt;When I looked at that summary with fresh eyes, I saw a problem: it said “Action required” every day, for mostly the same things. And when something says “Action required” every day, you stop reading it. That’s not APE’s fault, that’s human.&lt;/p&gt;
&lt;p&gt;So I asked Claude to read APE too, straight from its tables, like any other log. The first time, it found an automation in one of our apps with &lt;strong&gt;100% error rows&lt;/strong&gt;, every day for weeks. And web service calls to an AI server we don’t run anymore: APE showed it as one line, but it was almost &lt;strong&gt;16,000 failed calls&lt;/strong&gt; since mid-October.&lt;/p&gt;
&lt;p&gt;Then it found something worse than noise: &lt;strong&gt;sensors that said “Normal” while they couldn’t see the problem.&lt;/strong&gt; One sensor only saw the jobs of APE’s own schema, so it said “Normal” every day while a job in another schema failed on every run. A sensor that’s blind is worse than no sensor, because you trust it.&lt;/p&gt;
&lt;p&gt;So we fixed those and added six new sensors. Claude tested them in DEV first, including the rollback, and wrote it up as a script for our APE dev team, so the fixes can go into APE itself. On the first run, a new sensor found an automation that got an HTTP 500 from an accounting API about 240 times a day.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;AHF watches the database, APE watches the apps, the AI reads both and remembers.&lt;/strong&gt;&lt;/p&gt;
&lt;h2 id=&quot;what-it-found&quot;&gt;What it found&lt;/h2&gt;
&lt;p&gt;Some other real things from the last weeks:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;A 5 minute outage.&lt;/strong&gt; The database server was swapping: HugePages weren’t configured, so Linux could swap out part of the SGA.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;A bot&lt;/strong&gt; doing about 490,000 requests a day on one of our apps. We had a rule for it in Nginx, but for the wrong URL pattern.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;A memory leak&lt;/strong&gt; that killed sessions with ORA-04036 about 5 times a day. The AI went through 65 incident traces and found the same PL/SQL JSON heap in all of them. More in &lt;a href=&quot;https://dgielis.com/upgrade-oracle-database-19c-to-26ai&quot;&gt;the upgrade post&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;A payment bug.&lt;/strong&gt; Since 2020, one Stripe checkout fired two webhooks and our code handled both. No double invoices, but our payment reports counted those twice.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Jobs that never worked&lt;/strong&gt;, like a bank statement import that failed on every run for a month, while people uploaded the files by hand.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;None of these was an alarm going off. A job that fails every day becomes “normal”. They were all found by someone (something?) reading the logs with attention, every day, and asking why. That’s the part I never had time for.&lt;/p&gt;
&lt;h2 id=&quot;claude-and-grok&quot;&gt;Claude and Grok&lt;/h2&gt;
&lt;p&gt;We use two AIs, and they do different things.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Grok&lt;/strong&gt; got a short prompt with the servers, where the logs and configs are, and the question to check them and see what we can optimise. It started from zero every time, and the prompt still said 19c after we moved to 26ai. Funny detail: Claude noticed a 403 in the ORDS logs every 4 hours, and traced it back to Grok’s own health check. One AI found the noise of the other one.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Claude (Claude Code) is the one with the memory.&lt;/strong&gt; It keeps the notes from every check, so it knows what’s normal for us, what we changed last week, what it promised to look at again. That’s why the deep dives are all Claude. It’s also the one I trust to propose a fix, because it knows the history of that server.&lt;/p&gt;
&lt;p&gt;If I could only keep one, I’d keep the one with the memory.&lt;/p&gt;
&lt;h2 id=&quot;rules-i-follow&quot;&gt;Rules I follow&lt;/h2&gt;
&lt;p&gt;This is where I’d be careful if you start with it:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Read-only by default.&lt;/strong&gt; Changing something on production, I want to see the command first.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Ask for a backup and a way back.&lt;/strong&gt; Every change we made had a backup of what it changes and a rollback.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Ask for numbers, not “it’s fine”.&lt;/strong&gt; How many errors, since when, compared to yesterday.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;It makes mistakes.&lt;/strong&gt; It once ran a statistics job that blew up the PGA. It gave me a command that wiped a crontab instead of backing it up (it rebuilt it from an older backup and the logs). And this morning it missed the hang that AHF caught. &lt;strong&gt;You stay responsible&lt;/strong&gt;, not the AI.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Think about access.&lt;/strong&gt; It runs with my SSH keys and sudo. That’s a lot of power.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;from-asking-every-morning-to-a-schedule&quot;&gt;From asking every morning to a schedule&lt;/h2&gt;
&lt;p&gt;The first weeks I asked every morning and read the answer. On purpose: I wanted to see what it flags, what it misses and how it reasons, before I trust it when it says “all OK”.&lt;/p&gt;
&lt;p&gt;Once I did, there was no reason to keep asking by hand. Now Claude Code runs headless (&lt;code&gt;claude -p&lt;/code&gt;) every 4 hours from a scheduled job on my Mac. Fixed, read-only scripts collect the data, Claude reads it together with its notes, digs deeper when something is new, and writes one line in its log. Its answer starts with &lt;code&gt;STATUS: OK&lt;/code&gt;, &lt;code&gt;WATCH&lt;/code&gt; or &lt;code&gt;ACTION&lt;/code&gt;, and only for the last two I get a notification. A run takes less than a minute.&lt;/p&gt;
&lt;p&gt;I still ask for a check when I want one, for example after a change or when a customer says the app is slow. But I don’t have to remember it anymore.&lt;/p&gt;
&lt;p&gt;One more learning: &lt;strong&gt;the notes need maintenance too.&lt;/strong&gt; After a few weeks they were long, full of “check 10-27: healthy”. The useful part is the decisions and the lessons. So the scheduled check keeps a short log and turns the older entries into a trend. A trend, not a diary.&lt;/p&gt;
&lt;h2 id=&quot;whats-next&quot;&gt;What’s next&lt;/h2&gt;
&lt;p&gt;When an AHF email comes in, the check should start by itself, instead of me pasting the email. And I want to make “read-only” a real lock instead of a rule in a prompt: a separate SSH user and a read-only database account for the monitoring.&lt;/p&gt;
&lt;p&gt;If you manage your own Oracle APEX environment, try it: give an AI read access and a map of your servers, and ask “how are the servers doing?”. You’ll be surprised what it finds 😀&lt;/p&gt;
&lt;p&gt;And if you’d like help setting it up for your environment, that’s something we do at &lt;a href=&quot;https://www.united-codes.com&quot;&gt;United Codes&lt;/a&gt;.&lt;/p&gt;
</content:encoded><category>Oracle APEX &amp; Database</category><category>oracle-apex</category><category>orclapex</category><category>oracle-database</category><category>ords</category><category>ai</category></item><item><title>A health check for our Oracle Database server with AHF</title><link>https://dgielis.com/oracle-autonomous-health-framework-ahf</link><guid isPermaLink="true">https://dgielis.com/oracle-autonomous-health-framework-ahf</guid><description>After our upgrade to 26ai I installed Oracle&apos;s Autonomous Health Framework (AHF) on our database server. How we installed it, what ORAchk found (memory, a single controlfile, core dumps), what we fixed, what we left alone, and how we monitor from now on.</description><pubDate>Sun, 01 Nov 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;img src=&quot;https://dgielis.com/images/posts/oracle-autonomous-health-framework-ahf/ahf-health-check.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;&lt;p&gt;A week ago we &lt;a href=&quot;https://dgielis.com/upgrade-oracle-database-19c-to-26ai&quot;&gt;upgraded our production database from 19c to 26ai&lt;/a&gt;. It went well, but it left me with a question: is the server itself actually set up the way Oracle recommends?&lt;/p&gt;
&lt;p&gt;So this week I installed &lt;strong&gt;AHF&lt;/strong&gt;, the Oracle Autonomous Health Framework, and let it tell me.&lt;/p&gt;
&lt;h2 id=&quot;why-ahf&quot;&gt;Why AHF&lt;/h2&gt;
&lt;p&gt;Our database runs our Oracle APEX apps, the APEX Office Print (AOP) cloud, licensing and the customer portals (the setup is in &lt;a href=&quot;https://dgielis.com/upgrade-oracle-database-19c-to-26ai&quot;&gt;the upgrade post&lt;/a&gt;), so I want to know about problems before our customers do. We know Oracle pretty well at United Codes, but that’s exactly why I like a second view, and AHF is Oracle’s own view on how your server should be set up.&lt;/p&gt;
&lt;p&gt;AHF is Oracle’s own toolset for that. It comes &lt;a href=&quot;https://www.oracle.com/database/technologies/rac/ahf/faq/&quot;&gt;at no extra cost with your Oracle support contract&lt;/a&gt;, and you download the latest version from My Oracle Support (Doc ID 2550798.1). It bundles a few tools, but these are the two I care about:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;ORAchk&lt;/strong&gt; runs hundreds of health checks against the server, the database and the configuration, compares them with Oracle’s best practices and gives you a score with PASS, WARNING and FAIL.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;TFA&lt;/strong&gt; (Trace File Analyzer) watches the alert logs and, when an ORA- error shows up, collects all the diagnostic files around it automatically. That’s exactly what Oracle Support asks for when you open an SR. And we have two SRs to open after the upgrade (the SQL transpiler and the Stripe certificate).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For a lot of our work we use Oracle Autonomous AI Database, and there Oracle does all of this for us. But we also like to have our own servers: for development, to have control over which versions we run, and to test things for customers on the exact setup they have. And on our own server, nobody runs these checks unless we do.&lt;/p&gt;
&lt;h2 id=&quot;installing-it-twice&quot;&gt;Installing it (twice)&lt;/h2&gt;
&lt;p&gt;The first time I did it wrong.&lt;/p&gt;
&lt;p&gt;I downloaded AHF 26.10.2, unzipped it and ran the installer as the &lt;code&gt;oracle&lt;/code&gt; user. It said “AHF is successfully Installed”, so all good, I thought. But look at this line of the output:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;| Host          | Status of TFA | PID | Port    | Version     |&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;| uc-db-server  | RUNNING       | -   | OFFLINE | 26.10.2.0.0 |&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;No PID and the port is OFFLINE. &lt;strong&gt;Installed as a normal user, TFA has no background process.&lt;/strong&gt; You can run &lt;code&gt;orachk&lt;/code&gt; and &lt;code&gt;tfactl&lt;/code&gt; by hand, but nothing watches the alert log and nothing runs on a schedule. Which is the whole point.&lt;/p&gt;
&lt;p&gt;Then I noticed there is an &lt;code&gt;orachk&lt;/code&gt; in the 26ai Oracle Home too, so I thought it came with the database and removed my own install. Wrong again: the &lt;code&gt;orachk&lt;/code&gt;, &lt;code&gt;tfactl&lt;/code&gt; and &lt;code&gt;ahfctl&lt;/code&gt; in &lt;code&gt;$ORACLE_HOME/bin&lt;/code&gt; are only small launcher scripts that look for an AHF installed somewhere else:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;$ORACLE_HOME/bin/orachk -v&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6F42C1;--shiki-dark:#B392F0&quot;&gt;AHF&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; is&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; not&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; installed&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; on&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; this&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; system&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Third time right. &lt;strong&gt;Install it as root:&lt;/strong&gt;&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6F42C1;--shiki-dark:#B392F0&quot;&gt;unzip&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; AHF-LINUX_v26.10.2.zip&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt; -d&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; /tmp/ahf&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt;cd&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; /tmp/ahf&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6F42C1;--shiki-dark:#B392F0&quot;&gt;./ahf_setup&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;As root it installs in &lt;code&gt;/opt/oracle.ahf&lt;/code&gt; and creates a systemd service &lt;code&gt;oracle-tfa&lt;/code&gt;. Now TFA has a PID and a port, and it found the alert logs of both our CDBs (the old 19c one and the new 26ai one) by itself.&lt;/p&gt;
&lt;p&gt;Some numbers, because I wanted to know what it costs:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;1.2 GB on disk, and the repository with collected diagnostics is capped at 10 GB.&lt;/li&gt;
&lt;li&gt;The first scan took one CPU at 100% for about 1.5 minutes. After that it’s idle at 0.3% CPU and about 240 MB of memory.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Small tip: run the AHF commands as root, from &lt;code&gt;/tmp&lt;/code&gt; (&lt;code&gt;cd /tmp&lt;/code&gt; first), and use the ones in &lt;code&gt;/opt/oracle.ahf/bin&lt;/code&gt;, not the launchers in the Oracle Home.&lt;/p&gt;
&lt;h2 id=&quot;scheduling-orachk&quot;&gt;Scheduling ORAchk&lt;/h2&gt;
&lt;p&gt;AHF creates two ORAchk schedules by itself: a small daily one (the &lt;code&gt;oratier1&lt;/code&gt; profile, only the most critical checks) and a full weekly one. I only wanted them to check our 26ai CDB (&lt;code&gt;cdb2&lt;/code&gt;), not the 19c one that we only keep for two old environments. So I changed the flags:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6F42C1;--shiki-dark:#B392F0&quot;&gt;orachk&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt; -id&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; autostart_client_oratier1&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt; -set&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; &quot;AUTORUN_SCHEDULE=3 2 * * 1,2,3,4,5,6;AUTORUN_FLAGS=-usediscovery -profile oratier1 -dbnames cdb2 -showpass -tag autostart_client_oratier1 -readenvconfig;COLLECTION_RETENTION=7&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6F42C1;--shiki-dark:#B392F0&quot;&gt;orachk&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt; -id&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; autostart_client&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt; -set&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; &quot;AUTORUN_SCHEDULE=3 3 * * 0;AUTORUN_FLAGS=-usediscovery -dbnames cdb2 -tag autostart_client -readenvconfig;COLLECTION_RETENTION=14&quot;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;So Monday to Saturday at 02:03 UTC the quick check, and on Sunday at 03:03 UTC the full one. Two gotchas:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The id is without the &lt;code&gt;orachk.&lt;/code&gt; prefix that you see in the &lt;code&gt;-get all&lt;/code&gt; output.&lt;/li&gt;
&lt;li&gt;If you only set &lt;code&gt;AUTORUN_FLAGS&lt;/code&gt;, you have to give &lt;code&gt;AUTORUN_SCHEDULE&lt;/code&gt; again in the same &lt;code&gt;-set&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;the-email-that-never-arrived&quot;&gt;The email that never arrived&lt;/h2&gt;
&lt;p&gt;The next morning the daily run had worked (score 90), but there was no email. In the mail log:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;554 Message rejected: Email address is not verified ... oracle.ahf@uc-db-server&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Our server sends mail through a relay that only accepts senders we verified, and AHF sends as &lt;code&gt;oracle.ahf@&amp;lt;hostname&amp;gt;&lt;/code&gt; by default. The fix is to set a sender address the relay knows:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt;cd&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; /tmp&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6F42C1;--shiki-dark:#B392F0&quot;&gt;tfactl&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; set&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; smtp&lt;/span&gt;&lt;span style=&quot;color:#6A737D;--shiki-dark:#6A737D&quot;&gt;          # set smtp.from to a verified address&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6F42C1;--shiki-dark:#B392F0&quot;&gt;ahfctl&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; sendmail&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt; -to&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; me@example.com&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt; -subject&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; &quot;AHF test&quot;&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt; -body&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; &quot;test&quot;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Note it’s &lt;code&gt;ahfctl sendmail&lt;/code&gt; now, &lt;code&gt;tfactl sendmail&lt;/code&gt; was removed in AHF 22.1. Cool, now it worked.&lt;/p&gt;
&lt;h2 id=&quot;what-orachk-found&quot;&gt;What ORAchk found&lt;/h2&gt;
&lt;p&gt;I didn’t want to wait until Sunday, so I ran a full check by hand (it only reads, so it’s safe during the day):&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt;cd&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; /tmp&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6F42C1;--shiki-dark:#B392F0&quot;&gt;orachk&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt; -usediscovery&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt; -dbnames&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; cdb2&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt; -silentforce&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt; -showpass&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt; -tag&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; manual_full_cdb2&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;It took about 10 minutes. Result: &lt;strong&gt;score 87, 3 FAIL, 18 WARNING, 114 PASS.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;That sounds worse than it is. Many warnings are about RAC, Data Guard, Clusterware and things that don’t apply to a single server. So the real work is reading the report and deciding what matters for &lt;em&gt;your&lt;/em&gt; setup. These were the ones that mattered for us.&lt;/p&gt;
&lt;h3 id=&quot;one-controlfile-one-copy-of-each-redo-log&quot;&gt;One controlfile, one copy of each redo log&lt;/h3&gt;
&lt;p&gt;All on the same disk. If that disk goes, we restore from backup. RMAN controlfile autobackup was on, so we wouldn’t lose the database, but ORAchk recommends a second copy of both on another disk, so you don’t need a restore at all. Cheap to do, so we did it.&lt;/p&gt;
&lt;p&gt;The redo logs you can multiplex while the database runs:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;sql&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;alter&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt; database&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt; add&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt; logfile member &lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;&apos;/u03/oradata/CDB2/onlinelog/redo04b.log&apos;&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt; to&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt; group &lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt;4&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;alter&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt; database&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt; add&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt; logfile member &lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;&apos;/u03/oradata/CDB2/onlinelog/redo05b.log&apos;&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt; to&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt; group &lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt;5&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;alter&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt; database&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt; add&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt; logfile member &lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;&apos;/u03/oradata/CDB2/onlinelog/redo06b.log&apos;&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt; to&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt; group &lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt;6&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;alter&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt; database&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt; add&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt; logfile member &lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;&apos;/u03/oradata/CDB2/onlinelog/redo07b.log&apos;&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt; to&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt; group &lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt;7&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D;--shiki-dark:#6A737D&quot;&gt;-- switch a few times so every new member is written once&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;alter&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt; system&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt; switch logfile;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The second controlfile needs a short restart: add it to &lt;code&gt;control_files&lt;/code&gt; in the spfile, shut down, copy the file, start up. That was about two minutes of downtime for our PDBs, with the maintenance page on. Now every redo group and the controlfile have a copy on a second disk.&lt;/p&gt;
&lt;h3 id=&quot;memory-allocation-fail&quot;&gt;Memory allocation (FAIL)&lt;/h3&gt;
&lt;p&gt;ORAchk added it up: 18.2 GB of HugePages, plus the PGA limits of both CDBs (9 GB + 2 GB), plus 7.6 GB it wants for the OS, is more than the 30.6 GB of RAM in the server.&lt;/p&gt;
&lt;p&gt;In practice PGA use is about 2 GB, so it’s only a problem when a session goes crazy. But we had exactly that before (ORA-04036 kills), so I took it seriously.&lt;/p&gt;
&lt;p&gt;I didn’t want to lower the PGA limits, that brings back the session kills. But the HugePages were more than we needed: 9,300 pages reserved, 8,700 in use. We lowered it to 8,800, which needs no restart because Linux only gives back the free pages:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6F42C1;--shiki-dark:#B392F0&quot;&gt;sysctl&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt; -w&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; vm.nr_hugepages=&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt;8800&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D;--shiki-dark:#6A737D&quot;&gt;# and the same value in /etc/sysctl.d/99-oracle-hugepages.conf for the next reboot&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Available memory went from 9.2 GB to 10.9 GB. One warning: with &lt;code&gt;use_large_pages=ONLY&lt;/code&gt; a database that doesn’t fit in the HugePages won’t start. &lt;strong&gt;If you ever raise &lt;code&gt;sga_target&lt;/code&gt;, raise &lt;code&gt;nr_hugepages&lt;/code&gt; first.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Should we give the SGA more memory then? I looked at the SGA advisor in AWR for the last 5 days: going from 14 GB to 16 GB would save 0.5% DB time. Flat. So we left it.&lt;/p&gt;
&lt;h3 id=&quot;core-dumps-fail&quot;&gt;Core dumps (FAIL)&lt;/h3&gt;
&lt;p&gt;This one I didn’t know. On Oracle Linux, &lt;code&gt;systemd-coredump&lt;/code&gt; catches every process that crashes. Oracle wants to handle that itself, and catching a core dump of a big Oracle process takes time. And remember the transpiler crashes from the upgrade post? Every one of those ORA-07445 crashes went through &lt;code&gt;systemd-coredump&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;We switched it off:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6F42C1;--shiki-dark:#B392F0&quot;&gt;systemctl&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; stop&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; systemd-coredump.socket&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6F42C1;--shiki-dark:#B392F0&quot;&gt;systemctl&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; mask&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; systemd-coredump.socket&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt;echo&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; &quot;kernel.core_pattern = core&quot;&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt; &amp;gt;&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; /etc/sysctl.d/99-oracle-coredump.conf&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D;--shiki-dark:#6A737D&quot;&gt;# /etc/systemd/coredump.conf: Storage=none and ProcessSizeMax=0&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6F42C1;--shiki-dark:#B392F0&quot;&gt;sysctl&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt; --system&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Gotcha: I first put the &lt;code&gt;coredump.conf&lt;/code&gt; settings in a drop-in file, which is the “proper” systemd way. ORAchk only reads the main file and kept warning. You can re-run a single check with &lt;code&gt;orachk -check &amp;lt;check_id&amp;gt;&lt;/code&gt;, which is handy to see if your fix works without waiting 10 minutes. Now all five parts pass. Oracle’s own incident traces are still written, and kdump for kernel crashes is untouched.&lt;/p&gt;
&lt;h3 id=&quot;what-we-left-alone&quot;&gt;What we left alone&lt;/h3&gt;
&lt;p&gt;Not every warning needs a fix. Two I looked at and decided not to change:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;session_cached_cursors&lt;/code&gt; at 100%.&lt;/strong&gt; ORAchk looks at the single busiest session. Of our 152 sessions, none was at the limit, and we had 16.7M cursor cache hits against 4.9M parses. Raising it needs a restart for almost no gain.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Redo logs switching too often&lt;/strong&gt;, with “checkpoint not complete”. All of that was on the day we moved PRD, and the afternoon we multiplexed the redo logs (where we forced switches ourselves). On a normal day we have 9 to 16 switches, so 1 GB is fine. The check looks back 90 days, so it will keep warning for a while.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;And the ones we ignore because they don’t apply: Data Guard, RAC, Clusterware, the cgroup v1 check, the duplicate MLE objects (&lt;code&gt;JAVASCRIPT&lt;/code&gt;, &lt;code&gt;WASM&lt;/code&gt;, normal in 26ai), and &lt;code&gt;db_lost_write_protect=AUTO&lt;/code&gt; (the default in 26ai).&lt;/p&gt;
&lt;p&gt;I think this is the most important part of using ORAchk: &lt;strong&gt;write down why you ignore something&lt;/strong&gt;, so next month you don’t investigate the same warning again.&lt;/p&gt;
&lt;h2 id=&quot;monitoring-from-now-on&quot;&gt;Monitoring from now on&lt;/h2&gt;
&lt;p&gt;This is the routine now:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Every night&lt;/strong&gt; the quick ORAchk run, &lt;strong&gt;every Sunday&lt;/strong&gt; the full one, both by email. The Sunday run is the one I actually read, and I expect the memory and core dump FAILs to be gone.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;TFA watches the alert log&lt;/strong&gt; of both CDBs and collects diagnostics automatically when something goes wrong. I check &lt;code&gt;tfactl events -last 1d&lt;/code&gt; when I look at the server.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;After an incident&lt;/strong&gt;, &lt;code&gt;tfactl diagcollect -last 2h&lt;/code&gt; and I have the zip for the SR, instead of searching trace files myself.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Watch&lt;/strong&gt; that the full Sunday run doesn’t slow down the weekly RMAN level 0 backup, which starts at 02:30. If it does, I move the schedule.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Redo log switches&lt;/strong&gt;: if a normal day shows more than about 4 per hour, we make the logs bigger.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Keep AHF up to date.&lt;/strong&gt; Oracle releases a new version every month, and you upgrade it by running the new &lt;code&gt;ahf_setup&lt;/code&gt; over the old one. Same rhythm as patching the database.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The database server isn’t the whole story for an Oracle APEX app. Every page request goes through &lt;strong&gt;Nginx and ORDS&lt;/strong&gt; first, so we check those too, about every 4 hours: are they up, are there 5xx errors, what’s in the ORDS log, how much memory do the ORDS processes use.&lt;/p&gt;
&lt;h2 id=&quot;ai-watching-our-servers&quot;&gt;AI watching our servers&lt;/h2&gt;
&lt;p&gt;For now I read the ORAchk emails myself. Not because I have to, but because I want to learn AHF: what it checks, what it recommends and which findings matter for us.&lt;/p&gt;
&lt;p&gt;Claude doesn’t read those emails. It logs in to the server, looks at the reports and the logs there directly, and advises me what to do. Next to that we use AI (Claude and Grok), to keep an eye on our servers in general: database, ORDS, Nginx, backups, disk space.&lt;/p&gt;
&lt;p&gt;The long-term goal is that I don’t read the emails at all anymore. An agent checks the reports and the logs, and only bothers me when there is something to look at. We’re not there yet, but that’s the direction. I’ll write about how we monitor our servers with AI in a separate post.&lt;/p&gt;
&lt;h2 id=&quot;an-ai-companion-again&quot;&gt;An AI companion, again&lt;/h2&gt;
&lt;p&gt;Like with the upgrade, I did this with Claude Code next to me. It read the ORAchk reports, checked AWR before every recommendation, and wrote the scripts with a dry run and a rollback. That last part I really like: for the HugePages change it first proved that 8,700 pages were in use before it suggested 8,800.&lt;/p&gt;
&lt;p&gt;It also gave me the old &lt;code&gt;tfactl sendmail&lt;/code&gt; command that doesn’t exist anymore, and a wait loop that never ended because its &lt;code&gt;pgrep&lt;/code&gt; matched itself 😅. So again: it makes you a lot faster, but you’re the one responsible.&lt;/p&gt;
&lt;p&gt;If you run your own Oracle Database, install AHF (as root).&lt;/p&gt;
</content:encoded><category>Oracle APEX &amp; Database</category><category>oracle-apex</category><category>orclapex</category><category>oracle-database</category></item><item><title>Upgrading our Oracle Database from 19c to 26ai</title><link>https://dgielis.com/upgrade-oracle-database-19c-to-26ai</link><guid isPermaLink="true">https://dgielis.com/upgrade-oracle-database-19c-to-26ai</guid><description>Last weekend we moved our production database from 19c to Oracle AI Database 26ai with AutoUpgrade. It&apos;s faster, and I recommend you do it too, but plan well: here are the gotchas we hit, from removed packages to the SQL transpiler and a Stripe certificate.</description><pubDate>Thu, 29 Oct 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;img src=&quot;https://dgielis.com/images/posts/upgrade-oracle-database-19c-to-26ai/autoupgrade-resume.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;&lt;p&gt;Last weekend we moved our production database from Oracle Database 19c to Oracle AI Database 26ai.&lt;/p&gt;
&lt;p&gt;It’s the database behind most of what we run at United Codes: our Oracle APEX apps, the APEX Office Print (AOP) cloud, licensing, customer portals, our blog.&lt;/p&gt;
&lt;p&gt;I’m not a full-time DBA. About 20 years ago I was part of the DBA and experts team at Oracle, but today I mostly manage the team at United Codes. Still, I like to look after our own database, Oracle APEX and ORDS for some of our apps: I want to eat my own dog food and feel what our customers feel. For other environments we use Oracle Autonomous AI Database, which is 100% managed, so there I don’t have to think about any of this.&lt;/p&gt;
&lt;p&gt;Short version: &lt;strong&gt;it works, it’s faster, and I think you should upgrade too.&lt;/strong&gt; But not on a Friday afternoon. Plan it, test it, and expect a few surprises. Here are ours.&lt;/p&gt;
&lt;h2 id=&quot;why-we-upgraded-now&quot;&gt;Why we upgraded now&lt;/h2&gt;
&lt;p&gt;19c served us well, but 26ai is where all the new things are. I already wrote about &lt;a href=&quot;https://dgielis.com/oracle-database-26ai-assertions-in-a-world-cup-betting-app&quot;&gt;assertions in my World Cup betting app&lt;/a&gt;, and there’s a lot more: native JSON, vector search, SQL domains, bigfile tablespace shrink, and the SQL transpiler (more on that one below 😅).&lt;/p&gt;
&lt;h2 id=&quot;the-setup&quot;&gt;The setup&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Source:&lt;/strong&gt; 19.22, one CDB with the PDBs PRD (550 GB), DEV (142 GB) and TST (18 GB), plus two older PDBs with APEX 19.2 and 24.2 that stay on 19c for now.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Target:&lt;/strong&gt; a new CDB on 23.26.4 (that’s the 26ai release number), on the same server.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Oracle APEX:&lt;/strong&gt; 26.2, with ORDS in front. ORDS didn’t need any change, the service names stayed the same.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;We moved the PDBs one by one: &lt;strong&gt;TST first, then DEV, then PRD&lt;/strong&gt;, a few days apart. Every environment taught us something for the next one.&lt;/p&gt;
&lt;h2 id=&quot;autoupgrade-is-a-must&quot;&gt;AutoUpgrade is a must&lt;/h2&gt;
&lt;p&gt;If you take one thing from this post: &lt;strong&gt;use &lt;a href=&quot;https://docs.oracle.com/en/database/oracle/oracle-database/26/upgrd/using-autoupgrade-oracle-database-upgrades.html&quot;&gt;AutoUpgrade&lt;/a&gt;.&lt;/strong&gt; Download the latest &lt;code&gt;autoupgrade.jar&lt;/code&gt; from My Oracle Support, don’t use the one that comes with the software. Mike Dietrich and his team are wonderful at blogging about AutoUpgrade and patching on &lt;a href=&quot;https://mikedietrichde.com&quot;&gt;Upgrade your Database - NOW!&lt;/a&gt;, it’s the best place to learn. Honestly, without their posts I wouldn’t do this myself.&lt;/p&gt;
&lt;p&gt;We even used it to create the 26ai Oracle Home. AutoUpgrade downloads the software and the recommended patches from My Oracle Support itself (your MOS credentials go in its keystore) and installs a home with the latest Release Update already applied. This is the config we used:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;ini&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;global.global_log_dir&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;=/u01/autoupgrade/logs_23264&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;global.keystore&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;=/u01/autoupgrade/keystore&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;install1.patch&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;=RECOMMENDED&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;install1.folder&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;=/u01/software&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;install1.target_home&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;=/u01/app/oracle/product/23.26.4/dbhome_1&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;install1.home_settings.oracle_base&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;=/u01/app/oracle&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;install1.home_settings.edition&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;=EE&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;install1.home_settings.inventory_location&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;=/u01/app/oraInventory&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;install1.target_version&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;=26&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;install1.download&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;=yes&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6F42C1;--shiki-dark:#B392F0&quot;&gt;java&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt; -jar&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; autoupgrade.jar&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt; -config&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; oracle23264.cfg&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt; -patch&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt; -mode&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; download&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6F42C1;--shiki-dark:#B392F0&quot;&gt;java&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt; -jar&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; autoupgrade.jar&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt; -config&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; oracle23264.cfg&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt; -patch&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt; -mode&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; create_home&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This is also why patching isn’t a big deal anymore. And patching is so important these days: the recommendation now is to &lt;strong&gt;patch every month&lt;/strong&gt;. With AutoUpgrade that’s the same few commands every time.&lt;/p&gt;
&lt;p&gt;For the move itself we used &lt;strong&gt;unplug/plug with COPY&lt;/strong&gt;: AutoUpgrade unplugs the PDB from the 19c CDB, copies the datafiles to a new location, plugs it into the 26ai CDB and upgrades it. This is our real config for PRD, and it’s all you need:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;ini&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;global.global_log_dir&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;=/u01/autoupgrade/logs_prd_23264&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D;--shiki-dark:#6A737D&quot;&gt;# Source CDB (19c)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;upg1.source_home&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;=/u01/app/oracle/product/19.0.0/dbhome_1&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;upg1.sid&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;=cdb1&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D;--shiki-dark:#6A737D&quot;&gt;# Target CDB (26ai 23.26.4)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;upg1.target_home&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;=/u01/app/oracle/product/23.26.4/dbhome_1&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;upg1.target_cdb&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;=cdb2&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D;--shiki-dark:#6A737D&quot;&gt;# Only upgrade this PDB&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;upg1.pdbs&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;=PRD&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D;--shiki-dark:#6A737D&quot;&gt;# Copy datafiles to new location (19c files stay on /u02 as fallback)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;upg1.target_pdb_copy_option.PRD&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;file_name_convert&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;=(&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;&apos;/u02/oradata/CDB1/prd&apos;&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;&apos;/u04/oradata/CDB2/prd&apos;&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;upg1.timezone_upg&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;=yes&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;There are way more parameters you can set. For example &lt;code&gt;upg1.run_dictionary_health=critical&lt;/code&gt; runs a health check of the dictionary before the upgrade. The easiest way to build a config is &lt;a href=&quot;https://autoupgrade-composer.com/&quot;&gt;AutoUpgrade Composer&lt;/a&gt;. I also found that AI gets better and better at creating these configs, but Mike always says not to risk that.&lt;/p&gt;
&lt;p&gt;Then always two steps:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6F42C1;--shiki-dark:#B392F0&quot;&gt;java&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt; -jar&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; autoupgrade.jar&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt; -config&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; prd_to_cdb2_23264.cfg&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt; -mode&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; analyze&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6F42C1;--shiki-dark:#B392F0&quot;&gt;java&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt; -jar&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; autoupgrade.jar&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt; -config&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; prd_to_cdb2_23264.cfg&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt; -mode&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; deploy&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Run analyze days before, not minutes before.&lt;/strong&gt; It tells you exactly what will block you (in our case a recycle bin with thousands of objects, a component that gets removed, a maintenance window that overlapped with our upgrade window). Fix it, run analyze again, until it’s clean.&lt;/p&gt;
&lt;p&gt;Why COPY and not upgrading in place? Because &lt;strong&gt;the 19c datafiles stay untouched.&lt;/strong&gt; If something goes really wrong, you plug the old PDB back into 19c and you’re back where you started. It needs double the disk space and takes longer (we got about 125 MB/s, so the copy of PRD alone was over an hour), but for production I find that peace of mind worth it. We keep the 19c files for a week before we delete them.&lt;/p&gt;
&lt;p&gt;Real timings:&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;PDB&lt;/th&gt;
&lt;th&gt;Size&lt;/th&gt;
&lt;th&gt;Total&lt;/th&gt;
&lt;th&gt;Of which the upgrade&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;TST&lt;/td&gt;
&lt;td&gt;18 GB&lt;/td&gt;
&lt;td&gt;~1h&lt;/td&gt;
&lt;td&gt;36 min&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;DEV&lt;/td&gt;
&lt;td&gt;142 GB&lt;/td&gt;
&lt;td&gt;~1h40&lt;/td&gt;
&lt;td&gt;38 min&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;PRD&lt;/td&gt;
&lt;td&gt;550 GB&lt;/td&gt;
&lt;td&gt;~2h20&lt;/td&gt;
&lt;td&gt;with an interruption, see below&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;Plus the time for your own checks. We put a maintenance page in front of the apps for the PRD move, on a Saturday night.&lt;/p&gt;
&lt;h2 id=&quot;clean-up-before-you-upgrade&quot;&gt;Clean up before you upgrade&lt;/h2&gt;
&lt;p&gt;The upgrade itself is mostly AutoUpgrade’s job. Most of our work was before it.&lt;/p&gt;
&lt;p&gt;On 19c, PRD had &lt;strong&gt;993 invalid objects&lt;/strong&gt;. Old test packages, code against tables that were dropped years ago, an old APEX schema that was never removed. You don’t want to find out after the upgrade which invalid objects are “normal” and which ones the upgrade broke. So we cleaned up until PRD had &lt;strong&gt;0 invalid objects&lt;/strong&gt;, then upgraded.&lt;/p&gt;
&lt;p&gt;What we did before the move:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Dropped old Oracle APEX schemas (&lt;code&gt;APEX_240200&lt;/code&gt; and the like) that were still sitting there next to the current version.&lt;/li&gt;
&lt;li&gt;Removed dead code and old versions of packages, with a backup of the DDL first.&lt;/li&gt;
&lt;li&gt;Purged the recycle bin.&lt;/li&gt;
&lt;li&gt;Gathered dictionary statistics.&lt;/li&gt;
&lt;li&gt;Fixed the code that we knew would break on 26ai (next section).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Tip: &lt;strong&gt;keep a list of your invalid objects per environment before the move.&lt;/strong&gt; Then you compare after the move and you immediately see what’s new.&lt;/p&gt;
&lt;h2 id=&quot;code-that-breaks-on-26ai&quot;&gt;Code that breaks on 26ai&lt;/h2&gt;
&lt;p&gt;TST and DEV showed us what would break in PRD. These were the real ones:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;DBMS_OBFUSCATION_TOOLKIT&lt;/code&gt; is gone.&lt;/strong&gt; It’s &lt;a href=&quot;https://docs.oracle.com/en/database/oracle/oracle-database/26/upgrd/oracle-database-changes-deprecations-desupports.html&quot;&gt;desupported since 21c&lt;/a&gt;, so coming from 19c this is the moment it hits you. We used it in some old license and password code. Rewriting to &lt;code&gt;DBMS_CRYPTO&lt;/code&gt; is easy, getting the &lt;em&gt;same output&lt;/em&gt; is not. For DES the default zero IV matched the old toolkit. For 3DES we needed the IV &lt;code&gt;0123456789ABCDEF&lt;/code&gt;, otherwise not a single hash matched. We proved it on 19c first, with the old and the new function side by side on the real data, before we touched anything.&lt;/li&gt;
&lt;/ul&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;sql&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;l_encrypted :&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt; dbms_crypto&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt;encrypt&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;                 src &lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt; l_input,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;                 typ &lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt; dbms_crypto&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt;encrypt_3des_2key&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;                      +&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt; dbms_crypto&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt;chain_cbc&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;                      +&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt; dbms_crypto&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt;pad_none&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;                 key&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt; =&amp;gt;&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt; l_key,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;                 iv  &lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt; hextoraw(&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;&apos;0123456789ABCDEF&apos;&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;));&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Java stored procedures&lt;/strong&gt; that import &lt;code&gt;oracle.jdbc2.*&lt;/code&gt; don’t compile anymore. Removing the import was enough in our case.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Old PL/JSON types.&lt;/strong&gt; An old app still had the PL/JSON library from before Oracle had native JSON support, with types named &lt;code&gt;JSON&lt;/code&gt; and &lt;code&gt;JSON_VALUE&lt;/code&gt;. That clashes with the native JSON type. Nothing used it anymore, so we dropped it.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Old wrapped packages&lt;/strong&gt; that use conditional compilation failed with PLS-00174. We replaced them with the current version of those packages (in our case APEX Office Print, which we upgraded anyway).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;SQL macros&lt;/strong&gt; came out invalid after the upgrade (ORA-62565). That’s not a bug in your code: the parallel recompile (&lt;code&gt;utl_recomp&lt;/code&gt;) compiles the macro and the code that uses it at the same time. A second, serial compile fixes it. Run one after every upgrade.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;DBMS_CLOUD&lt;/strong&gt;, which we had installed by hand on 19c, had to be removed and reinstalled with the scripts from the 26ai home.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;None of these is hard. But you want to find them in TST, not in production at 3 in the morning.&lt;/p&gt;
&lt;h2 id=&quot;the-prd-night&quot;&gt;The PRD night&lt;/h2&gt;
&lt;p&gt;The PRD upgrade stopped halfway with &lt;strong&gt;ORA-04031 on the java pool&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Our new CDB was still running with a small SGA, because the 19c CDB was using most of the memory of the server. The plan was to switch the memory after the move. That was a mistake: the upgrade itself needs memory. We did the memory switch right there, set &lt;code&gt;java_pool_size&lt;/code&gt; and &lt;code&gt;shared_pool_size&lt;/code&gt; explicitly, and restarted the same AutoUpgrade command.&lt;/p&gt;
&lt;p&gt;This is something I really like about AutoUpgrade. The upgrade had stopped at 96%, and I ran exactly the same command again. AutoUpgrade saw the unfinished job, added the &lt;code&gt;-resume&lt;/code&gt; option itself, continued from 53% (it redoes the phase that failed, not the whole upgrade) and finished 30 minutes later:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://dgielis.com/images/posts/upgrade-oracle-database-19c-to-26ai/autoupgrade-resume.webp&quot; alt=&quot;AutoUpgrade resuming the PRD upgrade after the ORA-04031 error&quot;&gt;&lt;/p&gt;
&lt;p&gt;Lesson: &lt;strong&gt;give the target CDB its final memory before the upgrade&lt;/strong&gt;, not after.&lt;/p&gt;
&lt;h2 id=&quot;the-stripe-certificate&quot;&gt;The Stripe certificate&lt;/h2&gt;
&lt;p&gt;The next morning our payment code failed. Every call from PL/SQL to &lt;code&gt;api.stripe.com&lt;/code&gt; with &lt;code&gt;UTL_HTTP&lt;/code&gt; gave &lt;strong&gt;ORA-29024: Certificate validation failure.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Same wallet as on 19c, where it worked. We added the exact root and intermediate certificates, it kept failing on 26ai.&lt;/p&gt;
&lt;p&gt;In 26ai the database can use the certificates of the operating system, so you don’t need a wallet anymore for public websites. &lt;a href=&quot;https://oracle-base.com/articles/23c/transport-layer-security-tls-connections-without-a-client-wallet-23c&quot;&gt;Tim Hall&lt;/a&gt; and &lt;a href=&quot;https://connor-mcdonald.com/2024/05/04/23ai-leave-your-wallet-at-home/&quot;&gt;Connor McDonald&lt;/a&gt; wrote about it, and both mention that once you reference a wallet, that wallet wins. So before writing this post I tested it again, in TST, with a simple request to Stripe without an API key (a 401 means the TLS part worked):&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Test&lt;/th&gt;
&lt;th&gt;&lt;code&gt;www.oracle.com&lt;/code&gt;&lt;/th&gt;
&lt;th&gt;&lt;code&gt;api.stripe.com&lt;/code&gt;&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;No wallet&lt;/td&gt;
&lt;td&gt;ORA-29024&lt;/td&gt;
&lt;td&gt;ORA-29024&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;utl_http.set_wallet(&apos;system:&apos;)&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;HTTP 403, TLS OK&lt;/td&gt;
&lt;td&gt;ORA-29024&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Our own wallet file&lt;/td&gt;
&lt;td&gt;not tested&lt;/td&gt;
&lt;td&gt;ORA-29024&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;curl&lt;/code&gt; on the same server&lt;/td&gt;
&lt;td&gt;not tested&lt;/td&gt;
&lt;td&gt;HTTP 401, TLS OK&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;Two things I learned from this:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;“No wallet” didn’t mean “use the operating system” for us.&lt;/strong&gt; AutoUpgrade had copied the &lt;code&gt;sqlnet.ora&lt;/code&gt; settings of the 19c home into the new home, including &lt;code&gt;WALLET_LOCATION&lt;/code&gt;. So without a wallet in PL/SQL, the database still used our old wallet file. Check the &lt;code&gt;sqlnet.ora&lt;/code&gt; in your new home after the upgrade. With &lt;code&gt;system:&lt;/code&gt; you explicitly ask for the operating system certificates.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Stripe still fails, even with &lt;code&gt;system:&lt;/code&gt;,&lt;/strong&gt; while &lt;code&gt;curl&lt;/code&gt; with the same operating system certificates on the same server works fine. Stripe sends five certificates with two cross-signed paths (to the DigiCert Assured ID Root G2 and the TLS RSA4096 Root G5). I believe the TLS validation in 23.26.4 doesn’t handle that, so this one is for Oracle.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Our workaround: an nginx proxy on our web server that forwards to Stripe and does the TLS validation with the operating system certificates. The database calls the proxy, the proxy calls Stripe. Only the database server is allowed to use it.&lt;/p&gt;
&lt;p&gt;If you do the same, a warning: Stripe sends the secret key as the username in Basic authentication. &lt;strong&gt;Don’t log &lt;code&gt;$remote_user&lt;/code&gt; in nginx&lt;/strong&gt;, or your secret key ends up in a log file.&lt;/p&gt;
&lt;p&gt;We’ll open an SR with Oracle for this. But my advice: &lt;strong&gt;test every external HTTPS call&lt;/strong&gt; your database makes (payment providers, email APIs, AI APIs, webhooks) on 26ai before you move production.&lt;/p&gt;
&lt;h2 id=&quot;the-sql-transpiler&quot;&gt;The SQL transpiler&lt;/h2&gt;
&lt;p&gt;This is the one I was most excited about, and the one that bit us the hardest.&lt;/p&gt;
&lt;p&gt;The SQL transpiler turns simple PL/SQL functions that you call inside SQL into plain SQL expressions, so there’s no switch between SQL and PL/SQL anymore. Oracle APEX apps are full of &lt;code&gt;where my_pkg.my_function(x) = ...&lt;/code&gt;, so in theory this is free performance. It’s off by default, you switch it on with:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;sql&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;alter&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt; system&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt; set&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt; sql_transpiler &lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt; on&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;We switched it on in DEV, TST and PRD on Sunday evening. &lt;strong&gt;Without testing it in DEV first.&lt;/strong&gt; My decision, and in hindsight not a good one.&lt;/p&gt;
&lt;p&gt;36 minutes later the first sessions started crashing with ORA-07445 (a core dump), in PRD. In DEV we saw ORA-06544 errors in the APEX Builder. Every incident had the transpiler in the call stack. One of the queries that crashed the most was the one behind our blog overview page: old SQL with string manipulation on bind variables and &lt;code&gt;replace(:1, ...)&lt;/code&gt; in the where clause. Not the most beautiful code in our database, I admit.&lt;/p&gt;
&lt;p&gt;Switching it off fixed it immediately, no restart needed:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;sql&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;alter&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt; session&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt; set&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt; container &lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt; PRD;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;alter&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt; system&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt; set&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt; sql_transpiler&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;=off&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt; scope&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;=both&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I believe the transpiler is a great idea, and a crash is a bug on Oracle’s side, so this one goes into an SR too. But it shows the point: &lt;strong&gt;features that rewrite your SQL hit your oldest and ugliest code first.&lt;/strong&gt; Turn them on per session in DEV, run your heavy pages, and only then go further.&lt;/p&gt;
&lt;h2 id=&quot;stricter-datatypes-for-bind-variables&quot;&gt;Stricter datatypes for bind variables&lt;/h2&gt;
&lt;p&gt;26ai is stricter about datatypes in &lt;code&gt;CASE&lt;/code&gt; expressions. It follows the SQL standard now, and the optimizer can rewrite a simple &lt;code&gt;case x when ...&lt;/code&gt; into a searched &lt;code&gt;case when x = ...&lt;/code&gt;. So a query that compares a &lt;code&gt;VARCHAR2&lt;/code&gt; bind variable with a &lt;code&gt;NUMBER&lt;/code&gt; column inside a &lt;code&gt;CASE&lt;/code&gt;, which worked fine on 19c thanks to implicit conversion, can now fail with:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;ORA-00932: expression (:1) is of data type CHAR, which is incompatible with expected data type NUMBER&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Oracle APEX apps are full of this: page items are strings, and we compare them to numbers and dates all the time without a &lt;code&gt;to_number&lt;/code&gt; or &lt;code&gt;to_date&lt;/code&gt;. Connor McDonald explains it well in &lt;a href=&quot;https://connor-mcdonald.com/2026/01/28/datatype-discipline-even-more-so-in-26ai/&quot;&gt;his post on datatype discipline in 26ai&lt;/a&gt;, and he also gives the workaround we used, to loosen it again:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;sql&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;alter&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt; system&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt; set&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; &quot;_fix_control&quot;&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; &apos;33898336:0&apos;&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt; scope &lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt; both&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;See it as a temporary fix, not the solution. The real fix is in your code: &lt;strong&gt;convert your page items explicitly&lt;/strong&gt; to the datatype you compare them with. And because it’s an underscore parameter, check with Oracle Support before you set it in production.&lt;/p&gt;
&lt;h2 id=&quot;watch-the-statistics-job&quot;&gt;Watch the statistics job&lt;/h2&gt;
&lt;p&gt;One more, because it can take down your server. On 23.26.4 the statistics gathering (the nightly auto optimizer stats job, but also &lt;code&gt;gather_dictionary_stats&lt;/code&gt;) grew a single session to &lt;strong&gt;9.6 GB of PGA&lt;/strong&gt;. On a 32 GB server that runs into the PGA limit and other sessions get killed with ORA-04036.&lt;/p&gt;
&lt;p&gt;Gathering statistics table by table with &lt;code&gt;gather_table_stats&lt;/code&gt; was fine. For the automatic job we set a PGA limit for the autotask sessions with Resource Manager (&lt;code&gt;session_pga_limit&lt;/code&gt; on the &lt;code&gt;ORA$AUTOTASK&lt;/code&gt; consumer group), so if it happens again only that session stops.&lt;/p&gt;
&lt;p&gt;So after the upgrade, keep an eye on PGA for a few nights, especially during the maintenance windows.&lt;/p&gt;
&lt;h2 id=&quot;was-it-worth-it&quot;&gt;Was it worth it?&lt;/h2&gt;
&lt;p&gt;Yes.&lt;/p&gt;
&lt;p&gt;We compared the same SQL statements in AWR before and after. 76 statements that ran in both databases used almost an hour (3,520 seconds) less database time over the same hours. The query behind every Oracle APEX page request, &lt;code&gt;route_friendly_url&lt;/code&gt;, went from 65 ms to 39 ms, with seven times fewer buffer gets. That’s on one Sunday, so I’ll compare again after a normal working week, but it’s a very good start.&lt;/p&gt;
&lt;p&gt;And on 19c we had a PL/SQL JSON memory leak that killed a few sessions a day. Since the move, those JSON leak kills haven’t come back. I’m careful to call that fixed after a few days, but so far so good.&lt;/p&gt;
&lt;h2 id=&quot;an-ai-companion&quot;&gt;An AI companion&lt;/h2&gt;
&lt;p&gt;I didn’t do this alone. I had Claude (Claude Code) next to me during the whole project: it read the AutoUpgrade logs, wrote the clean-up scripts, compared the invalid objects, dug through incident traces and found the transpiler in the call stacks at 4 in the morning.&lt;/p&gt;
&lt;p&gt;It felt really nice to have an AI companion looking over my shoulder and guiding me. It’s fast, it doesn’t get tired, and it remembers every gotcha from TST when you’re doing PRD.&lt;/p&gt;
&lt;p&gt;But in the end, &lt;strong&gt;you, the person doing it, are still the one responsible.&lt;/strong&gt; The AI makes mistakes too. The dictionary statistics run that blew up the PGA was its idea, and in production I ran most of the commands myself, after reading them. So use it, it makes you a lot faster, but know what you do.&lt;/p&gt;
&lt;h2 id=&quot;my-advice&quot;&gt;My advice&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Use AutoUpgrade&lt;/strong&gt;, run analyze early and often.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Go TST, DEV, PRD&lt;/strong&gt;, and give it a few days between each.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Clean up first:&lt;/strong&gt; get to zero invalid objects, so you know what the upgrade broke.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Keep a way back.&lt;/strong&gt; For us that was COPY and leaving the 19c files in place.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Size the memory of the new CDB before the upgrade.&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Test every outgoing HTTPS call&lt;/strong&gt; from the database.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Turn on new features one at a time&lt;/strong&gt;, in DEV first. Yes, I’m talking to myself here.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Watch the server for a week:&lt;/strong&gt; alert log, PGA, scheduler jobs that fail.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Patch every month&lt;/strong&gt; once you’re on 26ai. AutoUpgrade makes it easy.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;We have a much longer runbook for our own setup, with every script and check in it. Most of it is very specific to our environment, so I didn’t put it here. If you’re planning your upgrade and want to compare notes, let me know.&lt;/p&gt;
&lt;p&gt;Happy upgrading!&lt;/p&gt;
</content:encoded><category>Oracle APEX &amp; Database</category><category>oracle-apex</category><category>orclapex</category><category>oracle-database</category><category>plsql</category></item><item><title>Keep your Oracle APEX up-to-date in the AI era</title><link>https://dgielis.com/keep-oracle-apex-up-to-date-in-the-ai-era</link><guid isPermaLink="true">https://dgielis.com/keep-oracle-apex-up-to-date-in-the-ai-era</guid><description>The October 2026 Critical Patch Update fixes a 9.8 Oracle APEX vulnerability that needs no login. With AI finding bugs and writing exploits in minutes, staying current is the only real defense. How to check your versions and which patch level you need.</description><pubDate>Sat, 24 Oct 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;img src=&quot;https://dgielis.com/images/posts/keep-oracle-apex-up-to-date-in-the-ai-era/cover.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;&lt;p&gt;This week Oracle released the October 2026 Critical Patch Update, and it contains a really bad one for Oracle APEX.&lt;/p&gt;
&lt;p&gt;A 9.8 out of 10, exploitable over HTTPS, without logging in. Somebody who finds your APEX URL can take over APEX completely.&lt;/p&gt;
&lt;p&gt;And it’s not just APEX. The same week, PHP had one of the worst security releases in its history. Two flaws, nicknamed &lt;a href=&quot;https://www.helpnetsecurity.com/2026/10/21/php2shell-php-vulnerabilities-patched-cve-2026-109618-cve-2026-109619/&quot;&gt;PHP2Shell&lt;/a&gt; (CVE-2026-109618 and CVE-2026-109619), allow remote code execution without logging in on basically every PHP installation that serves web pages. That means WordPress, Drupal, Joomla and almost anything else built on PHP.&lt;/p&gt;
&lt;p&gt;What struck me most:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The researchers at &lt;a href=&quot;https://www.wiz.io&quot;&gt;Wiz&lt;/a&gt;, a cloud security company that published how the exploit works, said frontier AI models “substantially reduced” the effort to turn this decades-old flaw into a working exploit.&lt;/li&gt;
&lt;li&gt;Amazon saw a first exploitation attempt four days &lt;em&gt;before&lt;/em&gt; the fix was public, and &lt;a href=&quot;https://unit42.paloaltonetworks.com/cve-2026-109618-cve-2026-109619/&quot;&gt;Unit 42&lt;/a&gt; found over 22.6 million potentially vulnerable instances.&lt;/li&gt;
&lt;li&gt;Attackers used agentic AI platforms after breaking in. At a European government entity they had password hashes and MFA secrets within two hours.&lt;/li&gt;
&lt;li&gt;Here in Belgium, the Federal Public Service Foreign Affairs &lt;a href=&quot;https://ebuildersecurity.se/en/cyber-news/php2shell-government-websites-offline-europe/&quot;&gt;took its websites offline&lt;/a&gt; as a precaution, and governments in Germany, France, the Netherlands, Finland and the Czech Republic pulled sites too. Our Centre for Cybersecurity said it had seen no attacks on Belgian sites, but when a government’s answer is “turn it off”, you know it’s serious.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I believe this is only the start.&lt;/p&gt;
&lt;p&gt;As an Oracle APEX developer I was happy, for once, that none of our stack runs on PHP. But the bigger reason I’m glad we’re on Oracle APEX is that there’s a vendor behind it with a security team and a regular patch rhythm:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Oracle Database&lt;/strong&gt; gets a Release Update every quarter, in line with the Critical Patch Updates (January, April, July, October). On Linux, 19c and 26ai also get Monthly Recommended Patches (MRPs) on top of the Release Update, and on other platforms there are Critical Security Patch Updates (CSPUs) for urgent security fixes. &lt;a href=&quot;https://mikedietrichde.com/2026/06/09/cpu-cspu-mrp-ru-some-clarifications/&quot;&gt;Mike Dietrich explains the difference&lt;/a&gt; on his Upgrade your Database - NOW! blog, and his advice is to go to the latest Release Update plus the latest MRP.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Oracle APEX&lt;/strong&gt; is not tied to the database release. You install and upgrade it separately, and Oracle ships a Patch Set Bundle whenever there’s something to fix, not just once a quarter. So you can be on the latest APEX patch even when your database upgrade is still months away.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;All of that is only worth something if you actually install the patches, though.&lt;/p&gt;
&lt;h2 id=&quot;why-this-is-different-now&quot;&gt;Why this is different now&lt;/h2&gt;
&lt;p&gt;For years, a lot of companies treated Oracle APEX upgrades as “nice to have”. The app works, the users are happy, why touch it? Patching happened once a year, or when somebody had time.&lt;/p&gt;
&lt;p&gt;That worked (sort of) because finding a vulnerability and turning it into a working exploit took time and skill.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;AI changed that.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The same AI models I use every day to build apps are very good at reading code, finding bugs and explaining how to abuse them. What used to take a skilled person weeks now takes somebody with a prompt an afternoon. When Oracle publishes a security advisory, you should assume someone has a working exploit soon after, if not the same day.&lt;/p&gt;
&lt;p&gt;So the window between “Oracle released a fix” and “someone is attacking unpatched systems” is getting very small.&lt;/p&gt;
&lt;p&gt;I think there is only one real answer: &lt;strong&gt;keep current&lt;/strong&gt;. Not only Oracle APEX, but your whole environment: ORDS, the database, Java, the web server or load balancer in front of it, and the plug-ins and libraries in your apps.&lt;/p&gt;
&lt;h2 id=&quot;whats-in-the-october-2026-cpu-for-oracle-apex&quot;&gt;What’s in the October 2026 CPU for Oracle APEX&lt;/h2&gt;
&lt;p&gt;There are two Oracle APEX vulnerabilities, and they don’t affect the same versions:&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;CVE&lt;/th&gt;
&lt;th&gt;Score&lt;/th&gt;
&lt;th&gt;What&lt;/th&gt;
&lt;th&gt;Affected versions&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;https://www.cve.org/CVERecord?id=CVE-2026-101521&quot;&gt;CVE-2026-101521&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;9.8&lt;/td&gt;
&lt;td&gt;No login needed, over HTTPS, full takeover of APEX&lt;/td&gt;
&lt;td&gt;24.1.0–24.1.21, 24.2.0–24.2.20, 26.1.0–26.1.4&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;https://www.cve.org/CVERecord?id=CVE-2026-66010&quot;&gt;CVE-2026-66010&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;6.1&lt;/td&gt;
&lt;td&gt;Flaw in DOMPurify (the HTML-cleaning library APEX uses), needs user interaction&lt;/td&gt;
&lt;td&gt;24.1.0–24.1.19, 24.2.0–24.2.18, 26.1.0–26.1.2&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;The details are in Oracle’s &lt;a href=&quot;https://www.oracle.com/security-alerts/cpuoct2026verbose.html&quot;&gt;risk matrix&lt;/a&gt; and the &lt;a href=&quot;https://blogs.oracle.com/security/october-2026-critical-patch-update-released&quot;&gt;security blog post&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The same CPU has &lt;strong&gt;35 patches for ORDS&lt;/strong&gt; (24.2.0 up to 26.2.2). Eleven of them can be exploited without logging in, the worst one scores 8.8. So patching APEX alone is not enough, ORDS needs an update too.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://x.com/phartenfeller/status/2112083876235354432&quot;&gt;Philipp Hartenfeller&lt;/a&gt; called it “really bad”, and I agree.&lt;/p&gt;
&lt;h2 id=&quot;which-version-should-you-be-on&quot;&gt;Which version should you be on?&lt;/h2&gt;
&lt;p&gt;After this CPU, these are the versions I consider safe:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;24.1.22&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;24.2.21&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;26.1.5&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;26.2&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Anything else has known issues. Either it’s an older patch level of a supported release (patch it), or it’s a release that is not supported anymore and won’t get a fix at all.&lt;/p&gt;
&lt;p&gt;And keep the support dates in mind. Oracle supports a release for roughly 18 months, and only the current release plus the two before it:&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Oracle APEX release&lt;/th&gt;
&lt;th&gt;Support ends&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;26.2&lt;/td&gt;
&lt;td&gt;April 2028&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;26.1&lt;/td&gt;
&lt;td&gt;November 2027&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;24.2&lt;/td&gt;
&lt;td&gt;July 2027&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;24.1&lt;/td&gt;
&lt;td&gt;December 2026&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;23.2&lt;/td&gt;
&lt;td&gt;May 2026 (ended)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;If you’re on 24.1, patching to 24.1.22 fixes this CVE, but support ends in two months. I would use this moment to plan the upgrade.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Anything before 24.1 is unsupported, and Oracle is not going to provide a patch for it.&lt;/strong&gt; Don’t read the affected versions in the advisory as “23.2 is fine”. Oracle only lists the releases it still supports, so older releases simply aren’t assessed. I would assume they have the same security issues, and they will stay open. If you’re on 23.2 or older, the only fix is to upgrade.&lt;/p&gt;
&lt;p&gt;Sources: &lt;a href=&quot;https://www.oracle.com/apex/&quot;&gt;Oracle APEX&lt;/a&gt; and the &lt;a href=&quot;https://www.oracle.com/assets/lsp-tech-chart-069290.pdf&quot;&gt;Oracle Lifetime Support Policy&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&quot;how-to-check-your-versions&quot;&gt;How to check your versions&lt;/h2&gt;
&lt;p&gt;You’d be surprised how many teams don’t know which patch level they run. In the Oracle APEX Builder, click the help icon and &lt;strong&gt;About&lt;/strong&gt;, or in SQL:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;sql&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;select&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt; version_no &lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;from&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt; apex_release;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;select&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt; patch_number, patch_version, installed_on&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;  from&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt; apex_patches&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt; order by&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt; installed_on &lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;desc&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;code&gt;version_no&lt;/code&gt; gives the full patch level, for example &lt;code&gt;26.1.4&lt;/code&gt;, and &lt;code&gt;apex_patches&lt;/code&gt; shows when which patch was installed.&lt;/p&gt;
&lt;p&gt;For ORDS, run this on the server:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6F42C1;--shiki-dark:#B392F0&quot;&gt;ords&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt; --version&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;or check it in the database (the view is granted to PUBLIC):&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;sql&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;select&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt; version&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;, previous_version, updated_on&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;  from&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt; ords_metadata&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt;ords_version&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This gives you something like &lt;code&gt;26.3.0.r2721811&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Do this for every environment: development, test, production, and that one forgotten instance somebody set up years ago. That forgotten one is usually the one that’s exposed.&lt;/p&gt;
&lt;h2 id=&quot;patch-or-jump-to-262&quot;&gt;Patch or jump to 26.2?&lt;/h2&gt;
&lt;p&gt;26.2 is not affected by the 9.8 vulnerability, so it’s tempting to go there directly. But it’s not always the simplest move today:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;26.2 is on-premises only at the moment.&lt;/li&gt;
&lt;li&gt;Some features are gone, for example the Advisor and SQL Workshop RESTful Services. Check if you rely on them.&lt;/li&gt;
&lt;li&gt;You want to test your apps and plug-ins first. In my &lt;a href=&quot;https://dgielis.com/upgrade-apex-24-1-app-to-apex-26-1&quot;&gt;upgrade from 24.1 to 26.1&lt;/a&gt; I ran into a metadata issue I didn’t expect.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;So my advice: &lt;strong&gt;patch now, upgrade smart&lt;/strong&gt;. Apply the patch set for the release you’re on this week. Then plan the move to 26.2 properly, with a test environment and a checklist, instead of doing it in a hurry.&lt;/p&gt;
&lt;h2 id=&quot;make-it-a-habit&quot;&gt;Make it a habit&lt;/h2&gt;
&lt;p&gt;The real lesson is not this one CVE. There will be another one next quarter, and with AI in the picture, probably more than before.&lt;/p&gt;
&lt;p&gt;What I recommend:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Know what you run: an inventory of Oracle APEX, ORDS, database and Java versions for every environment.&lt;/li&gt;
&lt;li&gt;Follow the &lt;a href=&quot;https://www.oracle.com/security-alerts/&quot;&gt;Oracle Critical Patch Updates&lt;/a&gt;: they come out quarterly (January, April, July, October), plan the patch window upfront.&lt;/li&gt;
&lt;li&gt;Don’t stay more than one release behind on Oracle APEX. Upgrades are much easier in small steps.&lt;/li&gt;
&lt;li&gt;Keep an eye on the libraries and plug-ins inside your apps too. CVE-2026-66010 is in DOMPurify, not in Oracle’s own code.&lt;/li&gt;
&lt;li&gt;Have a quick smoke test for your apps, so patching becomes boring routine instead of a risky project.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If you don’t have the time or people to do this, at &lt;a href=&quot;https://www.united-codes.com&quot;&gt;United Codes&lt;/a&gt; we added this to our Oracle APEX health check: we check your versions, patch Oracle APEX and ORDS, run smoke tests, and look at how ready you are for 26.2, including APEX Office Print and plug-in compatibility.&lt;/p&gt;
&lt;p&gt;But whoever does it, please patch this week.&lt;/p&gt;
</content:encoded><category>Oracle APEX &amp; Database</category><category>oracle-apex</category><category>orclapex</category><category>oracle-database</category><category>ords</category><category>security</category><category>ai</category></item><item><title>Every Agent gets its own Database #JoelKallmanDay</title><link>https://dgielis.com/every-agent-gets-its-own-database-joelkallmanday</link><guid isPermaLink="true">https://dgielis.com/every-agent-gets-its-own-database-joelkallmanday</guid><description>Give every ticket, and every AI agent, its own Oracle Database in seconds: a snapshot copy of a golden PDB with its own schema, data and Oracle APEX workspace, with SQL or over ORDS REST.</description><pubDate>Wed, 14 Oct 2026 17:05:51 GMT</pubDate><content:encoded>&lt;p&gt;&lt;img src=&quot;https://dgielis.com/images/posts/every-agent-gets-its-own-database-joelkallmanday/5409be66-64b6-45b3-9537-745abd209a38-8f9d3b95.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;&lt;h2 id=&quot;why-every-agent-needs-its-own-database&quot;&gt;Why every agent needs its own database&lt;/h2&gt;
&lt;p&gt;In my series &lt;a href=&quot;https://dgielis.com/series/apex-developer-reinvented&quot;&gt;The APEX Developer Reinvented&lt;/a&gt; I’m rebuilding my World Cup prediction app with AI in the loop. In the &lt;a href=&quot;https://dgielis.com/the-apex-developer-reinvented&quot;&gt;first post&lt;/a&gt; I said the Oracle APEX developer becomes a designer, orchestrator and validator. Orchestrating one agent is easy. Orchestrating a few of them at the same time, on the same Oracle Database, is where it gets interesting.&lt;/p&gt;
&lt;p&gt;An agent writes SQL, changes tables and builds APEX pages. It will try things, and sometimes it will break things. If all agents share one dev schema, they get in each other’s way.&lt;/p&gt;
&lt;p&gt;What I want is simple: every ticket gets its own database. Created in seconds, thrown away after the merge. Git gave us worktrees for code: a separate copy per task, sharing the same history. The Oracle Database has them for data, and it’s one clause: &lt;code&gt;SNAPSHOT COPY&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id=&quot;what-snapshot-copy-does&quot;&gt;What SNAPSHOT COPY does&lt;/h2&gt;
&lt;p&gt;A normal clone of a pluggable database copies every datafile. A &lt;a href=&quot;https://docs.oracle.com/en/database/oracle/oracle-database/23/multi/overview-of-pdb-creation.html&quot;&gt;snapshot copy&lt;/a&gt; doesn’t. The new PDB points to the files of its source and only stores the blocks that change.&lt;/p&gt;
&lt;p&gt;You still get a real PDB: its own users, its own data, its own APEX workspace. An agent connects to it like to any other database. On my dev box a clone is ready in about 20 seconds and takes about 400 KB on disk. Pretty cool!&lt;/p&gt;
&lt;h2 id=&quot;start-from-a-golden-pdb&quot;&gt;Start from a golden PDB&lt;/h2&gt;
&lt;p&gt;Every worktree starts from a golden PDB: your schema, your APEX app, reference data and some masked test data. Three rules:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;The golden is a full clone, never a snapshot copy itself.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;It stays read only. But a brand-new PDB can’t go read only straight away: open it read write once first, or you get &lt;code&gt;ORA-65085: cannot open pluggable database in read-only mode&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Never take a snapshot copy of a PDB you still work in. Oracle makes the source datafiles read only, so that PDB won’t open read write anymore: &lt;code&gt;ORA-65009: cannot open pluggable database in read-write mode&lt;/code&gt;. That’s why the golden is a separate PDB.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;You don’t need special storage. On Exadata (Exascale) or ACFS the source could even stay read write, but on a plain xfs file system &lt;code&gt;clonedb=TRUE&lt;/code&gt; (database setting) is all you need. That’s what I use. And a frozen, read-only golden is exactly what you want for agents anyway.&lt;/p&gt;
&lt;h2 id=&quot;one-database-per-ticket&quot;&gt;One database per ticket&lt;/h2&gt;
&lt;p&gt;This is how we work today. Every ticket gets its own environment: a snapshot copy of the golden PDB. Whether a developer or an agent picks up the ticket, it gets its own schema, data, APEX workspace and &lt;code&gt;ORDS_METADATA&lt;/code&gt;, at &lt;code&gt;/ords/&amp;lt;pdb&amp;gt;/&lt;/code&gt;. No ORDS configuration, no restart.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://dgielis.com/images/posts/every-agent-gets-its-own-database-joelkallmanday/3f2f9236-d051-4b8d-9a52-069db2ad2c58-a78501b2.webp&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Work on ticket &lt;code&gt;UCHD-16&lt;/code&gt; starts: the pipeline creates PDB &lt;code&gt;UCHD_16&lt;/code&gt; from &lt;code&gt;PDB_GOLD&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The agent (or developer) works at &lt;code&gt;/ords/uchd_16/&lt;/code&gt;. Nothing it does reaches the golden or another ticket.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Every clone has the same workspace ID, application ID and alias. That’s on purpose: exports import again without changes.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;After the merge, the PDB is dropped.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;You can do this in two ways: with SQL, or over REST with ORDS. Same result, pick what fits your setup.&lt;/p&gt;
&lt;h2 id=&quot;option-1-sql&quot;&gt;Option 1: SQL&lt;/h2&gt;
&lt;p&gt;Connect as SYSDBA to the root container. You build the golden once:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;sql&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;create&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt; pluggable &lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;database&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt; pdb_gold &lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;from&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt; dev_pdb;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;alter&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt; pluggable &lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;database&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt; pdb_gold &lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;open&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt; read&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt; write;  &lt;/span&gt;&lt;span style=&quot;color:#6A737D;--shiki-dark:#6A737D&quot;&gt;-- once, before it can go read only&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;alter&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt; pluggable &lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;database&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt; pdb_gold &lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;close&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt; immediate&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;alter&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt; pluggable &lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;database&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt; pdb_gold &lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;open&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt; read&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt; only;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;If your database runs in &lt;code&gt;NOARCHIVELOG&lt;/code&gt;, put &lt;code&gt;dev_pdb&lt;/code&gt; read only for a moment while you clone it.&lt;/p&gt;
&lt;p&gt;Then, for every ticket:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;sql&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;create&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt; pluggable &lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;database&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt; uchd_16 &lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;from&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt; pdb_gold &lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;snapshot&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt; copy&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;alter&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt; pluggable &lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;database&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt; uchd_16 &lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;open&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;And after the merge:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;sql&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;alter&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt; pluggable &lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;database&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt; uchd_16 &lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;close&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt; immediate&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;drop&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt; pluggable &lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;database&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt; uchd_16 including datafiles;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;That’s it.&lt;/p&gt;
&lt;h2 id=&quot;option-2-ords-rest-api&quot;&gt;Option 2: ORDS REST API&lt;/h2&gt;
&lt;p&gt;ORDS has &lt;a href=&quot;https://docs.oracle.com/en/database/oracle/oracle-rest-data-services/25.3/orrst/api-pluggable-database-lifecycle-management.html&quot;&gt;PDB Lifecycle Management&lt;/a&gt; built in, so all you need is a URL and a credential.&lt;/p&gt;
&lt;p&gt;Create the clone:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6F42C1;--shiki-dark:#B392F0&quot;&gt;curl&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt; -s&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt; -u&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; &quot;devops:&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;$ORDS_API_PW&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt; \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt;  -H&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; &quot;Content-Type: application/json&quot;&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt; \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt;  -X&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; POST&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; http://localhost:8080/ords/_/db-api/stable/database/pdbs/&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt; \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt;  -d&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; &apos;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;        &quot;new_pdb_name&quot;:     &quot;UCHD_16&quot;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;        &quot;source_pdb_name&quot;:  &quot;PDB_GOLD&quot;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;        &quot;snapshot_copy&quot;:    true,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;        &quot;storage&quot;:          &quot;UNLIMITED&quot;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;        &quot;create_file_dest&quot;: &quot;/u02/oradata&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;      }&apos;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;ORDS answers with a &lt;code&gt;202&lt;/code&gt; and a &lt;code&gt;job_name&lt;/code&gt;. The clone runs in a scheduler job, so wait until it’s done:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6F42C1;--shiki-dark:#B392F0&quot;&gt;curl&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt; -s&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt; -u&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; &quot;devops:&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;$ORDS_API_PW&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt; \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;  http://localhost:8080/ords/_/db-api/stable/database/scheduler/jobs/SYS,&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;job_nam&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;e&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The job is done when you get a &lt;code&gt;404&lt;/code&gt;, or &lt;code&gt;&quot;state&quot;: null&lt;/code&gt;, or the PDB is open. Don’t trust a &lt;code&gt;200&lt;/code&gt; on &lt;code&gt;GET /pdbs/UCHD_16&lt;/code&gt;: the PDB shows up as &lt;code&gt;MOUNTED&lt;/code&gt; while it’s still being created.&lt;/p&gt;
&lt;p&gt;After the merge, close and drop it. The API doesn’t close the PDB for you:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6F42C1;--shiki-dark:#B392F0&quot;&gt;curl&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt; -s&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt; -u&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; &quot;devops:&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;$ORDS_API_PW&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt; -H&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; &quot;Content-Type: application/json&quot;&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt; \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt;  -X&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; PATCH&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; http://localhost:8080/ords/_/db-api/stable/database/pdbs/UCHD_16&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt; \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt;  -d&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; &apos;{&quot;state&quot;:&quot;CLOSE&quot;,&quot;immediate&quot;:true}&apos;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6F42C1;--shiki-dark:#B392F0&quot;&gt;curl&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt; -s&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt; -u&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; &quot;devops:&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;$ORDS_API_PW&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt; \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt;  -X&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; DELETE&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; &quot;http://localhost:8080/ords/_/db-api/stable/database/pdbs/UCHD_16?including_datafiles=true&quot;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;You need &lt;code&gt;including_datafiles=true&lt;/code&gt;, otherwise the drop is refused. Tip: add &lt;code&gt;&quot;dryrun&quot;: true&lt;/code&gt; and you get the generated DDL back without running it.&lt;/p&gt;
&lt;p&gt;We wrapped these calls in a small Python script. Our pipeline calls it, and so can an agent: create a sandbox, do the work, hand back the result.&lt;/p&gt;
&lt;h2 id=&quot;setting-up-the-cdb&quot;&gt;Setting up the CDB&lt;/h2&gt;
&lt;p&gt;A few choices when you build the database make all of this smooth:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Install APEX in the PDB, never in &lt;code&gt;CDB$ROOT&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Install ORDS against the CDB root, so every new PDB is served automatically.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Set &lt;code&gt;db.serviceNameSuffix&lt;/code&gt; in ORDS to your &lt;code&gt;DB_DOMAIN&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Set &lt;code&gt;clonedb=TRUE&lt;/code&gt; (needs a restart).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Make the shared pool big enough for several environments at once.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Use OMF (&lt;code&gt;db_create_file_dest&lt;/code&gt;), so a clone doesn’t need &lt;code&gt;FILE_NAME_CONVERT&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Keep the golden a full clone and read only.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Enable the ORDS Database API (&lt;code&gt;database.api.enabled=true&lt;/code&gt;) if you go for option 2.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&quot;trying-it-on-another-box&quot;&gt;Trying it on another box&lt;/h2&gt;
&lt;p&gt;For this blog post, I ran a test case on a small server: Oracle AI Database 26ai Enterprise Edition (23.26.3), &lt;code&gt;clonedb=TRUE&lt;/code&gt;, datafiles on plain xfs. Next to a live application, so I didn’t want to touch the existing PDB.&lt;/p&gt;
&lt;p&gt;First the golden: a new PDB from &lt;code&gt;PDB$SEED&lt;/code&gt;, with a &lt;code&gt;snaptest&lt;/code&gt; schema and a table with 1,000 rows. Opened read write once, then read only. That took about 25 seconds, and you only do it once.&lt;/p&gt;
&lt;p&gt;Then two snapshot copies:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;sql&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;create&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt; pluggable &lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;database&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt; agent_001 &lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;from&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt; snap_gold &lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;snapshot&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt; copy&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;  create_file_dest &lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; &apos;/u02/oradata&apos;&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;alter&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt; pluggable &lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;database&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt; agent_001 &lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;open&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;PDB&lt;/th&gt;
&lt;th&gt;Ready in&lt;/th&gt;
&lt;th&gt;Size on disk&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;SNAP_GOLD&lt;/code&gt; (full)&lt;/td&gt;
&lt;td&gt;~25 s, once&lt;/td&gt;
&lt;td&gt;1.24 GB&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;AGENT_001&lt;/code&gt; (snapshot copy)&lt;/td&gt;
&lt;td&gt;10.9 s&lt;/td&gt;
&lt;td&gt;7.5 MB&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;AGENT_002&lt;/code&gt; (snapshot copy)&lt;/td&gt;
&lt;td&gt;19.2 s&lt;/td&gt;
&lt;td&gt;5.4 MB&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;The create itself took 4 to 5 seconds. Most of the time goes into opening the PDB. Each clone looks like 1,270 MB to the database, but only a few MB are really on disk, and that’s after the changes below.&lt;/p&gt;
&lt;p&gt;Then I let them do work. &lt;code&gt;AGENT_001&lt;/code&gt; inserted 500 rows and has 1,500. &lt;code&gt;AGENT_002&lt;/code&gt; dropped the table. The golden still has its 1,000 rows. Exactly what you want.&lt;/p&gt;
&lt;p&gt;I also ran the same script on my local Oracle AI Database 26ai Free (23.26.1), &lt;code&gt;NOARCHIVELOG&lt;/code&gt; on ext4. Each clone was ready in 1.1 seconds and took about 400 KB on disk. Same isolation result. So no excuse, you can try this today with &lt;a href=&quot;https://github.com/United-Codes/uc-local-apex-dev&quot;&gt;UC Local APEX Dev&lt;/a&gt; 😁&lt;/p&gt;
&lt;h2 id=&quot;gotchas&quot;&gt;Gotchas&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;The golden is pinned.&lt;/strong&gt; You can’t drop or refresh it while clones exist, because they read through it. To refresh, build a new golden and retire the old one after its last ticket is merged.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Clones come back mounted.&lt;/strong&gt; With SQL you can &lt;code&gt;save state&lt;/code&gt;, but the ORDS API has no endpoint for that, so open them again after a restart.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Guard the credential.&lt;/strong&gt; The ORDS API user has &lt;code&gt;SYSDBA CONTAINER=ALL&lt;/code&gt; and can drop the golden too. Fine on your own box, not on a shared server. And never give it to an APEX frontend or put it in an agent’s prompt.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Mask the golden.&lt;/strong&gt; Whatever is in the golden ends up in every clone. No real production data in there.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;what-about-licensing&quot;&gt;What about licensing?&lt;/h2&gt;
&lt;p&gt;Snapshot copy works on Oracle AI Database 26ai Free and on Oracle AI Database 26ai Enterprise Edition.&lt;/p&gt;
&lt;h2 id=&quot;no-shared-dev-db&quot;&gt;No shared Dev DB&lt;/h2&gt;
&lt;p&gt;With agents it’s no longer a nice-to-have: they work in parallel, they work fast, and they will try the destructive thing. With &lt;code&gt;SNAPSHOT COPY&lt;/code&gt; every ticket, and every agent working on it, gets its own database in about 20 seconds. Set it up once, together with the tooling from &lt;a href=&quot;https://dgielis.com/setting-up-your-apex-developer-environment-for-the-ai-era&quot;&gt;Setting Up Your APEX Developer Environment for the AI Era&lt;/a&gt;, and let them break things. You stay the one who decides what gets merged.&lt;/p&gt;
&lt;p&gt;This post is my contribution to &lt;a href=&quot;https://x.com/hashtag/JoelKallmanDay&quot;&gt;#JoelKallmanDay&lt;/a&gt;, the day the Oracle community blogs in memory of Joel Kallman, who led Oracle APEX for so many years.&lt;/p&gt;
</content:encoded><category>AI-assisted development</category><category>oracle-database</category><category>oracle-apex</category><category>orclapex</category><category>ai</category><category>joel-kallman-day</category></item><item><title>Upgrade APEX 24.1 app to APEX 26.1</title><link>https://dgielis.com/upgrade-apex-24-1-app-to-apex-26-1</link><guid isPermaLink="true">https://dgielis.com/upgrade-apex-24-1-app-to-apex-26-1</guid><description>Moving forward building Oracle APEX applications, you want to make sure your apps are compatible with APEXlang.</description><pubDate>Thu, 28 May 2026 07:19:08 GMT</pubDate><content:encoded>&lt;p&gt;&lt;img src=&quot;https://dgielis.com/images/posts/upgrade-apex-24-1-app-to-apex-26-1/f97add6e-1f53-49a4-87a6-65b5d5cb965d-04283c98.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;&lt;p&gt;Moving forward building Oracle APEX applications, you want to make sure your apps are compatible with APEXlang. APEXlang is the new readable file format, which describes your APEX app and is an important component to do AI-driven development.&lt;/p&gt;
&lt;p&gt;When you come from an existing app written in an earlier version of APEX, there are a few steps to do in order to get your app ready for APEXlang. Below is what I typically do when upgrading an APEX app.&lt;/p&gt;
&lt;p&gt;I created a new Oracle APEX 26.1 environment and imported the EURO 2024 app that was build many years ago, and got a final upgrade in APEX 24.1.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://dgielis.com/images/posts/upgrade-apex-24-1-app-to-apex-26-1/07eb1e8e-e996-4936-a103-dacd94258f38-daad603f.webp&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;The following actions I perform.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Change the Compatibility Mode&lt;/strong&gt; to 26.1. Click the Edit Application Definition button and in Properties make the change from “21.2 to 24.1” to “26.1”&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://dgielis.com/images/posts/upgrade-apex-24-1-app-to-apex-26-1/3b5c1c71-37ac-492f-843d-6aabe50d4487-a118a437.webp&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;Next &lt;strong&gt;Refresh the Theme&lt;/strong&gt;. Hit the Refresh Theme button&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://dgielis.com/images/posts/upgrade-apex-24-1-app-to-apex-26-1/a840feae-07d8-4887-9f12-131bc48e20e5-1b12d338.webp&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;Check the plug-ins you use and see if some are unnecessary because the feature is now built-in as a native component. In my case both plug-ins are now native in APEX and can be replaced.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://dgielis.com/images/posts/upgrade-apex-24-1-app-to-apex-26-1/5e19a320-777a-41cd-8c1e-e194d9375156-8c264691.webp&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;Finally upgrade the application components by going to Utilities &amp;gt; &lt;strong&gt;Upgrade Application&lt;/strong&gt;, click on Details and follow along by selecting the proposal and hit the Update button. In case some features can’t be automatically be upgraded, try to do it manually.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://dgielis.com/images/posts/upgrade-apex-24-1-app-to-apex-26-1/7e98a664-8e8b-43d1-abfa-ec378da83b7b-33dc6fb1.webp&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;Here’s an example of an old component, a tabular form, which has a derived column and could not be upgraded to an Interactive Grid automatically. Removing the order by and derived column fixed the issue.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://dgielis.com/images/posts/upgrade-apex-24-1-app-to-apex-26-1/74897524-4494-4f7a-8b91-0182ecdf5165-17d4afd2.webp&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;There are a couple other things you can check, for example in Shared Components &amp;gt; User Interfaces check the JavaScript section to not include the deprecated JavaScript functions. Check the security attributes for session state protection and the used hash value.&lt;/p&gt;
&lt;p&gt;Once the above is done, try to export your app in APEXlang format.&lt;/p&gt;
&lt;p&gt;Go to &lt;strong&gt;Export/Import and Select APEXlang&lt;/strong&gt; as export format.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://dgielis.com/images/posts/upgrade-apex-24-1-app-to-apex-26-1/d3f4c6f0-1834-4ef6-98af-da24915cea48-9acede2e.webp&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;Normally you get a zip file with all the files, but in my case the zip was invalid.&lt;br&gt;
Now the question is why? In short, I tried two methods; debug my own session, but the easiest solution was to use SQLcl to try and export the APEX app.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://dgielis.com/images/posts/upgrade-apex-24-1-app-to-apex-26-1/d0bdb903-5184-4a3c-8567-3b31ff574780-445a5798.webp&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;So there is a meta-data issue in my APEX app. APEX 26.1 was a major rewrite, where a lot of the meta-data got changed, for example default values and static ids are now consistant and components have strict structures. The above error I consider a bug and should be addressed by Oracle, because we as developers have no idea what is wrong. You should report these issues to the APEX dev team. I debugged this issue myself and it turned out that in one of my Authentication Schemes a default value was not set, but there was no way for me to change it in the builder.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://dgielis.com/images/posts/upgrade-apex-24-1-app-to-apex-26-1/f30be24a-e692-4d20-8f59-6164863e049c-a98c5a08.webp&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;Edit 29-MAY-2026: Patrick Wolf told me it’s not really an incorrect default value, but the authentication scheme “Oracle Application Server Single Sign-On” (NATIVE_IAS_SSO) is really old and no longer available. &lt;/p&gt;
&lt;p&gt;I consider this a rare issue. To get around the issue, I exported my app in SQL format, opened the sql file in VS Code, searched for the Authentication scheme and removed the code.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://dgielis.com/images/posts/upgrade-apex-24-1-app-to-apex-26-1/9dccdaaf-b7d4-4ec8-8898-aded8da3e578-2c8156da.webp&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;After that reimport the app again and replace the app.&lt;/p&gt;
&lt;p&gt;Next try the export to APEXlang again.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://dgielis.com/images/posts/upgrade-apex-24-1-app-to-apex-26-1/7967e385-bde9-4169-866a-6dcc1d1211ae-316da68f.webp&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;Cool, now it worked.&lt;/p&gt;
&lt;p&gt;APEXlang is why more strict in defining an APEX app. Where the builder hides options, with APEXlang you are in a text file and can type anything. This is why Oracle provides a validation of the files. You might think that if you were able to export your app to APEXlang, the files are clean, but for older apps they might not be. Oracle warned about this, there might be manual changes needed as APEX is now way more strict about things. For example I might have a component in APEX that I commented out, but has a failing SQL statement or a reference to a component that doesn’t exist anymore. My APEX app works perfectly, but APEXlang won’t be able to validate it as there are failing components, even tho they are commented out. So there is strict validation going on.&lt;/p&gt;
&lt;p&gt;So, lets move on and validate our APEX app. In SQLcl, you can run the apex validate command:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://dgielis.com/images/posts/upgrade-apex-24-1-app-to-apex-26-1/9a1145c1-4b31-4b07-9fbe-f5ea401ff770-b438d0d7.webp&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;And as expected, I have some things to fix.&lt;/p&gt;
&lt;p&gt;The easiest way for me to fix was just tell Claude to fix the issue for me.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://dgielis.com/images/posts/upgrade-apex-24-1-app-to-apex-26-1/5f16ea73-c381-43be-9aa7-ac56a5231c54-40533018.webp&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;If you use Git, it’s easy to see what was changed, either in VS Code or for example in GitHub Desktop&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://dgielis.com/images/posts/upgrade-apex-24-1-app-to-apex-26-1/7667adeb-add8-4d46-8107-1f4a41cd8cf8-6a9d3bb3.webp&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;Edit 29-MAY-2026: Patrick Wolf told me it’s better to remove the custom results template entirely instead of adding an empty template.&lt;/p&gt;
&lt;p&gt;After that I validated the app and validation was successful, but now I got some warnings. Those we will fix later. In case you want to know more about the validation with APEXlang, Steve Muench did a good &lt;a href=&quot;https://diveintoapex.com/2026/05/19/mending-metadata-mismatches/&quot;&gt;blog post&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;This is a good point to import the APEX app again. If all is good, you are ready to continue doing development with APEXlang.&lt;/p&gt;
&lt;p&gt;Note; I didn’t go into much detail on my setup and doing AI-driven development with Oracle APEX. This will be part of my blog series on &lt;a href=&quot;https://dgielis.com/the-apex-developer-reinvented&quot;&gt;the APEX Developer reinvented&lt;/a&gt;.&lt;/p&gt;
</content:encoded><category>Oracle APEX &amp; Database</category><category>oracle-apex</category><category>orclapex</category><category>apexlang</category></item><item><title>Gathering requirements</title><link>https://dgielis.com/gathering-requirements</link><guid isPermaLink="true">https://dgielis.com/gathering-requirements</guid><description>Writing the requirements for my World Cup 2026 app by voice, with Claude and ChatGPT reviewing each other: six rounds of refinement, and features I would never have thought of alone.</description><pubDate>Sun, 19 Apr 2026 19:26:43 GMT</pubDate><content:encoded>&lt;p&gt;&lt;img src=&quot;https://dgielis.com/images/posts/gathering-requirements/22ab83d2-89e6-40fb-8b61-30293e21b151-077dfb1a.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;&lt;p&gt;I had a conversation with AI about the World Cup 2026 app.&lt;/p&gt;
&lt;p&gt;I didn’t type. I used my voice. Six conversations later, I had a requirements document with features I would never have thought of alone.&lt;/p&gt;
&lt;p&gt;That’s the short version of this post.&lt;/p&gt;
&lt;h2 id=&quot;why-requirements-are-the-hard-part&quot;&gt;Why requirements are the hard part&lt;/h2&gt;
&lt;p&gt;As developers, we can only design great systems that give real business value when we truly understand the business.&lt;/p&gt;
&lt;p&gt;As a consultant I read documents, review schemas, and do interviews to understand where technology can help. If you’re not familiar with the industry, it takes time to see where you can add value.&lt;/p&gt;
&lt;p&gt;This is where AI really helps.&lt;/p&gt;
&lt;p&gt;Even without prior knowledge, you can ask AI to brainstorm with you. Feed it all your documents and let it challenge the requirements. You can even give it drawings, pictures, anything really.&lt;/p&gt;
&lt;p&gt;Then have a conversation, just using your voice.&lt;/p&gt;
&lt;p&gt;I also try to look at it from different angles. Who are the stakeholders? The business, the end users, sometimes management. They all want different things. What the business wants is not always what the end user expects.&lt;/p&gt;
&lt;p&gt;And I ask AI to think about edge cases too. What can go wrong? What happens with bad or missing data?&lt;/p&gt;
&lt;h2 id=&quot;the-world-cup-2026-app&quot;&gt;The World Cup 2026 app&lt;/h2&gt;
&lt;p&gt;In my case I already knew what I wanted. My friends and I want to predict the scores of the games. We want to see who’s leading, be part of a team, and see how our team compares to others.&lt;/p&gt;
&lt;p&gt;But I still decided to talk to AI, to see what else it would suggest.&lt;/p&gt;
&lt;p&gt;I started with Claude. It came up with many ideas. Then I kept asking &lt;strong&gt;“what else are we missing?”&lt;/strong&gt; which made the AI think harder and come up with improvements I hadn’t thought about.&lt;/p&gt;
&lt;p&gt;A good tip: also think about what success looks like. Describe the &lt;strong&gt;intent&lt;/strong&gt; (an app to predict games), the &lt;strong&gt;constraints&lt;/strong&gt; (100 USD budget), and how you will &lt;strong&gt;validate&lt;/strong&gt; the result.&lt;/p&gt;
&lt;p&gt;When I had a first version of the requirements document, I gave it to ChatGPT with the following prompt:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;“Review the requirements document of an application where my friends and I can predict the games of the World Cup 2026. Check if something was forgotten. Tell me which other features are interesting to add. Note that only features can be added that an AI can code and where the system is 100% autonomous. Create the final requirements document in markdown format.”&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;This is a nice trick. You let two different AIs ping-pong on the requirements. ChatGPT and Claude each see different things.&lt;/p&gt;
&lt;h2 id=&quot;six-rounds-of-refinement&quot;&gt;Six rounds of refinement&lt;/h2&gt;
&lt;p&gt;I refined the requirements six times. AI came up with features I didn’t have on my list at all. A few that stuck:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Rival Mode&lt;/strong&gt;: every user can nominate one rival per group and see a mini head-to-head leaderboard. Much more fun than just a global ranking.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;What-If Simulator&lt;/strong&gt;: enter hypothetical results for the remaining matches and see where you would end up.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;AI Coach&lt;/strong&gt;: a weekly summary of each user’s prediction patterns (team bias, risk profile, notable misses).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Joker Recommendation&lt;/strong&gt;: once per stage the AI suggests which match to double up on, based on your accuracy history.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;None of these were in my original brain-dump. Some I would probably not think about myself.&lt;/p&gt;
&lt;p&gt;AI gives a lot of ideas, but not everything is needed. I try to keep it simple and focus on what brings the most value first.&lt;/p&gt;
&lt;p&gt;Remember, you don’t have to define everything in the spec. Whatever you leave out, the AI will guess. If you prefer to know up-front what you will get, spend a bit more time on the spec. Otherwise the AI will ask you later, or build something it thinks is good, but you actually don’t like.&lt;/p&gt;
&lt;p&gt;The look and feel of the app is also part of the requirements. In a company you typically have a brand book or design guidelines. I don’t really have that, so I asked AI to add a design section to the requirements document too: fonts, colours, tone, component style.&lt;/p&gt;
&lt;p&gt;While defining requirements, I already start thinking about the data behind it. What do we need to store? What is the source of truth? That’s for the next post.&lt;/p&gt;
&lt;h2 id=&quot;freeze-the-requirements&quot;&gt;Freeze the requirements&lt;/h2&gt;
&lt;p&gt;At some point you stop. The requirements document becomes the contract. No coding yet, maybe just a final pass to find ambiguities or contradictions.&lt;/p&gt;
&lt;p&gt;You can find my final requirements document for the World Cup 2026 app here: &lt;a href=&quot;https://github.com/dgielis/apex-developer-reinvented/blob/main/worldcup2026_prediction_app_requirements_6.md&quot;&gt;worldcup2026_prediction_app_requirements_6.md&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&quot;from-requirements-to-shipping&quot;&gt;From requirements to shipping&lt;/h2&gt;
&lt;p&gt;Once the requirements are frozen, the actual building starts. Here’s the pattern I use for everything that follows, and you’ll see it in every post in this series.&lt;/p&gt;
&lt;p&gt;Instead of letting AI build everything in one go, we break the process into clear steps. AI does the heavy lifting, and I validate at every stage.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://dgielis.com/images/posts/gathering-requirements/9a953ebb-b787-4999-8813-0295d06f848b-0c5a8cb5.webp&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;Every AI step is followed by a human review. That is the key.&lt;/p&gt;
&lt;p&gt;I call this keeping the human in the loop. Instead of trusting AI blindly, you guide it, correct it, and make decisions at every important step.&lt;/p&gt;
&lt;p&gt;In practice, it also makes development faster, not slower. Because mistakes are caught early, not at the end.&lt;/p&gt;
&lt;p&gt;In the next post we’ll go from these requirements to the data model 😁&lt;/p&gt;
</content:encoded><category>AI-assisted development</category><category>oracle-apex</category><category>orclapex</category><category>ai</category></item><item><title>Setting Up Your APEX Developer Environment for the AI Era</title><link>https://dgielis.com/setting-up-your-apex-developer-environment-for-the-ai-era</link><guid isPermaLink="true">https://dgielis.com/setting-up-your-apex-developer-environment-for-the-ai-era</guid><description>The setup I use to build Oracle APEX apps with AI agents: VS Code, Claude Code and Codex, skills, SQLcl, Git, and a local Oracle Database and Oracle APEX in Docker. Step by step, so you can reproduce it.</description><pubDate>Wed, 15 Apr 2026 17:16:46 GMT</pubDate><content:encoded>&lt;p&gt;&lt;img src=&quot;https://dgielis.com/images/posts/setting-up-your-apex-developer-environment-for-the-ai-era/1ebab7dd-7dc8-4eac-93fa-6f929a0a8680-9b63f8af.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;&lt;p&gt;In the &lt;a href=&quot;https://dgielis.com/the-apex-developer-reinvented&quot;&gt;previous post&lt;/a&gt; I talked about how the role of the Oracle APEX developer is changing. AI is changing how we write code, how we think about problems, and how fast we can move. But before we can show any of that in action, we need a proper setup.&lt;/p&gt;
&lt;p&gt;My mentor in my early career, &lt;a href=&quot;https://www.rittmanmead.com/blog/2005/04/tom-kyte-in-search-of-the-truth/&quot;&gt;Tom Kyte’s, mantra&lt;/a&gt; was, don’t just believe what “experts” say, ask for proof. As things change so fast, especially with AI, it’s important to test if things are still valid when you read this article.&lt;/p&gt;
&lt;p&gt;So in this post I want to walk through the development environment I use today, which you can 100% reproduce and follow along on your own machine. It is a bit different than what I had back &lt;a href=&quot;https://dgielis.com/archive/2017/08/from-idea-to-app-or-how-i-do-oracle&quot;&gt;in 2017&lt;/a&gt;, but it is also way more powerful.&lt;/p&gt;
&lt;p&gt;Let me go through it step by step.&lt;/p&gt;
&lt;h2 id=&quot;the-editor-vs-code&quot;&gt;The Editor: VS Code&lt;/h2&gt;
&lt;p&gt;I use &lt;strong&gt;Visual Studio Code&lt;/strong&gt; as my main editor. It is free, fast, and has a huge ecosystem of extensions. For &lt;a href=&quot;https://apex.oracle.com&quot;&gt;Oracle APEX&lt;/a&gt; development, these are the extensions I have installed:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Oracle SQL Developer Extension for VS Code&lt;/strong&gt; is the one I start with. It gives you database connections, SQL execution, object browsing, and a lot more, all from inside VS Code.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;dbLinter&lt;/strong&gt; helps you keep your SQL and PL/SQL clean. It catches issues early and helps you stay consistent across a project.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;QuickSQL Preview&lt;/strong&gt; is one of my favorites. If you have never heard of QuickSQL, it is a shorthand language developed by Oracle that lets you describe your data model in plain text and generate ready-to-run SQL from it. We at United Codes &lt;a href=&quot;https://github.com/United-Codes/quicksql&quot;&gt;forked it&lt;/a&gt; and made many enhancements to it. The VS Code extension gives you a live preview as you type and even a visual ERD. You can &lt;a href=&quot;https://github.com/dgielis/apex-developer-reinvented/blob/main/quicksql-preview-0.1.5.vsix&quot;&gt;download&lt;/a&gt; the open source version.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Claude Code&lt;/strong&gt; and &lt;strong&gt;Codex&lt;/strong&gt; as AI coding assistant. Both Claude and Codex are super good, and within &lt;a href=&quot;https://www.united-codes.com&quot;&gt;United Codes&lt;/a&gt; we use both (and even others). Pick one and continue.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;the-terminal&quot;&gt;The Terminal&lt;/h2&gt;
&lt;p&gt;I use &lt;strong&gt;iTerm2&lt;/strong&gt; on macOS. It supports split panes, profiles, and a lot of shortcuts that make life easier when you are switching between the AI Assistant, SQLcl, and Git all day.&lt;/p&gt;
&lt;h2 id=&quot;claude-code-cli-or-app&quot;&gt;Claude Code CLI (or app)&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Claude Code&lt;/strong&gt; runs as a CLI and works directly in your terminal, in your project directory, with your files. It understands context, it can read your codebase, and it can take real actions.&lt;/p&gt;
&lt;p&gt;You install it via npm:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;shell&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6F42C1;--shiki-dark:#B392F0&quot;&gt;npm&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; install&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt; -g&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; @anthropic-ai/claude-code&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This is more than autocomplete. Claude Code can browse your files, run commands, write SQL, generate PL/SQL packages, create APEX export scripts, update GitLab issues, and a lot more. We will use it heavily throughout this series.&lt;/p&gt;
&lt;p&gt;The most important file for Claude Code in any project is the &lt;strong&gt;CLAUDE.md&lt;/strong&gt; file. I will do a dedicated post on that, but in short: it is a markdown file you put at the root of your project repo. It tells Claude Code what the project is about, what conventions to follow, what tools to use, and what not to do. Without a good CLAUDE.md, Claude Code is just a smart tool. With a good one, it becomes a real team member that knows your project. We will also add skills, basically other .md files, to Claude, which will give it specific knowledge about the Oracle database, APEX and our way of working.&lt;/p&gt;
&lt;h2 id=&quot;codex-cli-or-app&quot;&gt;Codex CLI (or app)&lt;/h2&gt;
&lt;p&gt;An alternative to Claude is &lt;strong&gt;Codex&lt;/strong&gt;. Similarly, Codex runs as a CLI and works directly in your terminal, in your project directory, with your files. It understands context, it can read your codebase, and it can take real actions.&lt;/p&gt;
&lt;p&gt;You install it via npm:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;shell&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6F42C1;--shiki-dark:#B392F0&quot;&gt;npm&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; install&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt; -g&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; @openai/codex&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Similary to Claude, you also have a file to define everything, in Codex this is the &lt;strong&gt;AGENTS.md&lt;/strong&gt; file. Skills are also used to give Codex more specific knowledge.&lt;/p&gt;
&lt;h2 id=&quot;ai-skills-for-the-oracle-database-and-apex&quot;&gt;AI Skills for the Oracle Database and APEX&lt;/h2&gt;
&lt;p&gt;One thing I find really useful is the &lt;strong&gt;oracle-db-skills&lt;/strong&gt; project by Kris Rice, which you find &lt;a href=&quot;https://github.com/krisrice/oracle-db-skills&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;This is a curated library of 100+ practical guides covering Oracle Database topics, from SQL and PL/SQL development to security, migrations, and DevOps, organized into skill files by domain.&lt;/p&gt;
&lt;p&gt;Another one not released yet, but foreseen by Oracle, are the APEXLang skills. APEXLang is the new format of an Oracle APEX app, which makes it much easier for any AI Assistant to produce APEX apps (APEXLang files).&lt;/p&gt;
&lt;p&gt;With United Codes we also developed our own skills, for example we define our conventions, to always use utPLSQL to create PL/SQL tests, use the &lt;a href=&quot;https://github.com/Grisselbav/dbLinter/releases&quot;&gt;dbLinter&lt;/a&gt; CLI to check the code etc.&lt;/p&gt;
&lt;h2 id=&quot;source-control&quot;&gt;Source Control&lt;/h2&gt;
&lt;p&gt;Use &lt;strong&gt;GitLab&lt;/strong&gt; or &lt;strong&gt;GitHub&lt;/strong&gt; for source control.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;GitHub Desktop&lt;/strong&gt; gives me a visual view of what has changed in my local repos. Even though I use GitLab/GitHub for the actual remote, GitHub Desktop works fine as a local Git GUI.&lt;/p&gt;
&lt;p&gt;The &lt;strong&gt;glab&lt;/strong&gt; CLI tool lets you interact with GitLab from the terminal: create issues, link commits, open merge requests, and more. This matters because the AI Assistant can use &lt;a href=&quot;https://gitlab.com/gitlab-org/cli&quot;&gt;glab&lt;/a&gt; to manage your project as part of its workflow. It creates issues when it finds something to fix, it links commits to issues, and it keeps your project board up to date.&lt;/p&gt;
&lt;h2 id=&quot;sqlcl&quot;&gt;SQLcl&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;SQLcl&lt;/strong&gt; is Oracle’s command-line interface for the database. It is lightweight, scriptable, and supports Liquibase-based database change management out of the box through &lt;strong&gt;SQLcl Projects&lt;/strong&gt;. I use it for everything from quick queries to deploying schema changes. Download &lt;a href=&quot;https://www.oracle.com/database/sqldeveloper/technologies/sqlcl/&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;SQLcl Projects is how we manage database changes in a structured way. It tracks what has been applied, keeps your DDL in version control, and integrates nicely with CI/CD pipelines. Our AI assistant knows how to work with SQLcl, which makes this combination really powerful.&lt;/p&gt;
&lt;h2 id=&quot;local-development-environment&quot;&gt;Local Development Environment&lt;/h2&gt;
&lt;p&gt;For local development I run everything in &lt;strong&gt;Docker&lt;/strong&gt;. My stack consists of two containers:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Oracle Database 26ai&lt;/strong&gt; as I still believe this is the best database in the world, now with a lot of AI capabilities built in. Oracle provides a free Docker image. This local database syncs with the main DEV database (in the cloud).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Oracle APEX + ORDS&lt;/strong&gt;. Having APEX local means I can develop (together with my AI agents) and test without depending on any shared environment. Fast feedback loop and no interference.&lt;/p&gt;
&lt;h2 id=&quot;automation&quot;&gt;Automation&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Jenkins&lt;/strong&gt; for automation. I use a Jenkins instance to run pipelines: schema deployments, test suites, etc. Jenkins connects to Git and triggers on push.&lt;/p&gt;
&lt;h2 id=&quot;nodejs-and-playwright&quot;&gt;Node.js and Playwright&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Node.js&lt;/strong&gt; is needed for a few things: installing the AI Assistant, running some tooling, and running &lt;strong&gt;Playwright&lt;/strong&gt; for automated browser testing. Playwright lets you write tests that actually open a browser and interact with your APEX application. We will use this later in the series for end-to-end testing.&lt;/p&gt;
&lt;p&gt;Install Node.js via: &lt;a href=&quot;https://nodejs.org&quot;&gt;https://nodejs.org&lt;/a&gt; or with Homebrew on macOS (&lt;code&gt;brew install node&lt;/code&gt;).&lt;/p&gt;
&lt;h2 id=&quot;browser&quot;&gt;Browser&lt;/h2&gt;
&lt;p&gt;I use &lt;strong&gt;Google Chrome&lt;/strong&gt; for testing APEX applications. A few extensions that help: a REST client for testing APIs, and the standard Chrome DevTools are already built in. Nothing exotic needed here.&lt;/p&gt;
&lt;h2 id=&quot;voice&quot;&gt;Voice&lt;/h2&gt;
&lt;p&gt;I really believe English is the new programming language.&lt;/p&gt;
&lt;p&gt;I use &lt;strong&gt;SuperWhisper&lt;/strong&gt;, which is a macOS app that lets you use your voice to type anywhere on your computer. It runs speech-to-text locally using AI models, so your audio stays private. I use it to dictate prompts for the AI Assistant, write commit messages, or talk through ideas without having to type everything out. It sits in the menu bar and activates with a keyboard shortcut, making it fast to switch between typing and speaking.&lt;/p&gt;
&lt;h2 id=&quot;putting-it-all-together&quot;&gt;Putting It All Together&lt;/h2&gt;
&lt;p&gt;I wanted to make it easy to setup your own environment, so on my &lt;a href=&quot;https://github.com/dgielis/apex-developer-reinvented&quot;&gt;personal GitHub repo&lt;/a&gt; I’m sharing quick starts.&lt;/p&gt;
&lt;p&gt;If you have everything above installed and running, you are ready to follow along with the rest of this series, incase you wanted to experience this too.&lt;/p&gt;
&lt;h2 id=&quot;note&quot;&gt;Note&lt;/h2&gt;
&lt;p&gt;I expect things will keep changing over the coming months, as the world of AI is changing fast. Either I will update this post or create follow-up posts and link to them once available.&lt;/p&gt;
</content:encoded><category>AI-assisted development</category><category>oracle-apex</category><category>orclapex</category><category>ai</category></item><item><title>The APEX Developer Reinvented</title><link>https://dgielis.com/the-apex-developer-reinvented</link><guid isPermaLink="true">https://dgielis.com/the-apex-developer-reinvented</guid><description>AI can generate a working app in minutes, but would you run it as enterprise software? Why the Oracle APEX developer becomes a designer, orchestrator and validator.</description><pubDate>Sun, 15 Mar 2026 20:07:15 GMT</pubDate><content:encoded>&lt;p&gt;&lt;img src=&quot;https://dgielis.com/images/posts/the-apex-developer-reinvented/ef45a8b5-5163-4ca5-be42-db70d4a560aa-8e02d1f0.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;&lt;p&gt;Recently I asked an AI tool to build me a World Cup prediction app.&lt;br&gt;
Within a couple of minutes it generated a full application; a React frontend, backend APIs, some database tables. It even came with it’s own todos, so I could follow along where it was!&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://dgielis.com/images/posts/the-apex-developer-reinvented/c1b2f18a-d387-4b31-b414-86abf7ce6cb9-28524775.webp&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;Everything wired together, deployed on the internet in one time. Pretty impressive!&lt;/p&gt;
&lt;p&gt;The prompt I gave was simple:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Build a web application that lets my friends and me predict the scores of games at the 2026 World Cup.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;You see or hear about these demos everywhere now, some call it vibe-coding.&lt;/p&gt;
&lt;p&gt;But then I started thinking; if this was a &lt;strong&gt;real enterprise application&lt;/strong&gt;, would I actually deploy this? Probably not.&lt;/p&gt;
&lt;p&gt;Not because the AI did a bad job. But because when we build enterprise software, we care about things like:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;security&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;performance&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;maintainability&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;data integrity&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;predictability&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;(and so much more)&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;And that is where the &lt;strong&gt;Oracle Database and Oracle APEX approach&lt;/strong&gt; becomes extremely powerful.&lt;/p&gt;
&lt;h2 id=&quot;apex-has-always-been-about-productivity&quot;&gt;APEX Has Always Been About Productivity&lt;/h2&gt;
&lt;p&gt;If you want to build applications on top of the Oracle Database, APEX is the fastest way to do it. Compared to traditional development stacks like Java, .NET, or JavaScript, developers are often &lt;strong&gt;20x more productive&lt;/strong&gt; by using the APEX low-code platform. This was the message we gave customers, but I believe today that is no longer the main driver. Instead, the message will change to say that we can produce applications consistent, reliable, secure, and performant.&lt;/p&gt;
&lt;h3 id=&quot;the-early-days&quot;&gt;The Early Days&lt;/h3&gt;
&lt;p&gt;When I first started working with APEX (back then called HTML DB), we often positioned it as a replacement for Excel “databases”.&lt;/p&gt;
&lt;p&gt;Many organizations had big enterprise systems, but departments still built their own tools in spreadsheets. APEX turned out to be the perfect sweet spot for those applications.&lt;/p&gt;
&lt;p&gt;You could quickly build a secure application on top of the Oracle Database and share it with your team.&lt;/p&gt;
&lt;p&gt;Back in 2006 I even built &lt;a href=&quot;https://dgielis.com/archive/2006/05/world-cup-2006-score-in-apex&quot;&gt;a small application to predict scores with friends for the World Cup&lt;/a&gt;. Simple idea, simple app, built quickly. That was exactly the magic of APEX.&lt;/p&gt;
&lt;h3 id=&quot;the-apex-community&quot;&gt;The APEX Community&lt;/h3&gt;
&lt;p&gt;Over the years the Oracle APEX community grew tremendously.&lt;/p&gt;
&lt;p&gt;More and more developers discovered that APEX was not only good for small departmental apps. It could also power serious enterprise systems.&lt;/p&gt;
&lt;p&gt;Instead of traditional development stacks, companies started building:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;ERP systems&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;CRM systems&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;internal portals&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;workflow engines&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;data management platforms&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If there was an Oracle Database, APEX became the logical platform to develop on.&lt;/p&gt;
&lt;p&gt;The community played a huge role in that growth. Blogs, plug-ins, conferences, examples everywhere. People sharing ideas and helping each other.&lt;/p&gt;
&lt;p&gt;In 2017 I wrote a blog post explaining &lt;a href=&quot;https://dgielis.com/archive/2017/08/from-idea-to-app-or-how-i-do-oracle&quot;&gt;&lt;strong&gt;how I personally go from idea to application using APEX&lt;/strong&gt;&lt;/a&gt;. That article describes how I typically build an application from scratch. And honestly, that approach worked really well for many years.&lt;/p&gt;
&lt;h3 id=&quot;apex-becomes-strategic-for-oracle&quot;&gt;APEX Becomes Strategic for Oracle&lt;/h3&gt;
&lt;p&gt;Another big shift happened around 2020. During COVID, Oracle helped governments build applications extremely fast. APEX played an important role in that effort. At that moment it became clear, even at the highest level within Oracle, how powerful this platform really was.&lt;/p&gt;
&lt;p&gt;From then on Oracle started positioning APEX much more prominently as the primary development platform for applications on the Oracle Database.&lt;/p&gt;
&lt;p&gt;Before that, Java was often considered the default option. After that, the message became much clearer. If you have an Oracle Database, &lt;strong&gt;APEX should be your first choice for building applications&lt;/strong&gt;.&lt;/p&gt;
&lt;h2 id=&quot;ai-changes-everything&quot;&gt;AI Changes Everything&lt;/h2&gt;
&lt;p&gt;But the biggest shift is happening right now.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;AI.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;In the last few years the use of AI exploded. But for me it is especially in the last months that things really changed. Agentic coding tools like Claude Code, Codex, Cursor and others have become really good. And that changes how we work.&lt;/p&gt;
&lt;p&gt;The role of the Oracle APEX developer is no longer just building pages, writing SQL and PL/SQL, and configuring components. We are moving from low coders to something else.&lt;/p&gt;
&lt;p&gt;More like:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;designers&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;orchestrators&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;validators&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;AI can generate SQL, PL/SQL code, APIs, and even applications.&lt;/p&gt;
&lt;p&gt;But it still needs someone who understands:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;the business problem&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;the data model&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Oracle APEX and the Oracle Database&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;and when AI is wrong&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;That person is still the APEX developer.&lt;/p&gt;
&lt;p&gt;But the way we work is evolving quickly. I might be wrong, but I believe this:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Developers will not be replaced by AI. But developers using AI will replace those who don’t.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;We are really in exciting times! By using AI, we as developers can do so much more now and help so many more people.&lt;/p&gt;
&lt;h3 id=&quot;a-new-series&quot;&gt;A New Series&lt;/h3&gt;
&lt;p&gt;So I thought it was a good time to revisit something I wrote years ago.&lt;br&gt;
In 2017, I described how I turn an idea into an application with APEX. Now I want to do that again, but this time &lt;strong&gt;with AI in the loop&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;To make it fun, I will rebuild the World Cup prediction app, just like I did back in 2006.&lt;/p&gt;
&lt;p&gt;But this time using:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Oracle Database 26ai&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Oracle APEX 24.2 (including ORDS)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;AI coding tools like Claude Code&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;modern development workflows&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In the next posts we will go step by step through the process. From idea to working application and we will see how AI changes the way we develop with Oracle APEX.&lt;/p&gt;
&lt;p&gt;Generating some PL/SQL with AI is the easy part… in the next posts I want to see if AI agents can handle the entire development lifecycle and build full Oracle APEX applications.&lt;/p&gt;
&lt;p&gt;There is a lot to explore 😁&lt;/p&gt;
</content:encoded><category>AI-assisted development</category><category>oracle-apex</category><category>orclapex</category><category>ai</category></item><item><title>Oracle Database 26ai Assertions in a World Cup Betting App</title><link>https://dgielis.com/oracle-database-26ai-assertions-in-a-world-cup-betting-app</link><guid isPermaLink="true">https://dgielis.com/oracle-database-26ai-assertions-in-a-world-cup-betting-app</guid><description>Recently I was playing again with my World Cup betting application, originally built in 2006 with Oracle APEX. Yes… almost 20 years ago already!</description><pubDate>Sat, 14 Mar 2026 08:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;img src=&quot;https://dgielis.com/images/posts/oracle-database-26ai-assertions-in-a-world-cup-betting-app/9b9358e7-e67e-4138-b0d3-30e69f3c736d-6cd3a256.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;&lt;p&gt;Recently I was playing again with my World Cup betting application, originally built in 2006 with Oracle APEX. Yes… almost 20 years ago already! 😅&lt;/p&gt;
&lt;p&gt;Back then the database enforced some constraints, but many rules lived in the application layer (read APEX validation, processes, and PL/SQL). That was normal at the time.&lt;/p&gt;
&lt;p&gt;But with Oracle Database 26ai and Assertions (introduced in 23.26.1) we can finally do something really nice:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Write complex business rules directly in the database using SQL.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;No triggers.&lt;br&gt;
No application checks.&lt;br&gt;
Just declarative SQL.&lt;/p&gt;
&lt;p&gt;I absolutely love this direction.&lt;/p&gt;
&lt;p&gt;If you are new to assertions, check the official docs here:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&quot;https://docs.oracle.com/en/database/oracle/oracle-database/26/sqlrf/create-assertion.html&quot;&gt;https://docs.oracle.com/en/database/oracle/oracle-database/26/sqlrf/create-assertion.html&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&quot;https://docs.oracle.com/en/database/oracle/oracle-database/26/cncpt/data-integrity.html#GUID-F87D5640-EACA-43EA-9ACA-8BFAA5C6E8B0&quot;&gt;https://docs.oracle.com/en/database/oracle/oracle-database/26/cncpt/data-integrity.html#GUID-F87D5640-EACA-43EA-9ACA-8BFAA5C6E8B0&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;And a great blog post from the Oracle SQL team:&lt;br&gt;
&lt;a href=&quot;https://blogs.oracle.com/sql/how-to-define-cross-table-constraints-with-assertions-in-oracle-ai-database&quot;&gt;https://blogs.oracle.com/sql/how-to-define-cross-table-constraints-with-assertions-in-oracle-ai-database&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;But instead of theory, I like &lt;strong&gt;real problems&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;So let’s look at a fun one.&lt;/p&gt;
&lt;h2 id=&quot;the-problem-prevent-impossible-bets&quot;&gt;The Problem: Prevent “Impossible Bets”&lt;/h2&gt;
&lt;p&gt;In the World Cup betting app, users predict match results.&lt;/p&gt;
&lt;p&gt;The tables look like this:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;W14_MATCH&lt;/code&gt; contains the official match info.&lt;br&gt;
&lt;code&gt;W14_BET&lt;/code&gt; contains the user’s prediction.&lt;/p&gt;
&lt;p&gt;Example:&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Match&lt;/th&gt;
&lt;th&gt;Prediction&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Brazil vs Germany&lt;/td&gt;
&lt;td&gt;2-1&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Spain vs France&lt;/td&gt;
&lt;td&gt;0-0&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;Pretty simple.&lt;/p&gt;
&lt;p&gt;But knockout matches introduce an interesting problem. A knockout match cannot end in a draw. If the regular score is equal, the winner is decided by extra penalties.&lt;/p&gt;
&lt;p&gt;Our table supports this:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;HOME_SCORE&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;VISIT_SCORE&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;HOME_EXTRA_PENALTIES&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;VISIT_EXTRA_PENALTIES&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;So a valid knockout bet could be:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;2 - 2&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Penalties: 5 - 4&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;But what should never happen is this:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;2 - 2&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Penalties: NULL - NULL&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;That means no winner.&lt;/p&gt;
&lt;p&gt;And even worse:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;2 - 2&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Penalties: 3 - 3&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Also impossible.&lt;/p&gt;
&lt;p&gt;Until now this kind of rule normally lived in:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;application validations&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;triggers&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;complex PL/SQL&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;But now we can express it &lt;strong&gt;as a single SQL rule&lt;/strong&gt;.&lt;/p&gt;
&lt;h2 id=&quot;the-assertion-solution&quot;&gt;The Assertion Solution&lt;/h2&gt;
&lt;p&gt;Let’s define the rule:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;If a bet predicts a draw, then the penalties must exist and produce a winner.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;This involves &lt;strong&gt;multiple columns and conditional logic&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Perfect use case for an &lt;strong&gt;assertion&lt;/strong&gt;.&lt;/p&gt;
&lt;h3 id=&quot;step-1-create-the-assertion&quot;&gt;Step 1. Create the Assertion&lt;/h3&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;CREATE ASSERTION bet_knockout_must_have_winner&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;CHECK (&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  ALL (&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    SELECT b.home_score, b.visit_score,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;           b.home_extra_penalties, b.visit_extra_penalties&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    FROM w14_bet b&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    WHERE b.home_score = b.visit_score&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  ) b&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  SATISFY (&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    b.home_extra_penalties IS NOT NULL&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    AND b.visit_extra_penalties IS NOT NULL&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    AND b.home_extra_penalties &amp;lt;&amp;gt; b.visit_extra_penalties&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  )&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;What does this do?&lt;/p&gt;
&lt;p&gt;The assertion ensures that no row exists where:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;The predicted score is a draw&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;AND penalties are missing or tied&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;If such a row appears, the database rejects the transaction.&lt;/p&gt;
&lt;p&gt;Simple. Clear. Declarative.&lt;/p&gt;
&lt;h3 id=&quot;step-2-lets-test-it&quot;&gt;Step 2. Let’s Test It&lt;/h3&gt;
&lt;p&gt;Valid Bet&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;INSERT INTO w14_bet&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;(ID, USER_ID, MATCH_ID, HOME_SCORE, VISIT_SCORE,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt; HOME_EXTRA_PENALTIES, VISIT_EXTRA_PENALTIES,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt; CREATED_BY, CREATED_DATE)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;VALUES&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;(1, 10, 5, 2, 2, 5, 4, &apos;DIMITRI&apos;, SYSDATE);&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Result:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;1 row inserted.&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Good.&lt;/p&gt;
&lt;p&gt;Now an invalid bet.&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;INSERT INTO w14_bet&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;(ID, USER_ID, MATCH_ID, HOME_SCORE, VISIT_SCORE,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt; HOME_EXTRA_PENALTIES, VISIT_EXTRA_PENALTIES,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt; CREATED_BY, CREATED_DATE)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;VALUES&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;(2, 10, 5, 2, 2, NULL, NULL, &apos;DIMITRI&apos;, SYSDATE);&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Result:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;SQL Error: ORA-08601: SQL assertion (BET_KNOCKOUT_MUST_HAVE_WINNER) violated.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Help: https://docs.oracle.com/error-help/db/ora-08601/&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;More Details :&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;https://docs.oracle.com/error-help/db/ora-08601/&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Exactly what we want. The &lt;strong&gt;database protects the integrity of the data&lt;/strong&gt;.&lt;/p&gt;
&lt;h2 id=&quot;why-this-matters&quot;&gt;Why This Matters&lt;/h2&gt;
&lt;p&gt;This might look like a small rule, but in real systems things get complicated quickly.&lt;/p&gt;
&lt;p&gt;Think about rules like:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;A building cannot consume more power than the grid supplies&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;A hospital cannot schedule more patients than rooms available&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;A betting pool must have exactly one winner per match&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;A smart city cannot exceed environmental limits&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;These rules often span &lt;strong&gt;multiple tables or conditional logic&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Before assertions we had to rely on:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;triggers&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;application validations&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;batch data cleanup&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Now we can express them as &lt;strong&gt;true data integrity rules&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Readable SQL. Centralized. Guaranteed.&lt;/p&gt;
&lt;p&gt;I really like that.&lt;/p&gt;
&lt;h2 id=&quot;why-i-love-this-feature&quot;&gt;Why I Love This Feature&lt;/h2&gt;
&lt;p&gt;Assertions make the database smarter.&lt;/p&gt;
&lt;p&gt;And honestly, the &lt;strong&gt;Oracle Database has always been the best place for business rules&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;We are just getting better tools to express them.&lt;/p&gt;
&lt;p&gt;When I look back at the APEX app I built in 2006, many rules were in PL/SQL and page validations. If I would rebuild it today, a lot of that logic would move to assertions.&lt;/p&gt;
&lt;p&gt;Cleaner architecture. Safer data. Less code. And that is always a good thing.&lt;/p&gt;
&lt;p&gt;If you haven’t played with Assertions in Oracle Database 26ai, go and try them out.&lt;br&gt;
If you don’t have a local DB and you want to try it, &lt;a href=&quot;https://freesql.com/&quot;&gt;Oracle FreeSQL&lt;/a&gt; is very cool:&lt;/p&gt;
&lt;p&gt;(note: at the time of writing the environment of FreeSQL was still 23.26, while you need 23.26.1 to get assertions to work)&lt;/p&gt;
</content:encoded><category>Oracle APEX &amp; Database</category><category>oracle-database</category><category>sql</category></item><item><title>Oracle APEX 25.1 and beyond</title><link>https://dgielis.com/oracle-apex-251-and-beyond</link><guid isPermaLink="true">https://dgielis.com/oracle-apex-251-and-beyond</guid><description>Why there is no Oracle APEX 25.1 yet, and what Oracle showed at Kscope about the next release: APEXlang, AI-generated apps, AI in Interactive Reports, a new Advisor and features for large teams.</description><pubDate>Wed, 15 Oct 2025 15:17:55 GMT</pubDate><content:encoded>&lt;p&gt;&lt;img src=&quot;https://dgielis.com/images/posts/oracle-apex-251-and-beyond/d8e3b7ac-d010-414a-adae-e7317f0f10a2-e1e8725b.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;&lt;p&gt;Since Oracle has been quiet about the new release of &lt;a href=&quot;https://apex.oracle.com&quot;&gt;Oracle APEX&lt;/a&gt;, the community has wondered what happened to the next release. I thought it would be helpful to write about what I know for &lt;a href=&quot;https://oracle-base.com/blog/2025/09/24/joel-kallman-day-2025-announcement/&quot;&gt;Joel Kallman Day&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;In recent years, Oracle has released two versions of APEX annually, typically in April and October. However, starting with Oracle APEX 24.2, the release schedule slipped slightly, and 24.2 was released early in 2025. There has been no new 25 release yet.&lt;/p&gt;
&lt;p&gt;Why no release? From what I understand, the next version of Oracle APEX will introduce an entirely new way of developing Oracle APEX apps using AI, but that will take time. I expect that there won’t be a new release this year, but that Oracle will do the next release early next year. I even think it will be called Oracle APEX 26.1, in line with the new &lt;a href=&quot;https://www.oracle.com/database/26ai/&quot;&gt;Oracle AI Database 26ai&lt;/a&gt; version.&lt;/p&gt;
&lt;p&gt;At the &lt;a href=&quot;https://www.odtug.com/kscope25&quot;&gt;KScope&lt;/a&gt; conference in June, Oracle provided us with insight into what is coming.&lt;/p&gt;
&lt;p&gt;The next version of Oracle APEX is built around five key themes:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Generative Development and Al&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;User Experience&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Developer Experience&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Enterprise Readiness&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Community Ideas&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;gendev--ai&quot;&gt;GenDev &amp;amp; AI&lt;/h2&gt;
&lt;p&gt;The use of AI is evident in all facets of Oracle APEX, from development to the features we offer to the users of the applications we build.&lt;/p&gt;
&lt;h3 id=&quot;apex-ai-application-generator&quot;&gt;APEX AI Application Generator&lt;/h3&gt;
&lt;p&gt;There will be an entirely new way of building your APEX apps, simply by describing how you want your APEX app to function. This is made possible by introducing a new open application specification, called APEXlang. Here’s a screenshot of the announcement by Juan Loaiza in his &lt;a href=&quot;https://x.com/i/broadcasts/1dRKZaVknrwxB&quot;&gt;keynote&lt;/a&gt; at Oracle AI World.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://dgielis.com/images/posts/oracle-apex-251-and-beyond/e6039792-8381-480d-b6cb-156f8d53ef8e-eb244400.webp&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;h3 id=&quot;apexlang&quot;&gt;APEXlang&lt;/h3&gt;
&lt;p&gt;APEXlang looks like a combination of YAML and JSON. Your entire Oracle APEX app can be built using a text (APEXlang) file. For example, you can add a region name, title, type, and SQL, and everything else will use the default. If you define something in the text file, it will overwrite the default. This APEXlang file will be used to generate your APEX app.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://dgielis.com/images/posts/oracle-apex-251-and-beyond/41f3ba29-8e04-4578-a9b3-100baef6fe55-db18b09b.webp&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;The benefits of the APEXlang file extend far beyond AI. Martin D’Souza presented APEXlang at KScope and demonstrated what it can do. Here’s a screenshot of one of his slides:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://dgielis.com/images/posts/oracle-apex-251-and-beyond/37e7c7c2-602f-4755-8fef-5d0b94f7af83-20dbfb07.webp&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;An APEX export file, in the APEXlang format, is human-readable and is easily version-controlled. It allows you to make bulk changes straight in the text file by easy search/replace. This will open a whole new way of doing development with APEX. I envision myself building the initial version of the app using AI and describing what I want. It will generate the text file, which will then be used to generate the APEX app (metadata). I can make changes in the browser (Low-Code) and continue this way. If I need to bulk update something at some point, I can export the app, modify the exported APEXlang file, and redeploy the new version. I might even develop primarily text-based solutions in VS Code and let APEX deploy the latest version repeatedly. Doing text-based development also allows merging multiple developers’ changes, etc.&lt;/p&gt;
&lt;h3 id=&quot;ai-tools&quot;&gt;AI Tools&lt;/h3&gt;
&lt;p&gt;We can also make our APEX apps smarter using AI tools (functions). Before, you would give all your data to the AI (LLM), and you could ask questions. This wasn’t particularly performant, as you had to send a large amount of data across. The better approach is to use AI Tools, letting AI know how to obtain the information it needs. Here’s an example:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://dgielis.com/images/posts/oracle-apex-251-and-beyond/0672fd3c-8f29-43bf-87d2-123c1b41fd58-16b54f7b.webp&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;And a screenshot of how it is configured in the APEX builder:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://dgielis.com/images/posts/oracle-apex-251-and-beyond/e789a4df-5f88-4ede-abed-01fe5570bfcc-8679c21f.webp&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;Note that if you want to use AI today, we at United Codes have created a &lt;a href=&quot;https://www.united-codes.com/ai/&quot;&gt;UC AI package&lt;/a&gt; that can help you significantly.&lt;/p&gt;
&lt;h3 id=&quot;ai-in-interactive-reports&quot;&gt;AI in Interactive Reports&lt;/h3&gt;
&lt;p&gt;Another notable feature in the next version of Oracle APEX is the integration of AI into Interactive Reports. You can ask questions in natural language to your Interactive Report, and it will add filters on the fly for you, perform breaks, etc.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://dgielis.com/images/posts/oracle-apex-251-and-beyond/48680f0e-a622-4e6b-859d-425489ff3bcf-c300e261.webp&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;It can even create charts, or you can have a chat with your IR data, and a chat panel opens on the right where you can dig deeper into your data.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://dgielis.com/images/posts/oracle-apex-251-and-beyond/a39c1ba7-7daf-4a21-a6cb-8101112a5a30-c5250821.webp&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;h2 id=&quot;user-experience&quot;&gt;User Experience&lt;/h2&gt;
&lt;p&gt;A new version of Universal Theme is currently in development. Not sure if it will make the next version of Oracle APEX, but I hope so :) A fresh new look &amp;amp; feel would be fantastic.&lt;/p&gt;
&lt;p&gt;This new theme will also enable new mobile features.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://dgielis.com/images/posts/oracle-apex-251-and-beyond/4ae055bf-ad03-4642-b1a8-f4b36e154b36-dd4a931f.webp&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;h2 id=&quot;developer-experience&quot;&gt;Developer Experience&lt;/h2&gt;
&lt;p&gt;There are new features to make our lives as developers easier. There will be built-in live checks, much like what we offer with our QA Assistant in &lt;a href=&quot;https://www.united-codes.com/products/apexprojecteye/&quot;&gt;APEX Project Eye&lt;/a&gt; (APE).&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://dgielis.com/images/posts/oracle-apex-251-and-beyond/e5e0b424-5b92-4dcb-ad6c-79402ef04ee3-7e7de2d9.webp&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;Here’s a screenshot of how the new Advisor looks when an error occurs:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://dgielis.com/images/posts/oracle-apex-251-and-beyond/265dae57-573d-4be7-b06f-6339e03ca92e-53e370a4.webp&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;Having errors and checks directly in the builder is beneficial; more importantly, you can mark exceptions for false positives.&lt;/p&gt;
&lt;p&gt;At &lt;a href=&quot;https://www.united-codes.com&quot;&gt;United Codes&lt;/a&gt;, we place a strong emphasis on developer experience. If you haven’t checked out &lt;a href=&quot;https://www.united-codes.com/products/apexprojecteye/&quot;&gt;APEX Project Eye&lt;/a&gt; yet, I strongly advise you to check it out! It provides significant insights into your APEX apps, while also aiding in their development, maintenance, and monitoring.&lt;/p&gt;
&lt;h2 id=&quot;enterprise-readiness&quot;&gt;Enterprise Readiness&lt;/h2&gt;
&lt;p&gt;Oracle is using APEX itself extensively to rebuild the Cerner healthcare applications. Huge teams are building now apps using Oracle APEX. To make the apps consistent and easy for developers to share and reuse, a new section has been added to APEX called Pattern Pages and a Global Repository.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://dgielis.com/images/posts/oracle-apex-251-and-beyond/22f3628d-ff35-4570-8a46-4c7cdfe95d79-a2c72eae.webp&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://dgielis.com/images/posts/oracle-apex-251-and-beyond/aaf0a705-b2a5-4132-8bec-956b5343c311-b31ecd7d.webp&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://dgielis.com/images/posts/oracle-apex-251-and-beyond/2bb0a2e2-5e6c-4732-9474-947808408a93-9f5b8226.webp&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://dgielis.com/images/posts/oracle-apex-251-and-beyond/56fb9793-f419-4623-92c7-7994f009aa6b-18978bda.webp&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;We will explore why more features are being developed for large teams, as Oracle also requires this functionality.&lt;/p&gt;
&lt;h3 id=&quot;community-ideas&quot;&gt;Community Ideas&lt;/h3&gt;
&lt;p&gt;Finally, many new features were added that were submitted by the community through the &lt;a href=&quot;https://apexapps.oracle.com/pls/apex/r/apex_pm/ideas/home&quot;&gt;APEX Ideas&lt;/a&gt; app.&lt;/p&gt;
&lt;p&gt;If you want APEX to do something, submit it there, and the APEX team might pick it up in the future!&lt;br&gt;
If you can’t wait till the next version of APEX, you can always let us know, too. With our Oracle APEX &lt;a href=&quot;https://www.united-codes.com/products/plug-ins-pro/&quot;&gt;Plug-ins Pro&lt;/a&gt; offering, we are extending APEX while supporting and maintaining it.&lt;/p&gt;
&lt;p&gt;Hopefully, this post provides you with some insight into what’s to come. Oracle mentioned these things at APEX conferences, but hasn’t been very public about it. You can also refer to the &lt;a href=&quot;https://apex.oracle.com/roadmap/&quot;&gt;APEX Roadmap&lt;/a&gt;, which is the official Oracle page that outlines upcoming features.&lt;/p&gt;
</content:encoded><category>Oracle APEX &amp; Database</category><category>oracle-apex</category><category>orclapex</category><category>joel-kallman-day</category></item><item><title>Making File Upload required in Oracle APEX</title><link>https://dgielis.com/making-file-upload-required-in-oracle-apex</link><guid isPermaLink="true">https://dgielis.com/making-file-upload-required-in-oracle-apex</guid><description>Making the File Upload a required field is difficult with Oracle APEX 24.1 or earlier. In this post, I will show you the solution I use until Oracle APEX&apos;s native behavior improves.</description><pubDate>Wed, 24 Jul 2024 02:42:01 GMT</pubDate><content:encoded>&lt;p&gt;&lt;img src=&quot;https://dgielis.com/images/posts/making-file-upload-required-in-oracle-apex/c2ecd309-e158-4ed3-bb16-0d1e734ffc4c-e3292417.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;&lt;p&gt;Making the File Upload a required field is difficult with Oracle APEX 24.1 or earlier. In this post, I will show you the solution I use until Oracle APEX’s native behavior improves.&lt;/p&gt;
&lt;p&gt;The definition of my table:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;sql&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;create&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt; table&lt;/span&gt;&lt;span style=&quot;color:#6F42C1;--shiki-dark:#B392F0&quot;&gt; xfile&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;(	id           &lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;number&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt; generated&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt; by&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt; default&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt; on&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt; null&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt; as&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt; identity&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;                 constraint&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt; xfile_pk &lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;primary key&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;	app_id       &lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;number&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt; not null&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;, &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;	name&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;         varchar2&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt;400&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;) &lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;not null&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;, &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;	filename&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;     varchar2&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt;400&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;) &lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;not null&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;,  &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;	mime_type    &lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;varchar2&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt;255&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;) &lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;not null&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;,  &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;	created_on   &lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;date&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt; default&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt; sysdate&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt; not null&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;,  &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;	blob_content blob &lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;not null&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Create an Interactive Report with Form on this table:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://dgielis.com/images/posts/making-file-upload-required-in-oracle-apex/404c0f94-01bc-42a6-a3b2-b6a5c1ec39e0-38f578f3.webp&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;When you run the page and create a new record but forget to add a file, you will receive this:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://dgielis.com/images/posts/making-file-upload-required-in-oracle-apex/a8e7e45e-18e3-4d8c-8ee1-cac47c437c78-8d36e7f5.webp&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;This is perfect, just like we want. The blob content item has the required value flag set automatically, because APEX picked up the “not null” constraint from the table. Because of this flag, APEX raises the error when no file is selected.&lt;/p&gt;
&lt;p&gt;Now, what happens if we edit the record?&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://dgielis.com/images/posts/making-file-upload-required-in-oracle-apex/f3637ac3-e30d-41fc-a641-0de1ed311080-28ed2312.webp&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;Although there is a file, APEX still complains that there is no file. This is not the behavior we want! Whenever there is a file, it should not give an error. The issue is that APEX doesn’t detect that a file has already been selected before.&lt;/p&gt;
&lt;p&gt;To work around this issue, I set the “Value Required” on the item to no and wrote my own validation.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://dgielis.com/images/posts/making-file-upload-required-in-oracle-apex/274bc136-9a27-451f-b434-5f5957f7a107-eec38585.webp&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;My custom validation “Check for required blob”:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://dgielis.com/images/posts/making-file-upload-required-in-oracle-apex/b8223a73-4e83-410a-9a00-42e0f3c9fd7e-ce9eaa7c.webp&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;The code looks like this, I added debug messages to explain what it does:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;sql&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;declare&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;  l_exists &lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;varchar2&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;) :&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; &apos;N&apos;&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;begin&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt;  apex_debug&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt;message&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;&apos;## The id is: &apos;&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt; ||&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt; :P3_ID);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt;  apex_debug&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt;message&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;&apos;## The value of blob content is: &apos;&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt; ||&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt; :P3_BLOB_CONTENT);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;  if&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt; :P3_ID &lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;is&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt; null&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt; and&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt; :P3_BLOB_CONTENT &lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;is not null&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;  then&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt;    apex_debug&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt;message&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;&apos;## New record and blob filled in.&apos;&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;    l_exists :&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; &apos;Y&apos;&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;    &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;  elsif :P3_ID &lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;is not null&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;  then&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt;    apex_debug&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt;message&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;&apos;## We need to find a blob for id: &apos;&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt; ||&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt; :P3_ID);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;    begin&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;      select&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; &apos;Y&apos;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;        into&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt; l_exists&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;        from&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt; xfile&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;       where&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt; id &lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt; to_number(:P3_ID)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;         and&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt; blob_content &lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;is not null&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;; &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;   &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt;      apex_debug&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt;message&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;&apos;## We are good.&apos;&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;    exception&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;    when&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt; no_data_found&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;    then&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt;      apex_debug&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt;message&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;&apos;## We did not find a blob.&apos;&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;    end&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;  end&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt; if&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt;  apex_debug&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt;message&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;&apos;## Exists: &apos;&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt; ||&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt; l_exists);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;  if&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt; l_exists &lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; &apos;Y&apos;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;  then&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;    return&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt; true;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;  else&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;  &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;    return&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt; false;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;  end&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt; if&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;;  &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This code checks whether a blob is present when creating a new record or editing an existing record.&lt;/p&gt;
&lt;p&gt;The page allows you to remove a file by clicking the X:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://dgielis.com/images/posts/making-file-upload-required-in-oracle-apex/624ba501-f4f1-4118-a389-0f4bbf671424-9637053a.webp&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;But when you do, Oracle APEX doesn’t remove the file until you select another file. This is why the above code for the validation works, but it would have been cool if we could detect if the file was effectively removed.&lt;/p&gt;
&lt;p&gt;So, an &lt;strong&gt;alternative&lt;/strong&gt; solution to the above is detecting if a blob exists. This solution is a bit more complex since it has more moving pieces.&lt;/p&gt;
&lt;p&gt;Create a hidden item on the page called P3_BLOB_EXISTS and make sure the item is not “Value Protected”.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://dgielis.com/images/posts/making-file-upload-required-in-oracle-apex/156c324c-1991-41ee-9c56-63629c86062d-a846e04d.webp&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;We will fill this item with the value Y when there’s a download link or remove button, otherwise the value will be N. &lt;em&gt;Note: checking only for the download link is not enough, since there is a setting to not show the download link.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Add a Dynamic Action called “Blob exists”:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;When - Event: Before Page Submit&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Action - True: Execute JavaScript Code&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;javascript&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;if&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;color:#6F42C1;--shiki-dark:#B392F0&quot;&gt;$&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;&quot;.a-FileDrop-download&quot;&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;).&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt;length&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt; &amp;gt;&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt; 0&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;    ||&lt;/span&gt;&lt;span style=&quot;color:#6F42C1;--shiki-dark:#B392F0&quot;&gt; $&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;&quot;.a-FileDrop-remove&quot;&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;).&lt;/span&gt;&lt;span style=&quot;color:#6F42C1;--shiki-dark:#B392F0&quot;&gt;attr&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;&apos;tabindex&apos;&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;) &lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;==&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt; 0&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;  apex.&lt;/span&gt;&lt;span style=&quot;color:#6F42C1;--shiki-dark:#B392F0&quot;&gt;item&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;&quot;P3_BLOB_EXISTS&quot;&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;).&lt;/span&gt;&lt;span style=&quot;color:#6F42C1;--shiki-dark:#B392F0&quot;&gt;setValue&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;&quot;Y&quot;&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;} &lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;else&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;  apex.&lt;/span&gt;&lt;span style=&quot;color:#6F42C1;--shiki-dark:#B392F0&quot;&gt;item&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;&quot;P3_BLOB_EXISTS&quot;&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;).&lt;/span&gt;&lt;span style=&quot;color:#6F42C1;--shiki-dark:#B392F0&quot;&gt;setValue&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;&quot;N&quot;&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;);  &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Here’s a screenshot of what that looks like:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://dgielis.com/images/posts/making-file-upload-required-in-oracle-apex/406a12a4-8285-4da8-a45f-e1dc06ca2bc5-20b5ec45.webp&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;We will change our Validation “Check for required blob” to the following:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;sql&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;declare&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;  l_blob_content &lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;varchar2&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt;255&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;) :&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt; :P3_BLOB_CONTENT;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;  l_blob_exists  &lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;varchar2&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;)   :&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt; :P3_BLOB_EXISTS;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;begin&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt;  apex_debug&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt;message&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;&apos;## The value of blob content is: &apos;&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt; ||&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt; l_blob_content);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt;  apex_debug&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt;message&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;&apos;## Did a blob exist before: &apos;&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt; ||&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt; l_blob_exists);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;  if&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt; l_blob_content &lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;is not null&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;  then&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt;    apex_debug&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt;message&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;&apos;## A new blob is added.&apos;&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;    return&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt; true;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;  else&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt;    apex_debug&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt;message&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;&apos;## The blob item is empty.&apos;&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;    if&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt; l_blob_exists &lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; &apos;Y&apos;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;    then&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt;      apex_debug&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt;message&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;&apos;## A blob existed before.&apos;&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;      return&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt; true;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;    else&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt;      apex_debug&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt;message&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;&apos;## A blob is missing.&apos;&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;      return&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt; false;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;    end&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt; if&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;; &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;  end&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt; if&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Here’s a screenshot of the validation:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://dgielis.com/images/posts/making-file-upload-required-in-oracle-apex/ea69321c-5d6b-4fc8-9f4d-a7754212a998-02ea21c2.webp&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;So now, when you create a record and don’t upload a file or when you edit the record and remove the file, APEX will say the field is required. And more importantly, APEX won’t complain anymore when you edit the record and don’t touch the file (blob).&lt;/p&gt;
</content:encoded><category>Oracle APEX &amp; Database</category><category>oracle-apex</category><category>orclapex</category></item><item><title>ORDS - SQL Developer Web: Fix Invalid credentials</title><link>https://dgielis.com/ords-sql-developer-web-fix-invalid-credentials</link><guid isPermaLink="true">https://dgielis.com/ords-sql-developer-web-fix-invalid-credentials</guid><description>I had a weird issue with some Oracle database users I wanted to connect to in SQL Developer Web.</description><pubDate>Wed, 22 Nov 2023 18:42:03 GMT</pubDate><content:encoded>&lt;p&gt;&lt;img src=&quot;https://dgielis.com/images/posts/ords-sql-developer-web-fix-invalid-credentials/af6b3874-53e2-4bcc-a67a-c79269887b93-7a55b1f0.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;&lt;p&gt;I had a weird issue with some Oracle database users I wanted to connect to in SQL Developer Web.&lt;/p&gt;
&lt;p&gt;When I tried to log in at &lt;strong&gt;&lt;a href=&quot;https://hostname/ords/sql-developer&quot;&gt;https://hostname/ords/sql-developer&lt;/a&gt;&lt;/strong&gt;, I received the error: Invalid credentials: If your ORDS schema alias is different from your username, you can set it using the “Path” input in the “Advanced” options.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://dgielis.com/images/posts/ords-sql-developer-web-fix-invalid-credentials/37fea48d-7ae6-44b6-97c9-e5541f2d65e7-0e99bd63.webp&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;I also tried to log in at &lt;strong&gt;&lt;a href=&quot;https://hostname/ords/aop%5C_tst/sign-in/&quot;&gt;https://hostname/ords/aop\_tst/sign-in/&lt;/a&gt;,&lt;/strong&gt; but then I got the error: Invalid credentials.&lt;/p&gt;
&lt;p&gt;Finally, when I tried to log in at &lt;strong&gt;&lt;a href=&quot;https://hostname/ords/aop%5C_tst/%5C_sdw/?nav=worksheet&quot;&gt;https://hostname/ords/aop\_tst/\_sdw/?nav=worksheet&lt;/a&gt;&lt;/strong&gt; it worked for me.&lt;/p&gt;
&lt;p&gt;In case it’s still not working for you, it might help to close and re-open your browser, at least that worked for me.&lt;/p&gt;
&lt;p&gt;Once I was successfully logged in, the next time I could log in directly at &lt;strong&gt;&lt;a href=&quot;https://hostname/ords/sql-developer&quot;&gt;https://hostname/ords/sql-developer&lt;/a&gt;&lt;/strong&gt; without any issues.&lt;/p&gt;
&lt;p&gt;Note that this behavior was only for a couple of users. When I created a user like in the next script, it worked straight away.&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;create tablespace uc_dev datafile &apos;/u01/oradata/CDB1/dev/uc_dev01.dbf&apos; size 50M autoextend on next 50M maxsize unlimited default table compress for oltp index compress advanced high;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;create user uc_dev identified by secret default tablespace uc_dev quota unlimited on uc_dev temporary tablespace temp;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;grant connect to uc_dev;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;grant create job to uc_dev;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;grant create dimension to uc_dev;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;grant create indextype to uc_dev;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;grant create operator to uc_dev;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;grant create type to uc_dev;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;grant create materialized view to uc_dev;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;grant create trigger to uc_dev;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;grant create procedure to uc_dev;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;grant create sequence to uc_dev;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;grant create view to uc_dev;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;grant create synonym to uc_dev;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;grant create cluster to uc_dev;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;grant create table to uc_dev;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;grant create session to uc_dev;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;grant execute on ctxsys.ctx_ddl to uc_dev;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;begin&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  ords_admin.enable_schema(p_schema =&amp;gt; &apos;uc_dev&apos;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;end;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;/&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I couldn’t identify a reason why for some database users it’s not working straight away, but hope that this workaround helps you too, when you encounter the same error.&lt;/p&gt;
</content:encoded><category>Oracle APEX &amp; Database</category><category>ords</category><category>oracle-database</category></item><item><title>A story about Joel and APEX Office Print (AOP) #JoelKallmanDay</title><link>https://dgielis.com/a-story-about-joel-and-apex-office-print-aop-joelkallmanday</link><guid isPermaLink="true">https://dgielis.com/a-story-about-joel-and-apex-office-print-aop-joelkallmanday</guid><description>Since this is the special Joel Kallman day, I thought to share a story about how document generation with AOP started at Oracle&apos;s internal APEX environment.</description><pubDate>Wed, 11 Oct 2023 14:39:47 GMT</pubDate><content:encoded>&lt;p&gt;&lt;img src=&quot;https://dgielis.com/images/posts/a-story-about-joel-and-apex-office-print-aop-joelkallmanday/94e0138d-b53c-4a6d-8704-7f2199a0f29d-7d7232ae.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;&lt;p&gt;Since this is the special Joel Kallman day, I thought to share a story about how document generation with AOP started at Oracle’s internal APEX environment.&lt;/p&gt;
&lt;p&gt;Today it might be normal for people to use &lt;a href=&quot;https://www.apexofficeprint.com&quot;&gt;APEX Office Print (AOP)&lt;/a&gt; to do their document generation in &lt;a href=&quot;https://apex.oracle.com&quot;&gt;Oracle APEX&lt;/a&gt;, but back in 2017, it wasn’t.&lt;/p&gt;
&lt;p&gt;We were only around for two years and weren’t as proven as we are today, but Joel really believed in us. On July 11th, 2017 I got the following email from Joel:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://dgielis.com/images/posts/a-story-about-joel-and-apex-office-print-aop-joelkallmanday/d922ef1b-dacc-4ec7-9e40-941428e3b8c5-c324ac41.webp&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;Two weeks later AOP was running inside Oracle, so every department using the internal APEX instance could start generating PDFs, Excels, and other documents.&lt;/p&gt;
&lt;p&gt;Joel himself installed AOP and created an internal site to explain what AOP was and how to get started. Today the internal Oracle APEX instance is maintained by other people as it has become a very big instance. The single AOP Server installed by Joel in 2017, has become six AOP servers maintained by the OPS team, but I will never forget how it all started.&lt;/p&gt;
&lt;p&gt;Just as Joel served the entire APEX community, we want to do the same and constantly push ourselves to improve. We want to keep Joel’s energy going by turning developers into rock stars. For us, it means making you successful in generating, editing, and managing documents and having the best integration with APEX that we can.&lt;/p&gt;
&lt;p&gt;I’m very thankful for Joel. APEX Office Print is definitely more successful because of his support. We miss you, my friend.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://dgielis.com/images/posts/a-story-about-joel-and-apex-office-print-aop-joelkallmanday/a80d78c5-9a5a-4878-8deb-5111b3b65954-b14429f3.webp&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
</content:encoded><category>Oracle APEX &amp; Database</category><category>oracle-apex</category><category>orclapex</category><category>aop</category><category>joel-kallman-day</category></item><item><title>Compare 2 Oracle APEX pages</title><link>https://dgielis.com/compare-2-oracle-apex-pages</link><guid isPermaLink="true">https://dgielis.com/compare-2-oracle-apex-pages</guid><description>I wanted to know if a page was the same within the same application. Two (+1 in Oracle APEX 22.1+) features in Oracle APEX help to compare pages, which you find under the tools menu: Checksum and…</description><pubDate>Tue, 15 Aug 2023 11:37:11 GMT</pubDate><content:encoded>&lt;p&gt;&lt;img src=&quot;https://dgielis.com/images/posts/compare-2-oracle-apex-pages/587ef65b-03c0-478d-a4f1-a1641b2994c6-bfffde65.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;&lt;p&gt;I wanted to know if a page was the same within the same application.&lt;/p&gt;
&lt;p&gt;Two (+1 in Oracle APEX 22.1+) features in Oracle APEX help to compare pages, which you find under the tools menu: Checksum and Export:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://dgielis.com/images/posts/compare-2-oracle-apex-pages/0dd40db4-ad7f-4a22-8b65-9eff2ad069ab-94277815.webp&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;The checksum will show the &lt;strong&gt;checksum&lt;/strong&gt; of the page. This feature works great when you want to compare the same pages in different applications. In case the page number is different, the checksum will be different, so this feature won’t help to compare different pages within the same application.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://dgielis.com/images/posts/compare-2-oracle-apex-pages/eee4ae7e-8803-4f3b-999f-3a269feb5668-945ab313.webp&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;The &lt;strong&gt;page export&lt;/strong&gt; feature works better if you want to compare pages inside the same application.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://dgielis.com/images/posts/compare-2-oracle-apex-pages/06192756-8b17-426c-a84e-02b666147e9f-312b3fc7.webp&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;Exporting a page generates a SQL file. I then compare both SQL files in Visual Studio Code. Some ids will be different, but you can ignore those. For me, this technique works well to quickly identify differences between the two pages.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://dgielis.com/images/posts/compare-2-oracle-apex-pages/e90d3f61-4ac6-4889-aab8-e73a517b326e-b692e870.webp&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;It would have been even easier if the Oracle APEX team provided the option to export the page in a &lt;strong&gt;readable format&lt;/strong&gt;, but this feature is only available when you export the entire application (Oracle APEX 22.1 and above).&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://dgielis.com/images/posts/compare-2-oracle-apex-pages/f1e02752-0d1f-4727-bbaa-7b79a7e2ac89-7258c677.webp&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;When exporting in a readable format, you will get a zip file that contains a readable folder. In there, you find the pages in a JSON format.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://dgielis.com/images/posts/compare-2-oracle-apex-pages/22aba95c-be15-4d41-a153-abd71df06cff-ca85cb99.webp&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;Now you can &lt;strong&gt;compare the JSON files&lt;/strong&gt; (just like we compared the SQL files before), but this time it’s a bit more readable.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://dgielis.com/images/posts/compare-2-oracle-apex-pages/fa5abc87-f107-4950-a20a-ae9c4bd90e90-cf68b3ae.webp&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;In case you want to &lt;strong&gt;compare entire applications&lt;/strong&gt;, you can use the application checksum feature which you find in the Utilities section of your Oracle APEX app.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://dgielis.com/images/posts/compare-2-oracle-apex-pages/9aa5e9df-47c2-4be4-b91b-5f5cdcce60e9-bec792c6.webp&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
</content:encoded><category>Oracle APEX &amp; Database</category><category>oracle-apex</category><category>orclapex</category></item><item><title>The application alias &quot;X&quot; can not be converted to a unique application ID.</title><link>https://dgielis.com/the-application-alias-x-can-not-be-converted-to-a-unique-application-id</link><guid isPermaLink="true">https://dgielis.com/the-application-alias-x-can-not-be-converted-to-a-unique-application-id</guid><description>You get this error when two or more Oracle APEX applications have the same alias.</description><pubDate>Fri, 04 Aug 2023 16:55:57 GMT</pubDate><content:encoded>&lt;p&gt;You get this error when two or more Oracle APEX applications have the same alias.&lt;/p&gt;
&lt;p&gt;When you import the sample application in the same workspace and give it a different ID, the alias is changed automatically so it’s unique. However when you import an application in a different workspace, the alias is not being replaced by a unique value, which might result in the error: “The application alias “X” can not be converted to a unique application ID.”&lt;/p&gt;
&lt;p&gt;There’s an easy way to find where those applications are with the same alias by running the following query (as a DBA or a user with the APEX_ADMINISTRATOR_ROLE):&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;sql&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;select&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt; workspace, application_id, application_name&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;  from&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt; apex_applications&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt; where&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt; alias &lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; &apos;X&apos;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This will give you the workspace, application id, and application name with the specific alias.&lt;/p&gt;
</content:encoded><category>Oracle APEX &amp; Database</category><category>oracle-apex</category><category>orclapex</category></item><item><title>Oracle APEX: the Power of the Activity Logs</title><link>https://dgielis.com/oracle-apex-the-power-of-the-activity-logs</link><guid isPermaLink="true">https://dgielis.com/oracle-apex-the-power-of-the-activity-logs</guid><description>Have you ever had those moments when an end-user calls you out of the blue with a disturbing message about your app?</description><pubDate>Wed, 22 Feb 2023 15:00:56 GMT</pubDate><content:encoded>&lt;p&gt;&lt;img src=&quot;https://dgielis.com/images/posts/oracle-apex-the-power-of-the-activity-logs/e15ef6bf-f7fa-41af-be35-cdb54d29b8a8-e40368d7.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;&lt;h3 id=&quot;the-issue&quot;&gt;The issue&lt;/h3&gt;
&lt;p&gt;Have you ever had those moments when an end-user calls you out of the blue with a disturbing message about your app?&lt;/p&gt;
&lt;p&gt;It happened to me last week; an end-user called in a panic with the message, “all my inspections are gone!”&lt;/p&gt;
&lt;p&gt;FYI: This &lt;a href=&quot;https://apex.oracle.com&quot;&gt;Oracle APEX&lt;/a&gt; application manages all inspections a company is doing. Those inspections are grouped into different categories.&lt;/p&gt;
&lt;h3 id=&quot;my-thoughts&quot;&gt;My thoughts&lt;/h3&gt;
&lt;p&gt;Records don’t disappear automatically, so my mind immediately started to think about the potential reasons why this might have happened:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Did we update the app with an invalid WHERE clause or a bad JOIN?&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Did we have a DELETE process that didn’t have a condition?&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Did a user do a bulk delete action or delete a parent record that caused the child records to go?&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id=&quot;the-investigation&quot;&gt;The investigation&lt;/h3&gt;
&lt;p&gt;On the call, I asked the user to tell me what he saw. It was weird indeed; the categories showed there were zero inspections.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://dgielis.com/images/posts/oracle-apex-the-power-of-the-activity-logs/bebac643-f6de-49e0-bd96-a885ff10d8a5-9c190a44.webp&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;But&lt;/strong&gt; this one category (Thermography) still had two inspections… bizarre.&lt;/p&gt;
&lt;p&gt;I asked a few more questions and got the answers that parents or children were not deleted, bulk actions were not executed, and the records were there in the morning, but were gone in the afternoon.&lt;/p&gt;
&lt;p&gt;As we didn’t deploy a new version of the app, and it worked before, it was a bit of a mystery to me.&lt;/p&gt;
&lt;h3 id=&quot;activity-logs-to-the-rescue&quot;&gt;Activity Logs to the rescue&lt;/h3&gt;
&lt;p&gt;This is when I’m glad Oracle APEX has a built-in feature that logs a user’s activity, which is turned on by default. You find the setting in your Application Attributes:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://dgielis.com/images/posts/oracle-apex-the-power-of-the-activity-logs/5240c9fe-82e1-4c57-844d-53563586c7f9-1c1ca690.webp&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;You can change the default settings of an app in the instance settings (INTERNAL workspace) under Manage Instance &amp;gt; Feature Configuration &amp;gt; Monitoring.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://dgielis.com/images/posts/oracle-apex-the-power-of-the-activity-logs/4db2e905-b71a-4ecd-aa48-a87fdcf83ff2-f813baf1.webp&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;By default, at least 14 days of log data will be stored, but it can be changed in the instance settings under Manage Instance &amp;gt; Manage Log Interval.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://dgielis.com/images/posts/oracle-apex-the-power-of-the-activity-logs/899c328b-4159-401e-af5f-c422e46f0536-162f563e.webp&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;The logs are captured in two different tables: wwv_flow_activity_log1 and wwv_flow_activity_log2. APEX is switching the table used behind the scenes every x days (the setting above). In case you leave the log switch to 14 days, it means that you have 14 to 27 days of activity logs. You don’t have to worry about which table to query to see the data. You instead use the view APEX_WORKSPACE_ACTIVITY_LOG.&lt;/p&gt;
&lt;p&gt;I wanted to give this background as you may want to increase your logs. The maximum amount before a log switch happens is 180 days. If you need more, you need to copy the records to your tables (also read further on that &lt;a href=&quot;https://www.apexprojecteye.com&quot;&gt;APEX Project Eye&lt;/a&gt; can help with this).&lt;/p&gt;
&lt;p&gt;To see the logs, you either query the APEX_WORKSPACE_ACTIVITY_LOG view or you can go to the Monitor Activity section within APEX:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://dgielis.com/images/posts/oracle-apex-the-power-of-the-activity-logs/c8fad74f-c6ef-431f-bd2c-46d1012d9295-261914f0.webp&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;h3 id=&quot;the-proof&quot;&gt;The proof&lt;/h3&gt;
&lt;p&gt;To make the activity more alive, I love to use &lt;a href=&quot;https://www.apexprojecteye.com&quot;&gt;APEX Project Eye (APE)&lt;/a&gt;. APE is a powerhouse of tools that help any Oracle APEX developer and project manager. For me, APEX Project Eye is for Oracle APEX what Enterprise Manager is for the Oracle Database. APE is the most advanced tool to give you insight into your Oracle APEX applications, from how it was developed to how it is being used.&lt;/p&gt;
&lt;p&gt;Back to our investigation on the disappearance of the records… I focused on the window from the morning when the records were there till the records disappeared. In APE, I used &lt;strong&gt;Session Flow&lt;/strong&gt; to see who accessed the application during this period and accessed a page where a delete could have been done. I saw an unusually high number of going back and forth between a report and a form… In Session Flow, it shows lines between pages. The bigger the line between the pages, the more that path was taken. Session Flow also allows you to &lt;strong&gt;replay a session&lt;/strong&gt;. The path gets highlighted, and you get the details of the request.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://dgielis.com/images/posts/oracle-apex-the-power-of-the-activity-logs/ef85a019-5b59-4a7f-8c5e-b110f07df9fc-9434e18d.webp&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;This way, I knew exactly what happened… somebody went into the records individually and deleted them. APE gave me the power to present the end-users precisely when somebody made an action visually.&lt;/p&gt;
&lt;h3 id=&quot;apex-project-eye-helps-in-dev-test-and-prod&quot;&gt;APEX Project Eye helps in DEV, TEST, and PROD&lt;/h3&gt;
&lt;p&gt;We use APEX Project Eye a lot; during &lt;strong&gt;development&lt;/strong&gt; (e.g., quality assurance), during &lt;strong&gt;testing&lt;/strong&gt;, e.g., to review performance and error investigation, and during &lt;strong&gt;production&lt;/strong&gt; to monitor our applications. Session Flow, in particular, is beneficial when APE shows an end-user got an error.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://dgielis.com/images/posts/oracle-apex-the-power-of-the-activity-logs/5c34cf87-1775-492d-9070-c8f00a282704-56924ab8.webp&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;For the error, we see the Session ID, and based on this Session ID, &lt;strong&gt;we can replay their session until the error pops&lt;/strong&gt; up. We know exactly what they did and don’t have to ask for a reproducible case.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://dgielis.com/images/posts/oracle-apex-the-power-of-the-activity-logs/5da23267-656e-4b27-b624-44b99c54ebcd-c70a037c.webp&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;There was another occasion when Session Flow was a rescuer for me. At one point, we had a &lt;strong&gt;security breach&lt;/strong&gt; in one of the apps. At least one person saw data in an Interactive Report that he wasn’t supposed to see. He reached a page he wasn’t supposed to have access to. Using Session Flow, I knew exactly how he came there, how long he had stayed on the page, and what he had done. I could, for example, see that he didn’t download the data from the Interactive Report. &lt;strong&gt;Without Session Flow, I could have probably found out by analyzing the logs, but it would have taken me much more time.&lt;/strong&gt; This was one of the reasons we now have Quality Assurance in APE so that APE can warn us of security risks. Do you know eSert, the popular security scanner for Oracle APEX, from a few years ago? With &lt;strong&gt;APE, you can use all of the eSert rules!&lt;/strong&gt;&lt;/p&gt;
&lt;h3 id=&quot;recap-apes-session-flow&quot;&gt;Recap APE’s Session Flow&lt;/h3&gt;
&lt;p&gt;APE’s Session Flow is fantastic for the following use cases:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;See how people use the application you built.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;View exactly when and how an error occurred.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Have a visual representation when you talk to project managers and end users.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Prove if an action was done or not.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;to-remember&quot;&gt;To remember&lt;/h3&gt;
&lt;p&gt;Oracle APEX’s built-in logging is very useful. There are settings to define the number of days the logging is kept. &lt;a href=&quot;https://www.apexprojecteye.com&quot;&gt;APEX Project Eye (APE)&lt;/a&gt; can help you get a better insight into these logs.&lt;/p&gt;
</content:encoded><category>Oracle APEX &amp; Database</category><category>oracle-apex</category><category>orclapex</category><category>apex-project-eye</category></item><item><title>Fix for ORDS connection pool named |default|lo| is not able to proxy to the schema</title><link>https://dgielis.com/fix-for-ords-connection-pool-named-defaultlo-is-not-able-to-proxy-to-the-schema</link><guid isPermaLink="true">https://dgielis.com/fix-for-ords-connection-pool-named-defaultlo-is-not-able-to-proxy-to-the-schema</guid><description>Today on our server running ORDS 22.4 and Oracle APEX 22.2 we had a weird error: The database user for the connection pool named |default|lo|, is not able to proxy to the schema named ET_DEV.</description><pubDate>Fri, 13 Jan 2023 18:37:10 GMT</pubDate><content:encoded>&lt;p&gt;&lt;img src=&quot;https://dgielis.com/images/posts/fix-for-ords-connection-pool-named-defaultlo-is-not-able-to-proxy-to-the-schema/e167d7b1-cbe0-49a3-ae39-ac4810024b54-c380d5d6.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;&lt;p&gt;Today on our server running &lt;a href=&quot;https://www.oracle.com/be/database/technologies/appdev/rest.html&quot;&gt;ORDS&lt;/a&gt; 22.4 and &lt;a href=&quot;https://apex.oracle.com&quot;&gt;Oracle APEX&lt;/a&gt; 22.2 we had a weird error:&lt;/p&gt;
&lt;p&gt;&lt;mark&gt;The database user for the connection pool named |default|lo|, is not able to proxy to the schema named ET_DEV. This could be a configured restriction on the maximum number of database sessions or an authorization failure.&lt;/mark&gt;&lt;/p&gt;
&lt;p&gt;I have seen 503 errors before, but not one with default|lo. It might be because we imported the REST web services from another system and only noticed it now or it might have been other things, we are not sure what caused it. Other Oracle APEX workspaces and schemas didn’t have this issue.&lt;/p&gt;
&lt;p&gt;The fix for us was a 4-step process:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Export All Web Services&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;De-Register the schema from ORDS&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Enable the schema again&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Import All Web Services again&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;img src=&quot;https://dgielis.com/images/posts/fix-for-ords-connection-pool-named-defaultlo-is-not-able-to-proxy-to-the-schema/2e50bab9-9170-4b4c-8729-caf717896bf8-772b2643.webp&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;Hope it helps you when you have it.&lt;/p&gt;
</content:encoded><category>Oracle APEX &amp; Database</category><category>ords</category><category>oracle-apex</category><category>orclapex</category></item><item><title>Restarting to blog</title><link>https://dgielis.com/restarting-to-blog</link><guid isPermaLink="true">https://dgielis.com/restarting-to-blog</guid><description>At the beginning of the year, I tend to reflect on the last year(s). When looking back this year I realized that in the last 15 years things changed in the amount I blogged.</description><pubDate>Sun, 01 Jan 2023 20:23:35 GMT</pubDate><content:encoded>&lt;p&gt;&lt;img src=&quot;https://dgielis.com/images/posts/restarting-to-blog/a81fbba4-461f-4bd5-8887-2d49a1ec8579-a6c188be.webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;&lt;p&gt;At the beginning of the year, I tend to reflect on the last year(s). When looking back this year I realized that in the last 15 years things changed in the amount I blogged.&lt;/p&gt;
&lt;p&gt;I love &lt;a href=&quot;https://apex.oracle.com&quot;&gt;Oracle Application Express (APEX)&lt;/a&gt; and started my blog to share what I learned while developing in Oracle APEX. I also blogged because I believed Oracle APEX could help many businesses, so I wanted to promote it and make other people successful in building apps with Oracle APEX. My blog was also a way for me to connect to other people that were using Oracle APEX. So many great people helped each other being successful … this is what we know today, Oracle APEX has a strong community with passionate people about the product.&lt;/p&gt;
&lt;p&gt;In the first few years, I did over two blog posts per week. In the years after I did one blog post every week or every other week, but in the last two years, I blogged much less.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://dgielis.com/images/posts/restarting-to-blog/91e748df-2edc-401a-948a-c11af1502920-a17d8d9b.webp&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;There are many different reasons why I blogged less:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Oracle is promoting Oracle APEX much more than before, so there is already more content available today than there was 15 years ago.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;I like to help people be successful using Oracle APEX, but I’m doing this now more through &lt;a href=&quot;https://www.united-codes.com&quot;&gt;United Codes&lt;/a&gt; by building products that help Oracle APEX developers.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;I was all-in on building out the company and supporting the products that we created, which was often 1-1.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;I put ideas down that I wanted to share, but never took the time to effectively write them out.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The older I get, the faster time seems to go, so before I knew my time was consumed by other things.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;But for the next few years, I want to change this again and make some time to do some more blogging. As &lt;a href=&quot;https://hashnode.com/&quot;&gt;Hashnode&lt;/a&gt; seems to be the blogging platform for developers I thought to start writing on this platform over continuing at my &lt;a href=&quot;https://dgielis.com/archive&quot;&gt;old Blog&lt;/a&gt; done in Blogger.&lt;/p&gt;
&lt;p&gt;Here’s what I plan to write about:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Oracle APEX comes out with two releases a year, but instead of blogging about the different features and how to use them, I want to give my view on why you may want to use (or not use) this new feature.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;In United Codes, we build great products that I believe help every Oracle APEX developer out there to be more productive and give them the ability to achieve more. But if you don’t know they exist, you won’t use them, so I want to change that and show you why we build the products we put out there.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Every day I learn something. It may not always be about Oracle APEX, but those insights help me to understand the world I’m living in, so I hope they will be useful to others.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;We have a great Oracle APEX community, but things changed over time. Many people from the community are now working for Oracle, we had Corona which meant not meeting people live, Joel, who was the leader of our community, passed away, people seem to have moved and new people came… I want to make a conscious effort again to learn about the people in our community and want to help to build out our lovely Oracle APEX community again.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;That’s it for now… I speak you soon again!&lt;/p&gt;
</content:encoded><category>Oracle APEX &amp; Database</category><category>oracle-apex</category><category>orclapex</category></item></channel></rss>