在该用户下写一个存储过程(要保证该用户并不是以dba身份登录的,不然会把系统表都删掉)
create or replace procedure pro_droptable is
cursor cur is select table_name from user_tables;
drop_sql varchar2(1000);
begin
for tbname in cur loop
begin
drop_sql:='drop table '||tbname.table_name;
execute immediate drop_sql;
end;
end loop;
end pro_droptable;
执行语句:call pro_droptable()
追问如果以前该用户,是grant dba to user;赋予权限的,这样删除对系统表有影响吗?能不能像备份那样,exp user/password@db file =/usr/users/daochu.dmp user=username类似的功能?