Many people have mentioned how to copy ORACLE user permissions. The following describes how to copy ORACLE user permissions in detail. If you are interested in ORACLE user permissions, take a look.
Explanation:
If you want to grant ALL permissions to the table, SELECT the view, EXECUTE the other statements.
- DECODE (object_type, 'TABLE', 'ALL', 'VIEW', 'SELECT', 'EXECUTE')
Then modify execute immediate 'Grant '| rec. grant_type | 'on' | rec. object_name | 'to' | p_grantee;
1). logon as grantor, for instance USER1
2). run PL/SQL scripts:
- DECLARE
- p_grantee VARCHAR2(30):='ywxt_module_admin';
- BEGIN
- FOR rec IN (SELECT object_name, object_type
- , DECODE (object_type, 'TABLE', 'ALL', 'VIEW', 'SELECT', 'EXECUTE') grant_type FROM user_objects)
- LOOP
- BEGIN
- EXECUTE IMMEDIATE 'grant all on ' || rec.object_name || ' to ' || p_grantee;
- EXCEPTION
- WHEN OTHERS THEN
- DBMS_OUTPUT.PUT_LINE(SUBSTR (SQLERRM,1,240));
- END;
- END LOOP;
- END;
- /
The preceding describes how to copy ORACLE user permissions.
Implementation of batch Oracle authorization
How to store images in oracle
Implementation of oracle tree Query
Implementation of oracle query current time
Learn more about Oracle hierarchical Query