-- 空表不导出,建立表空间 select 'alter table '||table_name||' allocate extent;' from user_tables where num_rows=0
-- 查询锁表 select b.username,b.sid,b.serial#,logon_time from v$locked_object a,v$session b where a.session_id = b.sid order by b.logon_time; -- 杀死锁表进程 select 'alter system kill session '''||b.sid||','||b.serial#||''';' from v$locked_object a,v$session b where a.session_id = b.sid order by b.logon_time;