Skip to Main Content

SQL Developer Data Modeler

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Spatial columns and indexes, DDL for APEX - best practice?

AndyHNov 27 2024

I use SQLDM to generate schema DDL for our projects, including APEX-based projects.

For APEX, the generated DDL file is included in the APEX Supporting Objects installation scripts. The idea is that a user can take an APEX application and install it from scratch in their APEX environment.

In APEX, spatial columns and indexes require ‘special’ treatment as the installation occurs through a proxy user - the usual process of inserting a row into user_sdo_geom_metadata is replaced by a call to apex_spatial to do the insert ‘magically’.

Is there an ‘easy/best-practice’ way of generating DDL from SQLDM to support both the ‘normal’ and the APEX ‘way’ of doing this? Should I just manually create ‘After Create’ scripts to call the apex_spatial/create the index and then remember to switch off ‘Register Spatial Table’ or ‘After Create Include in DDL’ depending on where the script will be used?

Comments

thatJeffSmith-Oracle Feb 13 2025

Your ENTRA users will get authenticated via JSON Web Tokens, and their Entra roles will determine which ORDS REST APIs they can hit.

When they hit an endpoint, it'll execute code in the database as the database user that owns the schema where the REST API is defined, not as Entra defiend end user. In fact, the Entra users won't have accounts in the database (they could, but wont' need to).

The :current_user field as far as ords is concerned would be the corresponding oauth2 client or JWT issued for the authorizied session.

Your prehook should be able to alter the session to set the context that would put your RLS/VPD security policy in play.

1 - 1

Post Details

Added on Nov 27 2024
1 comment
60 views