Tuesday, November 24, 2026

Oracle APEX Supporting Objects Data Package Feature

While continuing the development of my OllAPEX application, I realized that initializing certain tables containing prompts, descriptions, JSON schemas, was just as important as installing the database objects themselves.

Image courtesy of Google Gemini

These pieces of information are crucial when talking to the LLMs, they can make a huge difference in the results one gets and can be subject to refinements over time, as I could see first hand when I implemented the "tool calls" functionality in my agentic loops: a sentence, a word can determine if a tool call is made or not.

One nifty feature, albeit not covering 100% of use cases, is APEX's Data Package located in the Supporting Objects section of the Application Builder.

The Data Package functionality allows you to take one or more tables, pack their contents into JSON documents, zip them, allowing an APEX API to read them at installation time, with the option to delete the "package" after a successful import.

Each table content is "packed" into a separate ZIP file containing two JSON files:
one file contains a table layout description while the other contains the actual data, see below for an example:

the "profile"
{ "file-type" : 4, "single-row" : false, "file-encoding" : "AL32UTF8", "row-selector" : "items", "headings-in-first-row" : false, "csv-enclosed" : "\"", "force-trim-whitespace" : true, "columns" : [ { "name" : "ID", "data-type" : 2, "decimal-char" : ".", "data-type-len" : 22, "selector" : "id", "is-json" : false }, { "name" : "FILE_EXT", "data-type" : 1, "data-type-len" : 20, "selector" : "file_ext", "is-json" : false }, { "name" : "MIME_TYPE", "data-type" : 1, "data-type-len" : 120, "selector" : "mime_type", "is-json" : false }, { "name" : "MARKDOWN_LANG", "data-type" : 1, "data-type-len" : 30, "selector" : "markdown_lang", "is-json" : false }, { "name" : "PRIORITY", "data-type" : 2, "decimal-char" : ".", "data-type-len" : 22, "selector" : "priority", "is-json" : false }, { "name" : "IS_ACTIVE", "data-type" : 1, "data-type-len" : 1, "selector" : "is_active", "is-json" : false }, { "name" : "CREATED_AT", "data-type" : 3, "data-type-len" : 7, "selector" : "created_at", "format-mask" : "YYYY-MM-DD\"T\"HH24:MI:SS", "is-json" : false }, { "name" : "IS_TEXT", "data-type" : 1, "data-type-len" : 1, "selector" : "is_text", "is-json" : false }, { "name" : "IS_IMAGE", "data-type" : 1, "data-type-len" : 1, "selector" : "is_image", "is-json" : false }, { "name" : "IS_AUDIO", "data-type" : 1, "data-type-len" : 1, "selector" : "is_audio", "is-json" : false }, { "name" : "IS_VIDEO", "data-type" : 1, "data-type-len" : 1, "selector" : "is_video", "is-json" : false }, { "name" : "IS_ZIP", "data-type" : 1, "data-type-len" : 1, "selector" : "is_zip", "is-json" : false }, { "name" : "IS_CONVERTIBLE", "data-type" : 1, "data-type-len" : 1, "selector" : "is_convertible", "is-json" : false } ], "parsed-rows" : 109 }

"data sample"
{ "items": [ { "id": 3, "file_ext": "gif", "mime_type": "image/gif", "markdown_lang": null, "priority": 1, "is_active": "Y", "created_at": "2026-11-19T10:12:00", "is_text": "N", "is_image": "Y", "is_audio": "N", "is_video": "N", "is_zip": "N", "is_convertible": "N" }, { "id": 4, "file_ext": "pdf", "mime_type": "application/pdf", "markdown_lang": null, "priority": 1, "is_active": "Y", "created_at": "2026-11-19T10:12:00", "is_text": "N", "is_image": "N", "is_audio": "N", "is_video": "N", "is_zip": "N", "is_convertible": "Y" }, { "id": 5, "file_ext": "markdown", "mime_type": "text/markdown", "markdown_lang": "markdown", "priority": 2, "is_active": "Y", "created_at": "2026-11-19T10:12:00", "is_text": "Y", "is_image": "N", "is_audio": "N", "is_video": "N", "is_zip": "N", "is_convertible": "N" }, { "id": 6, "file_ext": "html", "mime_type": "text/html", "markdown_lang": "html", "priority": 1, "is_active": "Y", "created_at": "2026-11-19T10:12:00", "is_text": "Y", "is_image": "N", "is_audio": "N", "is_video": "N", "is_zip": "N", "is_convertible": "N" }, { "id": 7, "file_ext": "jpg", "mime_type": "image/jpeg", "markdown_lang": null, "priority": 1, "is_active": "Y", "created_at": "2026-11-19T10:12:00", "is_text": "N", "is_image": "Y", "is_audio": "N", "is_video": "N", "is_zip": "N", "is_convertible": "N" }, { "id": 8, "file_ext": "htm", "mime_type": "text/html", "markdown_lang": "html", "priority": 2, "is_active": "Y", "created_at": "2026-11-19T10:12:00", "is_text": "Y", "is_image": "N", "is_audio": "N", "is_video": "N", "is_zip": "N", "is_convertible": "N" }, { "id": 9, "file_ext": "csv", "mime_type": "text/csv", "markdown_lang": "csv", "priority": 1, "is_active": "Y", "created_at": "2026-11-19T10:12:00", "is_text": "Y", "is_image": "N", "is_audio": "N", "is_video": "N", "is_zip": "N", "is_convertible": "N" } ] }
 

While the script is saved in the "Installation Scripts" section of the Supporting Objects, the ZIP files are stored in the Shared Components / Static Application Files.
The following is the corresponding installation script:

begin
    --FILE_EXTENSIONS: 109/10000 rows exported, APEX$DATA$PKG/FILE_EXTENSIONS$191000
    apex_data_install.load_supporting_object_data(p_table_name => 'FILE_EXTENSIONS', p_delete_after_install => true );
end;

In case of multiple tables the script will contain multiple calls to the API.

As long as the tables are made up of simple SQL objects (VARCHAR2, NUMBER, DATES, ...) all works just fine, from the comment included in the script I guess there is a limit of 10000 rows, considering this functionality is meant for moving "static" data I think it's a fair limitation.

The problems may arise if there are tables containing CLOBs longer than 1000 characters or BLOBs.
BLOBs are a show-stopper, the Data Package wizard will return a warning if you try to export a table containing a BLOB column.

CLOBs are successfully imported if they are 1000 characters or less, otherwise they will be truncated.
If you look at the JSON profile file, it will define the column as type 11, 4000 bytes, which explains why they are truncating to 1000 characters in an AL32UTF8 character set (up to 4 bytes per character in AL32UTF8), just to stay safe.

This is why today I submitted an APEX Idea suggesting to handle properly also CLOB and BLOB columns, the latter data type could be base64-encoded to make it easier to deal with in the JSON format.

Aside from a short release video back in APEX 21.2, official documentation on Data Packages is virtually zero, so most of these limits only show up once you test them in the wild. Give the APEX Idea a vote if you'd like to see full CLOB and BLOB support added—and hope you found this helpful!

Thursday, November 05, 2026

DBMS_DEVELOPER.GET_METADATA ignores GRANT SELECT ANY TABLE ON SCHEMA XYZ

I hoped that on Oracle 26ai I could finally leverage schema level privileges and avoid the hassle of granting SELECT explicitly table by table.

grant select any table on schema PB_040000 to TT_020000;

And it works well with SELECT queries and with DESCRIBE too.

Image courtesy of Google Gemini

It works also on tables created after granting the privilege.

But, unfortunately, it turns out that DBMS_DEVELOPER.GET_METADATA ignores the schema level privilege:

--connect as TT_020000

set serveroutput on
begin
dbms_output.put_line(
json_serialize(
dbms_developer.get_metadata(
name => 'ORDERS',
schema => 'PB_040000',
object_type => 'TABLE',
level => 'BASIC'
)
PRETTY
)
);
end;
/

begin
*
ERROR at line 1:
ORA-03408: Object not found : PB_040000.ORDERS
ORA-06512: at "SYS.DBMS_DEVELOPER", line 17
ORA-06512: at "SYS.DBMS_DEVELOPER", line 57
ORA-06512: at line 2


https://docs.oracle.com/error-help/db/ora-03408/


More Details :
https://docs.oracle.com/error-help/db/ora-03408/
https://docs.oracle.com/error-help/db/ora-06512/  

Whether the security model of DBMS_DEVELOPER should change in the future and become compatible with schema level privileges is a valid question in my humble opinion.

Monday, October 26, 2026

A Picture Is Worth A Thousand Words: Dashboards To The Rescue

Building an application in the age of AI assisted development is only half the battle.

With an APEX application hosted on OCI, monitoring resource consumption is vital, because with the free tier you cannot exceed certain volumes of requests, whether they are REST requests or emails or notifications.

A well-crafted dashboard, beyond just eye-catching aesthetics, can help you spot problems that might otherwise go unnoticed until the application runs out of resources and stops working. 

The position of the big blue circle shows there is something wrong with the embedding calls 

Spotting anomalies at a glance:

A prime example of a dashboard's utility is how it highlights hidden inefficiencies and runaway processes.
In the API requests visualization, in the lower left portion of the image, a massive blue circle was dominating the chart, immediately drawing my attention.

  • The big blue bubble instantly signals an anomaly in the system's traffic pattern. 
  • The position of its centre on the Y axis compared to the position of other types of requests over the week reveals that the application is currently executing a disproportionate number of embedding requests to the LLM. 
  • Looking at the chart I could immediately start investigating the rogue document processing procedure.

SELECT 
  -- Chronological X: 6 = 6 days ago, 0 = Today
  to_char(w.request_date,'Day') as dy,
  (trunc(w.request_date) - trunc(sysdate)) as x_value,
  nvl(regexp_substr(w.url,'(http(s)?:/)(/([^/]+))+',1,1,'c',4), 'UNKNOWN') as series,
  count(*)                                     as requests,    -- Y-axis
  sum(elapsed_sec)                             as elapsed,     -- Bubble radius
  to_char(w.request_date,'Day') || '
Requests: ' || count(*) || '
Time: ' || sum(elapsed_sec) as custom_tooltip
FROM apex_webservice_log w
WHERE w.request_date >= trunc(sysdate) - 6 and w.request_date < trunc(sysdate) + 1
GROUP BY to_char(w.request_date,'Day'),
         (trunc(w.request_date) - trunc(sysdate)), 
         nvl(regexp_substr(w.url,'(http(s)?:/)(/([^/]+))+',1,1,'c',4), 'UNKNOWN')
ORDER BY x_value desc, series;

Dashboards can bridge the gap between hundreds of log entries in an APEX internal view and the need to extract and present the significant information in an efficient and concise way. 

Last but not least, AI can suggest the critical resources to monitor and how to best represent the information with a chart if you are short of ideas.

yes you can!

Two great ways to help us out with a minimal effort. Click on the Google Plus +1 button above or...
We appreciate your support!

latest articles