tags:

views:

149

answers:

3

hi,

When i give..

select * from dba_users; It ll give list of users. In that list there is a user

username:first/dbgokul Password:EXTERNAL

ofcourse.. this was created by me by mistake.(Long back).

Now i dono how to drop this user..

kindly tel me.. how to remove this user from database..???

Thanks in advance.

A: 
drop user <username> CASCADE;

The CASCADE can be omitted if the user doesnt own any objects.

Visage
thanks for ue reply..But, ITs not Working..it showing an error.. drop user first/dbgokulORA-00921: unexpected end of SQL commandi tried to login with the username "first/dbgokul"..it also not entering..Whats the Problem actually.??
+1  A: 

drop user "first/dbgokul" cascade;

tuinstoel
A: 

If you specify an Oracle objectname (including usernames) without quotes, Oracle searches for the name in upper case without special characters. It is advisable to not use mixed or lower case names or special characters in your names for Oracle objects for this reason. Oracle can accept lower/mixed case names and special characters, if you specify quotes around the names. See this example:

SQL> create user "first/dbgokul" identified by foo
  2  /

Gebruiker is aangemaakt.

SQL> select username from dba_users where username like 'fi%'
  2  /

USERNAME
------------------------------
first/dbgokul

1 rij is geselecteerd.

SQL> drop user first/dbgokul
  2  /
drop user first/dbgokul
               *
FOUT in regel 1:
.ORA-00921: Onverwacht einde van SQL-opdracht.


SQL> drop user "first/dbgokul"
  2  /

Gebruiker is verwijderd.

Regards, Rob.

Rob van Wijk