命令详情:
1、导出: exp -help
2、导入:imp -help
级别:表,用户下的表,空间下的表,全库。不能导出数据字典。
============================实例===============================
1、以Scott用户为例,登录scott。
2、复制两个表
SQL> create table emp_dump as select * from emp;
表已创建。
SQL> create table dept_dump as select * from dept;
表已创建。
3、创建导出的目录:C:\orcl1122\export
---------------------------------------导出-------------------------------------------------------
--------------------------------------------------------------------------------------------------
4、导出两个表(emp,dept)在cmd窗口执行:
exp scott/scott file=C:\orcl1122\export\scott3exp.dmp tables=(emp_dump,dept_dump);
eg:
SQL> host exp scott/scott file=C:\orcl1122\export\scott3exp.dmp
tables=(emp_dump,dept_dump);
......
成功终止导出, 没有出现警告。
5、删除两个表emp_dump,dept_dump:
SQL> drop table emp_dump;
表已删除。
SQL> drop table dept_dump;
表已删除。
------------------------------------------导入----------------------------------------------------------
----------------------------------------------------------------------------------------------------
6、导入之前导出的数据
SQL> host imp scott/scott file=C:\orcl1122\export\scott3exp.dmp;
Import: Release 11.2.0.1.0 - Production on 星期三 9月 27 16:23:14 2017
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
连接到: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
经由常规路径由 EXPORT:V11.02.00 创建的导出文件
已经完成 ZHS16GBK 字符集和 AL16UTF16 NCHAR 字符集中的导入
. 正在将 SCOTT 的对象导入到 SCOTT
. 正在将 SCOTT 的对象导入到 SCOTT
. . 正在导入表 "EMP_DUMP"导入了 14 行
. . 正在导入表 "DEPT_DUMP"导入了 4 行
成功终止导入, 没有出现警告。
7ok
1、导出: exp -help
2、导入:imp -help
级别:表,用户下的表,空间下的表,全库。不能导出数据字典。
============================实例===============================
1、以Scott用户为例,登录scott。
2、复制两个表
SQL> create table emp_dump as select * from emp;
表已创建。
SQL> create table dept_dump as select * from dept;
表已创建。
3、创建导出的目录:C:\orcl1122\export
---------------------------------------导出-------------------------------------------------------
--------------------------------------------------------------------------------------------------
4、导出两个表(emp,dept)在cmd窗口执行:
exp scott/scott file=C:\orcl1122\export\scott3exp.dmp tables=(emp_dump,dept_dump);
eg:
SQL> host exp scott/scott file=C:\orcl1122\export\scott3exp.dmp
tables=(emp_dump,dept_dump);
......
成功终止导出, 没有出现警告。
5、删除两个表emp_dump,dept_dump:
SQL> drop table emp_dump;
表已删除。
SQL> drop table dept_dump;
表已删除。
------------------------------------------导入----------------------------------------------------------
----------------------------------------------------------------------------------------------------
6、导入之前导出的数据
SQL> host imp scott/scott file=C:\orcl1122\export\scott3exp.dmp;
Import: Release 11.2.0.1.0 - Production on 星期三 9月 27 16:23:14 2017
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
连接到: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
经由常规路径由 EXPORT:V11.02.00 创建的导出文件
已经完成 ZHS16GBK 字符集和 AL16UTF16 NCHAR 字符集中的导入
. 正在将 SCOTT 的对象导入到 SCOTT
. 正在将 SCOTT 的对象导入到 SCOTT
. . 正在导入表 "EMP_DUMP"导入了 14 行
. . 正在导入表 "DEPT_DUMP"导入了 4 行
成功终止导入, 没有出现警告。
7ok