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.

Synchronize Data Dictionary for global temporary tables fails to synchronize

AndyHNov 22 2024

I created a table in SQLDM 23 which generated the following DDL:

CREATE TABLE gtt_test_table (
   gttt_id RAW(16) NOT NULL,
   code    VARCHAR2(80) NULL
)
ORGANIZATION HEAP NOCOMPRESS
   NOCACHE
       NOPARALLEL
   NOROWDEPENDENCIES DISABLE ROW MOVEMENT;
CREATE UNIQUE INDEX gttt_pk_idx ON
   gtt_test_table (
       gttt_id
   ASC );
ALTER TABLE gtt_test_table
   ADD CONSTRAINT gttt_pk PRIMARY KEY ( gttt_id ) NOT DEFERRABLE ENABLE VALIDATE;

I used the generated code to create the table in my database (19c).

I then realised that this was intended to be a global temporary table, so I changed the Physical Model definition to show it as "Temporary (Delete Rows)". This generates the following DDL:

CREATE GLOBAL TEMPORARY TABLE gtt_test_table (
   gttt_id RAW(16) NOT NULL,
   code    VARCHAR2(80) NULL
) ON COMMIT DELETE ROWS
   NOCACHE NOROWDEPENDENCIES DISABLE ROW MOVEMENT;
CREATE UNIQUE INDEX gttt_pk_idx ON
   gtt_test_table (
       gttt_id
   ASC );
ALTER TABLE gtt_test_table
   ADD CONSTRAINT gttt_pk PRIMARY KEY ( gttt_id ) NOT DEFERRABLE ENABLE VALIDATE;

When I try to “Synchronize Data Dictionary” the table is highlighted, etc. and the “Physical Details” section shows that the Source Table has Temporary ‘YES’ and Target Table has Temporary ‘NO’. However, there are no table DDL commands generated by the “DDL Preview”.

I was expecting to see either some DROP and CREATE statements OR some error message/warning to say that the synchronisation required table recreation.

Have I missed a check-box somewhere or is this a bug?

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 22 2024
1 comment
59 views