前端之家收集整理的这篇文章主要介绍了
oracle数据库导入导出,
前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
conn system/123@ORCL;
create directory bak as 'c:\mydb';
select * from dba_directories --3.授予用户操作dump_dir目录的权限 --GRANT READ,WRITE ON DIRECTORY导入导出文件夹TO 用户名; grant read,write on directory bak to cxp;
grant read,write on directory bak to scott;
expdp scott/123@ORCL directory=bak dumpfile=scott.dmp schemas=scott
expdp cxp/123@ORCL directory=bak dumpfile=cxp_tablespace.dmp tablespaces=cxp_tablespace
impdp scott/123@ORCL directory=bak dumpfile=scott.dmp schemas=scott
impdp cxp/123@ORCL directory=bak dumpfile=cxp_tablespace.dmp tablespaces=cxp_tablespace
exp cxp/123@ORCL file=c:\db\cxp.dmp
exp scott/123@orcl file=c:\db\scott.dmp
imp cxp/123@ORCL file=c:\db\scott.dmp fromuser=scott touser=cxp
drop table emp;
drop table dept;
drop table salgrade;
select * from dba_sys_privs;
select * from session_privs;
select * from user_sys_privs;
select * from dba_tab_privs;
select * from all_tab_privs ;
select * from user_tab_privs;
select* from user_role_privs;
原文链接:https://www.f2er.com/oracle/212457.html