Re: "Grant a Role"-Statement in Triggers

From: Jim Kennedy <kennedy-down_with_spammers_at_no_spam.comcast.net>
Date: Thu, 31 Jul 2003 00:36:16 GMT
Message-ID: <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

"Ralf" <Miko_at_boehrer.de> wrote in message news:fa624200.0307300725.7b4fbe38_at_posting.google.com...
> Hi !
>
> When I insert a new record to a table "table_A" I want to Grant a Role
> "Role_X" to the User "User_Y".
>
> So I made a Trigger who should do this work, but it doesn't:
>
> When I write: "GRANT Role_X TO User_Y" in the Trigger:
> --> my Trigger ist invalid (error = ora-04098)
> When I declare a varchar-Variable within the trigger, fill it with:
> "GRANT Role_X TO User_Y" and then : "EXECUTE IMMEDIATE <variable>"
> --> my Trigger is valid, but when it fires I get the error:
> ora-04092 - cannot COMMIT in a Trigger
>
> Can anybody help me ?
> Is it anyhow possible to GRANT a ROLE after inserting a record ?
>
> Thanks in advance for any help or comments
> Ralf
Received on Thu Jul 31 2003 - 02:36:16 CEST

Original text of this message