Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: sqlplus script dropping conected user
On Sep 12, 12:00 pm, Stan.S..._at_gmail.com 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?
Forcibly disconnect all sessions of <user> prior to starting the installation script.
-- Sybrand Bakker Senior Oracle DBAReceived on Wed Sep 12 2007 - 06:38:09 CDT
![]() |
![]() |