PL/SQL (MOSC)

MOSC Banner

Creating a Trigger for grants post table creation

in PL/SQL (MOSC) 21 commentsAnswered

Hello Everyone

We have inherited an Oracle 19 database and there are 4 schemas in database called USER_A,USER_B,USER_C,USER_D

What we are trying to accomplish is to create a trigger that fires when:

A table is created in either of those 4 schemas
The logged on user connected to the database creating the tables under those 4 schemas could be any user with DBA privs like SYS or SYSTEM etc
As soon as the table is created, we want this following SQL to be executed


Select ' Grant select,update,delete,insert on '||OWNER||'.'||TABLE_NAME|| ' to TAB_FULL_ROLE ' ||';'

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center