Skip to Main Content

ORDS, SODA & JSON in the Database

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.

Backup/Export of RESTful Data Services via Command Line

Ehsan FathiJan 26 2025 — edited Jan 26 2025

Hello

When I want to export from the RESTful Data Service in Oracle APEX, I must connect via sqlcl with the same schema that I defined in the module.

I have over 100 schemas, and I want to back up the RESTful Data Service into separate SQL files every day.

When I connect via SQLcl using the SYS or SYSTEM user, it doesn't recognize the modules at all. Even if I run the ALTER SESSION SET CURRENT_SCHEMA command, this command 'rest modules ' doesn't find any REST modules.

What do you think is the issue, and is there any practical solution for backing up this way? Do I need to have the passwords for all the schemas? That doesn’t seem correct!

This post has been answered by jariola on Jan 26 2025
Jump to Answer

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 Jan 26 2025
3 comments
139 views