Home » SQL & PL/SQL » SQL & PL/SQL » ORA-01940: cannot drop a user that is currently connected
ORA-01940: cannot drop a user that is currently connected [message #245836] Tue, 19 June 2007 00:05 Go to next message
soujanya_srk
Messages: 111
Registered: November 2006
Location: HYDERABAD
Senior Member
i am trying to drop a user, am getting this error
and i am not connected to this user


ORA-01940: cannot drop a user that is currently connected




i did

select username, machine, status from v$session;

and for my machine, it displays active, making this inactive
is the solution for dropping the user?

Re: ORA-01940: cannot drop a user that is currently connected [message #245839 is a reply to message #245836] Tue, 19 June 2007 00:09 Go to previous messageGo to next message
Frank
Messages: 7880
Registered: March 2000
Senior Member
The user has to disconnect. (log out)
If you cannot reach the user, or it is a non-interactive user (e.g. a batch user), you could kill the session.

But are you sure you want to drop this user? After all, the account is still in use...

[Updated on: Tue, 19 June 2007 00:09]

Report message to a moderator

Re: ORA-01940: cannot drop a user that is currently connected [message #245841 is a reply to message #245836] Tue, 19 June 2007 00:10 Go to previous messageGo to next message
BlackSwan
Messages: 25036
Registered: January 2009
Location: SoCal
Senior Member
>and i am not connected to this user
Well, somebody is connect as the user you are trying to drop.
Re: ORA-01940: cannot drop a user that is currently connected [message #245845 is a reply to message #245836] Tue, 19 June 2007 00:14 Go to previous messageGo to next message
soujanya_srk
Messages: 111
Registered: November 2006
Location: HYDERABAD
Senior Member
nobodys connected, and i am dropping the user, cause i have
made some changes, i have a backup..so i want to drop the user
now, and import that dump file again

Re: ORA-01940: cannot drop a user that is currently connected [message #245846 is a reply to message #245836] Tue, 19 June 2007 00:15 Go to previous messageGo to next message
soujanya_srk
Messages: 111
Registered: November 2006
Location: HYDERABAD
Senior Member
i was able to drop my username_admin, _user,_batch
but i am not able to drop the actual username

Re: ORA-01940: cannot drop a user that is currently connected [message #245847 is a reply to message #245836] Tue, 19 June 2007 00:26 Go to previous messageGo to next message
BlackSwan
Messages: 25036
Registered: January 2009
Location: SoCal
Senior Member
>nobodys connected, and i am dropping the user,
When I am confronted with a choice of believing between Oracle & a user, I'll believe Oracle every time; unless & until I am provided reproducable test case otherwise.

>but i am not able to drop the actual username
Then that user is still connected.

[Updated on: Tue, 19 June 2007 00:27] by Moderator

Report message to a moderator

Re: ORA-01940: cannot drop a user that is currently connected [message #245973 is a reply to message #245846] Tue, 19 June 2007 07:58 Go to previous message
joy_division
Messages: 4640
Registered: February 2005
Location: East Coast USA
Senior Member
soujanya_srk wrote on Tue, 19 June 2007 01:15
i was able to drop my username_admin, _user,_batch
but i am not able to drop the actual username



huh?
Previous Topic: how to get the time from date field
Next Topic: Help With Report Format
Goto Forum:
  


Current Time: Sun Dec 04 06:37:17 CST 2016

Total time taken to generate the page: 0.10338 seconds