oracle数据库导入导出

来源:互联网 发布:python struct模块 编辑:程序博客网 时间:2024/06/05 14:43
导出导入一切
exp  system/password@ORCL file=/opt/sysrem.dmp full=y
imp system/password@ORCL file=/opt/sysrem.dmp owner =system

导出除数据之外的内容
exp tas_master/mdasil@sqmmt file=/data/tas_master.dmp rows=n compress=n

select * from dba_directories;

expdp tas_master/mdasil@sqmmt directory=DMP01 dumpfile=tas_master.dmp content=metadata_only 


导出以相同字段开头的值
expdp tas_master/mdasil@sqmmt  directory=DMP01dumpfile=tas_master_data.dmp  tables=CFG%


expdp tas_master/mdasil@sqmmt  schemas=tas_master  dumpfile=tas_master.all.dmp directory=DMP01;

1)导出用户
expdp scott/tiger@orcl schemas=scott dumpfile=expdp.dmp directory=dump_dir;

2)导出表
expdp scott/tiger@orcl tables=emp,dept dumpfile=expdp.dmp directory=dump_dir;

3)按查询条件导
expdp scott/tiger@orcl directory=dump_dir dumpfile=expdp.dmp tables=empquery='where deptno=20';

4)按表空间导
expdp system/manager@orcl directory=dump_dir dumpfile=tablespace.dmptablespaces=temp,example;


5)导整个数据库
expdp system/manager@orcl directory=dump_dir dumpfile=full.dmp full=y;
原创粉丝点击