Not able to drop users (merged) [message #256443] |
Sat, 04 August 2007 14:46 |
surenhr
Messages: 45 Registered: August 2007 Location: gurgoan
|
Member |
|
|
Hi guys ,
i have created a user containing special chracter quote in username.
create user "test's" identified by test.
user was succesfully created and confirmed in all_users table.
i face problem wen i drop this user
drop user "suren's" cascade;
its not allowing me to drop this user
users with any other special character can be created and dropped similarly without any help ..
omly this single quote is causing problem .
Any help ..guyzzz
i m waiitng anxiously ..
[Edit: remove garbage in title]
[Updated on: Sat, 04 August 2007 15:26] by Moderator Report message to a moderator
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Re: Not able to drop users [message #256510 is a reply to message #256443] |
Sun, 05 August 2007 08:01 |
surenhr
Messages: 45 Registered: August 2007 Location: gurgoan
|
Member |
|
|
Hi..,
Thanks a tonn.. for such a prompt response.I am a novice to this field..,just a starter..please ignore my mistakes.
i didnt get what shud i do ?
where to write that trigger which u have suggested??
plzz elaborate a little.
i am using sqlplus /nolog
Thanks and regards,
surenhr
|
|
|
|
Re: Not able to drop users [message #256516 is a reply to message #256443] |
Sun, 05 August 2007 08:33 |
surenhr
Messages: 45 Registered: August 2007 Location: gurgoan
|
Member |
|
|
i have connected as
SQL> conn sys/tcs1234@suren as sysdba;
Connected.
after that what shud i do??????
should i paste that trigger code over there....??????
|
|
|
Re: Not able to drop users [message #256518 is a reply to message #256443] |
Sun, 05 August 2007 08:36 |
surenhr
Messages: 45 Registered: August 2007 Location: gurgoan
|
Member |
|
|
SQL> conn sys/tcs1234@suren as sysdba;
Connected.
SQL> CREATE OR REPLACE TRIGGER "MDSYS"."SDO_DROP_USER"
2 after drop on DATABASE
3 declare
4 stmt varchar2(200);
5 BEGIN
6 if dictionary_obj_type = 'USER' THEN
7 stmt := 'DELETE FROM SDO_GEOM_METADATA_TABLE
8 ' WHERE SDO_OWNER = :owner ';
9 EXECUTE IMMEDIATE stmt USING dictionary_obj_n
10
11 stmt := 'DELETE FROM SDO_MAPS_TABLE ' ||
12 ' WHERE SDO_OWNER = :owner ';
13 EXECUTE IMMEDIATE stmt USING dictionary_obj_n
14
15 stmt := 'DELETE FROM SDO_STYLES_TABLE ' ||
16 ' WHERE SDO_OWNER = :owner ';
17 EXECUTE IMMEDIATE stmt USING dictionary_obj_n
18
19 stmt := 'DELETE FROM SDO_THEMES_TABLE ' ||
20 ' WHERE SDO_OWNER = :owner ';
21 EXECUTE IMMEDIATE stmt USING dictionary_obj_n
22
23 stmt := 'DELETE FROM SDO_LRS_METADATA_TABLE '
24 ' WHERE SDO_OWNER = :owner ';
25 EXECUTE IMMEDIATE stmt USING dictionary_obj_n
26
27 stmt := 'DELETE FROM SDO_TOPO_METADATA_TABLE
28 ' WHERE SDO_OWNER = :owner ';
29 EXECUTE IMMEDIATE stmt USING dictionary_obj_n
30
31 end if;
32 end;
33
34
35
36
37 !!!!!!!!!! after this what shud i do ...i m not getting how to proceed ?????]
thanks and regards
surenhr
|
|
|
|
|
Re: Not able to drop users [message #256524 is a reply to message #256519] |
Sun, 05 August 2007 09:03 |
surenhr
Messages: 45 Registered: August 2007 Location: gurgoan
|
Member |
|
|
SQL> conn surenhr/surenhr@suren;
Connected.
SQL> create user "tests's" identified by test;
User created.
SQL> select username from all_users;
USERNAME
------------------------------
SYS
SYSTEM
DBSNMP
OUTLN
WMSYS
WKSYS
ORDSYS
ORDPLUGINS
MDSYS
CTXSYS
XDB
USERNAME
------------------------------
ANONYMOUS
ODM
ODM_MTR
WKPROXY
QS_ADM
HR
OE
PM
SH
RMAN
QS
USERNAME
------------------------------
QS_WS
QS_ES
QS_OS
QS_CBADM
QS_CB
QS_CS
SCOTT
SURENHR
tests's
31 rows selected.
SQL> drop user "tests's" cascade;
drop user "tests's" cascade
*
ERROR at line 1:
ORA-00604: error occurred at recursive SQL level 1
ORA-00933: SQL command not properly ended
ORA-06512: at line 7
still i m getting the same error..
|
|
|
|
|
Single Quote username user cant be dropped [message #257601 is a reply to message #256443] |
Wed, 08 August 2007 13:56 |
surenhr
Messages: 45 Registered: August 2007 Location: gurgoan
|
Member |
|
|
Hi guys ,
i have created a user containing special chracter quote in username.
create user "suren's" identified by test.
user was succesfully created and confirmed in all_users table.
i face problem wen i drop this user
drop user "suren's" cascade;
its not allowing me to drop this user
users with any other special character can be created and dropped similarly without any issue ..
only this single quote is causing problem .
Any help
[Updated on: Wed, 08 August 2007 14:38] by Moderator Report message to a moderator
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|