Home » RDBMS Server » Security » Is it possible to enable roles from after logon database trigger?
Is it possible to enable roles from after logon database trigger? [message #190969] Sun, 03 September 2006 11:31 Go to next message
prabalacherjee
Messages: 4
Registered: January 2006
Location: Noida
Junior Member
I am working in an application.In this application my requirement is whenever
any user login in to the database then his granted roles will be enabled.
To achieve this I have created a after logon database trigger.From this
trigger I am calling a database package procedure and after some validation
I am again calling another database package procedure to enable the roles
using dbms_session.set_role. But whenever I am trying to login
the database trigger fires and it is throwing the following error:
ORA-06565: cannot execute SET ROLE from within stored procedure

So anyone can help me with suggestion that whether it is possible
to enable role by calling a package procedure from after logon database
trigger?
Re: Is it possible to enable roles from after logon database trigger? [message #190970 is a reply to message #190969] Sun, 03 September 2006 11:35 Go to previous message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
However, if a procedure is run as the invoker, set role succeeds and the role is set after the procedure has completed. When a procedure is run with "invoker's rights", roles are not disabled and role operations are permitted the same way they are in anonymous blocks.
Previous Topic: problem with password verify function
Next Topic: Encryption and Decryption
Goto Forum:
  


Current Time: Wed Dec 11 20:16:02 CST 2024