Home » SQL & PL/SQL » SQL & PL/SQL » ROLE ASSIGNING (merged 3)
ROLE ASSIGNING (merged 3) [message #398176] Wed, 15 April 2009 09:40 Go to next message
shahidmahmood2069
Messages: 11
Registered: February 2009
Junior Member
Hi,
I am not able to get the desired result creating ROLE and then using DBMs_SESSION.SET_ROLE method in NEW_FOR_INSTANCE in oracle. What I am doing is
1 Logon on to database with user ABC.
2. I created user XYZ and onllow to connect to the database for which I want to restrict to use only fmx file and to use SQL worksheet to insert or update the database.
3. I created ROLE ROLE_WRITE where i allowed user to insert and update.
After designing form I faced problem
1. When I log on with XYZ. and compiled my form he does not recognize tables of ABC as I was log on with user XYZ I allowed XYZ to select from the table whether this method is correct or not.
2. In when_new_form_instance i wrote DBMs_SESSION.SET_ROLE('ROLE_WRITE') and I am getting error ora-01924 and its not working.
Pls help me.
Re: ROLE ASSIGNING [message #398177 is a reply to message #398176] Wed, 15 April 2009 09:45 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
You need to help us by following the Posting Guidelines as stated below.
http://www.orafaq.com/forum/t/88153/0/
Please, please, please Read & Follow Posting Guidelines above.
Go to the section labeled "Practice" & do as directed.

Re: ROLE ASSIGNING [message #398179 is a reply to message #398176] Wed, 15 April 2009 09:52 Go to previous messageGo to next message
cookiemonster
Messages: 13920
Registered: September 2008
Location: Rainy Manchester
Senior Member
1) why don't you just compile the form against ABC?
2) why do you think you need to use set_role at all?
ROLE ASSIGNING [message #398181 is a reply to message #398176] Wed, 15 April 2009 09:56 Go to previous messageGo to next message
shahidmahmood2069
Messages: 11
Registered: February 2009
Junior Member
Hi,
I am not able to get the desired result creating ROLE and then using DBMs_SESSION.SET_ROLE method in NEW_FOR_INSTANCE in oracle. What I am doing is
1 Logon on to database with user ABC.
2. I created user XYZ and onllow to connect to the database for which I want to restrict to use only fmx file and to use SQL worksheet to insert or update the database.
3. I created ROLE ROLE_WRITE where i allowed user to insert and update.
After designing form I faced problem
1. When I log on with XYZ. and compiled my form he does not recognize tables of ABC as I was log on with user XYZ I allowed XYZ to select from the table whether this method is correct or not.
2. In when_new_form_instance i wrote DBMs_SESSION.SET_ROLE('ROLE_WRITE') and I am getting error ora-01924 and its not working.
Pls help me.
Re: ROLE ASSIGNING [message #398182 is a reply to message #398181] Wed, 15 April 2009 09:58 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
stop spamming this forum!
Re: ROLE ASSIGNING (merged 3) [message #398186 is a reply to message #398176] Wed, 15 April 2009 10:08 Go to previous message
Michel Cadot
Messages: 68645
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
ORA-01924: role '%s' not granted or does not exist
 *Cause:  Set role can only be performed with roles granted
          directly to your account. (e.g. a sub-role cannot be enabled)
 *Action: Don't try to set the role.

Do NOT describe what you did, use SQL*Plus and copy and paste it (and format it).

Regards
Michel
Previous Topic: Update statement
Next Topic: Need help formatting output from a SQL search
Goto Forum:
  


Current Time: Fri Apr 26 08:23:10 CDT 2024