- I am working in 24/7 hospital which contains more than 200 nurses and 30+ doctors.
- In this query i am Locking Users whose names are starting from RN & DR.
- RN= Registered Nurses
- DR= Doctors
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 ('DR', 'RN');
spool off
@lck.sql
- Execute this query from Database Level.
SQL> @D:\app\oracle\lck.sql
Happy Learning.. .
No comments:
Post a Comment