重建目标库

select 'alter system kill session '||''''||sid||','||serial#||''';' from v$session where username= 'TMDATA'

select * from v$session where username= 'TMDATA'
-- alter system kill session'532,4562'
drop user tmdata cascade;

create user tmdata identified by tmdata;
grant dba to tmdata;

impdp system/orcl schemas=tmdata directory=DUMP_DIR dumpfile=tmdata.dmp table_exists_action=replace
--如果表已经存在则进行替换操作

posted @ 2017-10-10 09:42  psy5choit  阅读(108)  评论(0编辑  收藏  举报