'Grant all privs of a user to another user in Oracle [duplicate]
I have a user named A having some privileges. How can I grant all privileges which A is having and grant to user B? Thanks in advance
Solution 1:[1]
Get all privileges from user A
SELECT DBMS_METADATA.GET_GRANTED_DDL('ROLE_GRANT','A') FROM DUAL;
SELECT DBMS_METADATA.GET_GRANTED_DDL('SYSTEM_GRANT','A') FROM DUAL;
SELECT DBMS_METADATA.GET_GRANTED_DDL('OBJECT_GRANT','A') FROM DUAL;
Change the DDL commands with the user 'B' and execute.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Beefstu |
