DOYENSYS Knowledge Portal




We Welcome you to visit our DOYENSYS KNOWLEDGE PORTAL : Doyensys Knowledge Portal




Friday, January 12, 2018

Reverse all user

set lines 240
set echo off
set feedb off
set heading off
SET VERIFY off
set trimspool on
set pages 0
col l1 format a120 newline
col l2 format a120 newline
col l3 format a120 newline


select 'CREATE USER '||username||' IDENTIFIED BY VALUES '||''''||password||''''||' ' l1,
       '  DEFAULT TABLESPACE ' ||DEFAULT_TABLESPACE ||' TEMPORARY TABLESPACE ' ||TEMPORARY_TABLESPACE l2,
       '  PROFILE ' ||profile ||';' l3
from dba_users
where username = upper('&1')
order by username
/

SET VERIFY on
set echo on
set pages 9999
set feedb on

No comments: