select ‘create user ‘ ||username|| ‘ identified by values ”’ ||password|| ”’ default tablespace ‘ ||default_tablespace|| ‘ temporary tablespace ‘ ||temporary_tablespace|| ‘ profile ‘ ||profile||’;’ as sample from dba_users where username in (‘ORACLE_OCM’);
select name, DECODE(spare4,NULL,NULL,spare4||’;’)||password as password from sys.user$ where name = upper(‘ORACLE_OCM’);
SELECT ‘GRANT ‘||GRANTED_ROLE||’ TO ‘||GRANTEE||’;’ FROM DBA_ROLE_PRIVS WHERE GRANTEE in (‘ORACLE_OCM’);
SELECT ‘GRANT ‘||PRIVILEGE||’ TO ‘||GRANTEE||’;’ FROM DBA_SYS_PRIVS WHERE GRANTEE in (‘ORACLE_OCM’);
select ‘alter user ‘||username||’ quota unlimited on ‘||tablespace_name||’;’ from dba_ts_quotas where username in (‘ORACLE_OCM’);

Recommended Posts

Start typing and press Enter to search