Running a local LLM with Ollama and calling it from Oracle APEX is easy, once the network ACL is right. Three things trip people up:
APEX_WEB_SERVICEcalls go out as the APEX engine schema (APEX_260200on APEX 26.2), notAPEX_PUBLIC_USER. GrantconnecttoAPEX_APPLICATION.g_flow_schema_owner.- Run the grant connected to the PDB where APEX lives. In
CDB$ROOTit fails withPLS-00201. - Ollama listens on 127.0.0.1 by default. If your database runs in Docker on Linux, add
host-gatewayand setOLLAMA_HOST=0.0.0.0, and never expose Ollama to the internet.
On APEX 26.1 and later you can also register Ollama as a built-in Generative AI Service. APEX 26.2 defaults new services to the Responses API, which needs Ollama v0.13.3 or later.
Get the Oracle + AI digest
One email when a new tested guide, template or APEX release note lands — English or Arabic. No spam; unsubscribe anytime.