Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: sqlplus script dropping conected user

Re: sqlplus script dropping conected user

From: Mladen Gogala <mgogala_at_yahoo.com>
Date: Thu, 13 Sep 2007 15:54:50 +0200 (CEST)
Message-ID: <fcbffa$d5u$1@aioe.org>


On Wed, 12 Sep 2007 03:00:51 -0700, Stan.Sulc wrote:

> I write installation scripts in sqlplus which as a first command issue
> "DROP USER". When the user to be dropped is currently connected i get
> "can't drop connected user" error, but the script carries on. What i
> want to do is to display prompt like "you have to disconnect first" then
> pause and exit the script on keypress. The thing is i can't think of any
> clever way to achieve it. I know i can use whenever sqlerror exit, but
> it just exits without telling why. I could most likely write some pl/sql
> block or a shell script to help with this, but it doesn't look very
> smart to me. Anybody there has a better solution?

connect / as sysdba
startup force restrict

Then you can execute your script.

-- 
http://www.mladen-gogala.com
Received on Thu Sep 13 2007 - 08:54:50 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US