RE: Command to drop a user...

RE: Command to drop a user...

 

  

Hi Walt,
Try this as a shutdown script:

./init_sid.sh
su oracle -c "sqlplus /nolog <<-FIN_SHUTDN


CONNECT / as sysdba;
SHUTDOWN IMMEDIATE;
STARTUP;

EXIT;
exit

FIN_SHUTDN"

This works from root on HPUX using the ksh. The init_sid.sh script sets
ORACLE_HOME and ORACLE_SID then calls oraenv with ORAENV_ASK set to N.


Mark Coleman
Unix/Database Administrator
www.insteel.com


-----Original Message-----
From: WALTER HUNNEL [mailto:[Email Address Removed]
Sent: Tuesday, April 20, 2004 12:06 PM
To: LazyDBA.com Discussion
Subject: Command to drop a user...

I am looking for a command that will drop a user even if they have an open
connection at the time.

We are using Oracle 8.1.7.4 on AIX. Part of the process is to refresh the
training environment from production, but we are hitting a problem with DROP
USER JOE CASCADE; in the script that runs early in the morning if 'Joe' has
a connection.

DROP TYPE FORCE command is about what I am looking for, but I don't see that
it can be applied to a user, only to user-objects.

One alternative is to script a SHUTDOWN IMMEDIATE; STARTUP; as we really
don't have anything else running on the test instance that needs to remain
up, but I am REALLY leary of scripting database shutdowns.

Thanks for any help...

Walt
Oracle LazyDBA home page