删除用户下所有对象

来源:互联网 发布:阿里云计划任务 编辑:程序博客网 时间:2024/05/12 09:32
 

删除用户下所有对象

标签: oracle对象删除脚本
 138人阅读 评论(0) 收藏 举报
 分类:
作者同类文章X
  • Oracle 11g中的IO Calibrate(IO校准)
  • 从备份集恢复归档日志的测试与说明
  • V$LOCK视图相关知识
  • Oracle补丁术语介绍
  • 更多
SELECT DISTINCT(object_TYPE) from user_objects;


select 'drop table '||object_name||' cascade constraints PURGE;' from user_objects where object_TYPE='TABLE';

--select 'drop INDEX '||object_name ||' ;' from user_objects where object_TYPE='INDEX';

select 'drop VIEW '||object_name ||' ;' from user_objects where object_TYPE='VIEW';

select 'drop PACKAGE '||object_name ||' ;' from user_objects where object_TYPE='PACKAGE';


--select 'drop PACKAGE BODY '||object_name ||' ;' from user_objects where object_TYPE='PACKAGE BODY';

select 'drop SEQUENCE '||object_name ||' ;' from user_objects where object_TYPE='SEQUENCE';
select 'drop table '||object_name||';' from user_objects where object_type='TABLE';
0 0
原创粉丝点击