Set linesize set long 100000 set wrap on col "Create_user_ddl" for a200 wrapped word define username= "' VINCENT '"--Modify
UserName, query other existing account Select DBMS_METADATA.GET_DDL (' USER ', &username) ' Create_user_ddl ' from dual; --the result identified by values a string of garbled code is the secret value-you can alter user xxx identified by ' xxx ';
Modify password to destroy--then alter user XXX identified by values ' xxxx ' according to the secret value; --Restore the password, God does not know that God does not understand-of course, you have administrator rights, and then to change the password of other users, is the superfluous ... select DBMS_METADATA.GET_GRANTED_DDL (' System_grant ',&
UserName) "Grant dba_sys_privs DDL" from dual;
--Dba_sys_privs Select DBMS_METADATA.GET_GRANTED_DDL (' Role_grant ', &username) "GRANT dba_sys_privs DDL" from dual; --Dba_role_privs--a method of generating authorization statements by querying a permission table, and Get_granted_ddl method two select ' Grant ' | | privilege| | ' to ' | |
grantee| |
Decode (admin_option, ' NO ', '; ', ' YES ', ' with ADMIN OPTION; ')
"Grant dba_sys_privs DDL" from Dba_sys_privs where grantee=&username; Select ' Grant ' | | granted_role| | ' to ' | |
grantee| | Decode (admin_option, ' NO ', '; ', ' YES ', ' with ADMIN option; ')
"Grant dba_sys_privs DDL" from Dba_role_privs where grantee=&username; -If a user is granted only two roles-that is, a basic business account Resource,connect-then it has only one dba_sys_privs: ' Unlimited tablespace '-owned Dba_role_ There are two privs: ' RESOURCE ', ' CONNECT '--and these three rights admin_option are ' NO '