Answer the question
In order to leave comments, you need to log in
How to delete multiple schemas in oracle db?
Actually, you need to delete a lot of schemas from the database, a query like
Drop user "[email protected]","[email protected]" cascade;
Answer the question
In order to leave comments, you need to log in
commands can be formed with
select 'Drop user '||username||' cascade;' from dba_users where account_status = 'OPEN';
The condition can be omitted if all schemes are needed at all, and not just active ones ... from the resulting list, it remains to remove those that do not need to be dropped :)
You can make a script
set serveroutput on
set head off
set echo off
set feedback off
--set term off
spool drop.sql
select 'Drop user '||username||' cascade;' from dba_users where account_status = 'OPEN';
spool off
exit
by executing it in sqlplus you will get a ready-made script that also needs to be cleaned (leave schemas that do not need to be deleted) and then just execute.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question