Re: Dropping Users?

From: John Thomas <John_at_toronto.demon.co.uk>
Date: Tue, 13 Dec 1994 23:59:52 +0000
Message-ID: <266562331wnr_at_toronto.demon.co.uk>


In article: <cit90Te00iV1I1IBpf_at_andrew.cmu.edu> Janet Cohen <jc6n+_at_andrew.cmu.edu> writes:
> At the end of each semester, I need to remove the student's Oracle
> accounts. I understand how to revoke their rights. But I cannot figure
> out from the manuals I have how to actually drop those accounts, PLUS

Could not be done in V6, not sure about V7.

> any objects/links, or whatever they may have created. Can anyone help
> me?
>

To drop objects created, run something like the following in SQL*Plus:

SET ECHO OFF
SET FEEDBACK OFF
SET PAGESIZE 0
SPOOL drop_student_objects.sql

select 'DROP '||object_type||' '||owner||'.'||object_name||';' from all_objects
where owner not in ('SYS', 'SYSTEM');

SPOOL OFF Then do START drop_students_objects

... this is a first draft & will need to be modified before you can run it successfully. You would also be wise to check drop_students_objects.sql very carefully to ensure you have not included objects owned by users you do not want to drop.

John Thomas, Oracle Team Leader                E-Mail: John_at_toronto.demon.co.uk
The shorter the sig, the smarter the author.                 Tel: 0181 944 9858
Received on Wed Dec 14 1994 - 00:59:52 CET

Original text of this message