Grant previlege to role [message #459150] |
Thu, 03 June 2010 10:36  |
Ricky_1362002
Messages: 111 Registered: February 2009
|
Senior Member |
|
|
Hello everyone,
I have a stored procedure which when executed creates a user and grants some roles to the user and also makes certain roles DEFAULT using "alter user"
The issue comes when i execute the procudure.
I have a User who has a role and this role has the "alter user" privilege, for example lets say that the user1 has the role ABC, and role ABC has the "alter user" privilege.
SQL> grant alter user to ABC;
Grant succeeded.
SQL> grant ABC to user1;
Grant succeeded.
Now, when i run the stored procedure as the user1, it gives me an error on a line saying "insufficient privileges", when i check the line, its this line:
alter user user1 DEFAULT ROLE "ROLE1", "ROLE2"
But as far as i know the user1 has the "alter user" privilege
I want to make those two roles ROLE1, ROLE2 DEFAULT because i dont want the other roles ROLE3,ROLE4 to be default, as you know if there are many roles and if we alter user with default for certain roles other roles become DEFAULT=NO.
So i get the error at "alter user" statement though the user has the "alter user" privilege, what do you think might be wrong?
OR is there anyway to grant roles to the user with default=NO option?
Please help me resolve this.
Thanks.
Munna
|
|
|
|
|
Re: Grant previlege to role [message #459155 is a reply to message #459150] |
Thu, 03 June 2010 10:58   |
Ricky_1362002
Messages: 111 Registered: February 2009
|
Senior Member |
|
|
Thank you cookiemonster and Michel.
According to the source link posted by cookiemonster, i granted the privilege directly to the user and the procedure works well.
Thanks much guys.
Regrds,
Munna
|
|
|
Re: Grant previlege to role [message #459168 is a reply to message #459155] |
Thu, 03 June 2010 11:59   |
 |
Littlefoot
Messages: 21826 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
Michel, could you, please, rewrite it once again (10 times at least), but now try to make a complete sentence.
MichelPrivileges acquired through are not enabled in procedure.
Through ... what?
a) strawberies
b) potatos
c) submarines
d) airplanes
e) rolexes
f) roles
g) singers
h) actors
i) avatars
[Updated on: Thu, 03 June 2010 12:22] Report message to a moderator
|
|
|
|
|
|
|
|