You are on page 1of 3

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

+++
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++
SQL> SELECT dbms_metadata.get_ddl('USER','E011313') FROM dual;

SQL> select * from dba_sys_privs where GRANTEE='E011313';

SQL> select * from dba_tab_privs where GRANTEE='E011313';

SQL> select * from dba_role_privs where GRANTEE='E011313';


+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++

USER : E011313

To Clone User:
++++++++++++++

Steps 1 : Get DML

SQL> SELECT dbms_metadata.get_ddl('USER','E011313') FROM dual;

DBMS_METADATA.GET_DDL('USER','E011313')
--------------------------------------------------------------------------------

CREATE USER "E011313" IDENTIFIED BY VALUES '6696361B64F9E


0A9'
DEFAULT TABLESPACE "E011313"
TEMPORARY TABLESPACE "TMP"
PASSWORD EXPIRE

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++

Steps 2 : Get All System privileges assign to user 'E011313'

SQL> SELECT DBMS_METADATA.GET_GRANTED_DDL('SYSTEM_GRANT','E011313') from dual;

DBMS_METADATA.GET_GRANTED_DDL('SYSTEM_GRANT','E011313')
--------------------------------------------------------------------------------

GRANT DROP PUBLIC SYNONYM TO "E011313"


GRANT CREATE PUBLIC SYNONYM TO "E011313"
GRANT UNLIMITED TABLESPACE TO "E011313"
SQL> select * from dba_sys_privs where GRANTEE='E011313';

GRANTEE PRIVILEGE ADM


------------------------------ ---------------------------------------- ---
E011313 CREATE PUBLIC SYNONYM NO
E011313 DROP PUBLIC SYNONYM NO
E011313 UNLIMITED TABLESPACE NO

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++

Steps 3 :List Privs on tables of other Owner:

SQL> SELECT DBMS_METADATA.GET_GRANTED_DDL('OBJECT_GRANT','E011313') from dual;

DBMS_METADATA.GET_GRANTED_DDL('OBJECT_GRANT','E011313')
--------------------------------------------------------------------------------

GRANT EXECUTE ON "SYS"."DBMS_SYS_SQL" TO "E011313"


GRANT EXECUTE ON "SYS"."DBMS_PIPE" TO "E011313
"

SQL> select * from dba_tab_privs where GRANTEE='E011313';

GRANTEE OWNER TABLE_NAME GRANTOR PRIVILEGE


GRA HIE
-------------- ---------- ------------------ --------------- --------------------
--- ---
E011313 SYS DBMS_SYS_SQL SYS EXECUTE
NO NO
E011313 SYS DBMS_PIPE SYS EXECUTE
NO NO

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++

Step 4 : Get Profile :

SQL> select profile from dba_users where USERNAME='E011313';

PROFILE
------------------------------
DEFAULT

***********************************************************************************
*********