Hello,
How do I drop all the objects own by user TEST, with out droping the user, Please give me the full syntax.
Thanks in Advance.
Printable View
Hello,
How do I drop all the objects own by user TEST, with out droping the user, Please give me the full syntax.
Thanks in Advance.
Refer to note # 1019468.6 on Metalink.
Sorry I don't have access to Metalink.
1. login as TEST
2. run this script:
accept 1st char prompt 'Enter object specification to drop: '
select 'DROP ' ||object_type || ' ' || object_name || ';'
from user_objects
where object_type != 'INDEX' and object_name like upper('&1st')
When you are prompted, type --> % (this drops all objects owner by the user TEST)
I think you have to spool the output to a text file then run the spool file as a script
spool drop.sql
accept 1st char prompt 'Enter object specification to drop: '
select 'DROP ' ||object_type || ' ' || object_name || ';'
from user_objects
where object_type != 'INDEX' and object_name like upper('&1st')
spool off
then run drop.sql