OllamaAPEXNetwork ACL

Ollama + APEX: give the network ACL to the right user

APEX_WEB_SERVICE calls go out as the APEX engine schema, not APEX_PUBLIC_USER, and the grant must run in the APEX PDB.

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:

  1. APEX_WEB_SERVICE calls go out as the APEX engine schema (APEX_260100 on APEX 26.1), not APEX_PUBLIC_USER. Grant connect to APEX_APPLICATION.g_flow_schema_owner.
  2. Run the grant connected to the PDB where APEX lives. In CDB$ROOT it fails with PLS-00201.
  3. Ollama listens on 127.0.0.1 by default. If your database runs in Docker on Linux, add host-gateway and set OLLAMA_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.

The full, step-by-step version is in the guide

Run a local LLM (Ollama) inside Oracle APEX

Read the guide →

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.