邓超
ToQuery
Oracle数据库导入数据文件
2014-08-27 15:43:50   阅读2325次

该命令在“开始菜单>>运行>>CMD”中执行

一、数据导出(exp.exe)

1、将数据库orcl完全导出,用户名system,密码accp,导出到d:\daochu.dmp文件中

exp reimb/reimb@192.168.248.246/orcl file=d:/daochu.dmp full=y

2、将数据库orcl中scott用户的对象导出

exp scott/accp@orcl file=d:\daochu.dmp  owner=(scott)

3、将数据库orcl中的scott用户的表emp、dept导出

exp scott/accp@orcl file= d:\daochu.dmp tables=(emp,dept)

4、将数据库orcl中的表空间te ownerstSpace导出

exp system/accp@orcl file=d:\daochu.dmp tablespaces=(testSpace)

sqlplus reimb/reimb@192.168.248.246/orcl

conn oracle/oracle@192.168.248.246/orcl

二、数据导入(imp.exe)

1、将d:\daochu.dmp 中的数据导入 orcl数据库中。

imp system/12345@orcl file=e:/reimb.dmp full=y

2、如果导入时,数据表已经存在,将报错,对该表不会进行导入;加上ignore=y即可,表示忽略现有表,在现有表上追加记录。

imp OAXT/OAXT@orcl file=e:/reimb.dmp    full=y  ignore=y

3、将d:\daochu.dmp中的表emp导入

imp scott/accp@orcl file=d:\daochu.dmp tables=(emp)

192.168.248.246

oracle/oracle@253

file=d:/daochu.dmp full=y

exp PANICS/reimb@192.168.245.246/orcl file=d:/daochu.dmp full=y  owner=PANICS

exp PANICS/reimb@192.168.245.246/orcl file=/home/oracle/panics2490404.dmp  owner=PANICS

select 'drop ' || object_type || ' ' || object_name || ';' from user_objects  where object_type <>'LOB' AND object_type 

<>'DATABASE LINK';

imp ICSTEST/icstest@orcl file=/home/oracle/panics2490404.dmp full=y




-----------------------------------------------------
转载请注明来源此处
原地址:#

-----网友评论----
暂无评论
-----发表评论----
微网聚博客乐园 ©2014 blog.mn886.net 鲁ICP备14012923号   网站导航