Database 11g

Sunday, February 7, 2016

Script for Locking the Specific Users in Oracle



>> This script will lock the account of all the users whose names are starting from RN and DR.


set echo off
set feedback off
set verify off
set head off
spool lck.sql
select 'alter user ' || username || ' account lock; '  from dba_users where username  in ( 'RN ' , ' DR ' );
spool off
@lck.sql


Happy Learning...

No comments:

Post a Comment