Skip to Main Content

SQL & PL/SQL

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!

How to implement VPD for all the related tables

Rajan SwOct 11 2023

Hi I have few tables for example

Bank, Customer, Account, Transaction like Bank_id primary key in bank and it is a foreign key in Customer and similarly customer_id in Account and Account_id in Transaction.So the hierarchy is like below

Bank

Customer

     Account

        Transaction

we will get bank_id in the context and I can create a policy based on the bank_id but bank_id is just in the bank table not in other tables. My requirement is a particular bank should be able to only select,update, insert and delete only the data belong to them and it should be applicable for all the related tables like transaction also Bank1 should not be able to update bank2 data.

This I need to achieve this through the VPD though I donot have bank_id in child tables, but I want to restrict.

Any approaches and thoughts would be highly appreciated.

Currently using Oracle 19C.

Comments
Post Details
Added on Oct 11 2023
7 comments
547 views