Assigning privilege [message #264637] |
Tue, 04 September 2007 01:25 |
M.Shakeel Azeem
Messages: 226 Registered: September 2006
|
Senior Member |
|
|
Dear All,
I want to write a procedure that will assign the same privilege on one to another user
for example
i want to assign the same privilege to user2 as user1 by using a procedure
can please help me in this regard?
[Updated on: Wed, 05 September 2007 08:08] by Moderator Report message to a moderator
|
|
|
|
|
|
|
Re: Assigning privilege [message #265153 is a reply to message #264639] |
Wed, 05 September 2007 09:59 |
DreamzZ
Messages: 1666 Registered: May 2007 Location: Dreamzland
|
Senior Member |
|
|
Quote: |
i want to assign the same privilege to user2 as user1 by using a procedure
|
Through procedure
Quote: | grant execute on proc_name to user2;
grant alter any procedure to user2;
|
not on procedure.
|
|
|
|
Re: Assigning privilege [message #287522 is a reply to message #287520] |
Wed, 12 December 2007 08:57 |
ora_zhp
Messages: 10 Registered: September 2007
|
Junior Member |
|
|
CREATE OR REPLACE PROCEDURE p_test(user_name VARCHAR2,proc_name VARCHAR2) AS
BEGIN
EXECUTE IMMEDIATE 'grant execute on '||proc_name ||' to '||user_name;
END ;
|
|
|