set heading off verify off feedback off echo off term off linesize 200 wrap on
spool c:\password_users.sql
SELECT 'alter user ' || username ||
' identified ' ||
DECODE(password, NULL, 'EXTERNALLY', ' by values ' || '''' || password || '''') ||' account unlock;'
FROM dba_users
where username!='SYSTEM' and Username!='SYS' and Username!='DBSNMP' and Username!='REPADMIN' and
username!='WMSYS' and
username!='TSMSYS' and
username!='ACCOUNTOP' and
username!='OUTLN' and
username!='ORACLE_OCM' and
username!='BRANCH' and
username!='TRADE' and
username!='LEGAL' and
username!='ACCOUNTS' and
username!='QUALITYC' and
username!='FINANCE' and
username!='FUNDS' and
username!='STOCKS' and
username!='CRDESK' and
username!='IT'
ORDER BY username ;
spool off
@c:\password_users.sql
No comments:
Post a Comment