Home » Other » Client Tools » Drop User Command Help
Drop User Command Help [message #253241] Mon, 23 July 2007 04:54 Go to next message
msrafeeq
Messages: 8
Registered: July 2007
Junior Member
Dear Friends

While I am using the Drop User Command, I am getting the below message and I am unable to Drop the User Name.

SQL> DROP USER waelam1 CASCADE;

ERROR at line 1:
ORA-01940: Cannot drop a user that is currently connected

How can I disconnect this user name? and drop this user?

Please need advice.

Regards
Rafeeq
Re: Drop User Command Help [message #253258 is a reply to message #253241] Mon, 23 July 2007 05:18 Go to previous messageGo to next message
ebrian
Messages: 2794
Registered: April 2006
Senior Member
SQL> disco
SQL> conn <new_user>/<password>

where new_user is not the user you are trying to drop and has the appropriate permissions to drop user.
Re: Drop User Command Help [message #253331 is a reply to message #253258] Mon, 23 July 2007 09:42 Go to previous messageGo to next message
DreamzZ
Messages: 1666
Registered: May 2007
Location: Dreamzland
Senior Member
connect as SYS and then issue the same command.
Re: Drop User Command Help [message #253341 is a reply to message #253331] Mon, 23 July 2007 10:14 Go to previous messageGo to next message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
As I already said:

NEVER EVER use SYS for anything but maintenance purpose.

SYS is not for creating/droppping user, this is the role of DBA (or equivalent).
SYS is for starting/shutting down/recovering... database.

Regards
Michel
Re: Drop User Command Help [message #253342 is a reply to message #253341] Mon, 23 July 2007 10:15 Go to previous messageGo to next message
DreamzZ
Messages: 1666
Registered: May 2007
Location: Dreamzland
Senior Member
Aww yes michel.actually i just got up. Embarassed
Re: Drop User Command Help [message #253347 is a reply to message #253342] Mon, 23 July 2007 10:23 Go to previous messageGo to next message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
So take a cup of coffee or tea, wait a while and then answer.
Many of you answers are useful and many others are completly useless as this one that does not add a bit to Brian's answer.

Regards
Michel
Re: Drop User Command Help [message #253348 is a reply to message #253341] Mon, 23 July 2007 10:24 Go to previous messageGo to next message
ebrian
Messages: 2794
Registered: April 2006
Senior Member
Michel Cadot wrote on Mon, 23 July 2007 11:14
As I already said:

NEVER EVER use SYS for anything but maintenance purpose.

SYS is not for creating/droppping user, this is the role of DBA (or equivalent).
SYS is for starting/shutting down/recovering... database.


My sentiments exactly! The SYS account is definitely abused for trivial tasks that can be performed as other users. That's why I specifically stated "appropriate permissions to drop user". No need to kill a gnat with a sledge hammer.
Re: Drop User Command Help [message #253354 is a reply to message #253341] Mon, 23 July 2007 10:37 Go to previous messageGo to next message
DreamzZ
Messages: 1666
Registered: May 2007
Location: Dreamzland
Senior Member
Michel Cadot wrote on Mon, 23 July 2007 09:14
As I already said:

NEVER EVER use SYS for anything but maintenance purpose.

SYS is not for creating/droppping user, this is the role of DBA (or equivalent).
SYS is for starting/shutting down/recovering... database.

Regards
Michel



Thanks Michel. Cool

Actually i'm here to learn something from you senior guys,I know sometimes i posted rong answer but you corrected me,I'm lucky guy to have seniors assistance like you.
I hope with the passage of time i will learn more n more from you peoples because mine Carrier just started from APRIL/2007 only 4 months.
Re: Drop User Command Help [message #256445 is a reply to message #253241] Sat, 04 August 2007 15:45 Go to previous messageGo to next message
surenhr
Messages: 45
Registered: August 2007
Location: gurgoan
Member
Hi,
Simply connect through new user which have dba priviliges.
As been already stated SYS user is for maintenance purposes..

create user <test>/<test>@<SID>;
grant dba to test;

conn test/test@<SID>
now issue the drop command to drop the user you want to drop.
Re: Drop User Command Help [message #256446 is a reply to message #256445] Sat, 04 August 2007 16:02 Go to previous messageGo to next message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Granting DBA to a user named TEST is not a good idea.
And if he created a user with an account, he can use the same account to drop the user no need to creat a new one.

Regards
Michel
Re: Drop User Command Help [message #256511 is a reply to message #256446] Sun, 05 August 2007 08:12 Go to previous message
surenhr
Messages: 45
Registered: August 2007
Location: gurgoan
Member
Thanks for correcting me michel Smile
Previous Topic: Using Text Importer via SQL*Plus
Next Topic: Connection using sql*plus
Goto Forum:
  


Current Time: Thu Mar 28 11:38:31 CDT 2024