Re: "Grant a Role"-Statement in Triggers

From: Ralf <Miko_at_boehrer.de>
Date: 31 Jul 2003 00:56:21 -0700
Message-ID: <fa624200.0307302356.4b81efc_at_posting.google.com>


Hi Jim,

thanks for your answer.

I want to grant a role in a trigger beacuse of this reason: I have a database-application in Oracle. I use an own SCHEMA-Table which owns every oracle-schema my application is working with (within these schemas there a tables with datas).
Then I have a USER-Table to manage these users (part of all Oracle-Users) who have the right to join my application.

Now I want to assign user X to schema Y. So that X can work with the datas in Y.

For this reason I created a Role which give permission to all tables in Y.
What I want now is, when assigning user X to schema Y (this inserts a new
record in my user2schema-table), then the 'y_role' should be granted to user x.

I'm not sure if this approach is ok or corrupt ?

Best regards
 Ralf

"Jim Kennedy" <kennedy-down_with_spammers_at_no_spam.comcast.net> wrote in message news:<4wZVa.23596$YN5.21747_at_sccrnsc01>...
> You could do
> 1. Autonomous transaction
> 2. queue it up in dbms_job.
>
> Why would you want to grant a role in a trigger?
> Jim
>
Received on Thu Jul 31 2003 - 09:56:21 CEST

Original text of this message