加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

Oracle数据移动-导入和导出

发布时间:2020-12-12 14:24:59 所属栏目:百科 来源:网络整理
导读:命令详情: 1、导出: exp -help 2、导入:imp -help 级别:表,用户下的表,空间下的表,全库。不能导出数据字典。 ============================实例=============================== 1、以Scott用户为例,登录scott。 2、复制两个表 SQL create table emp_
命令详情: 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:orcl1122export ---------------------------------------导出------------------------------------------------------- -------------------------------------------------------------------------------------------------- 4、导出两个表(emp,dept)在cmd窗口执行: exp scott/scott file=C:orcl1122exportscott3exp.dmp tables=(emp_dump,dept_dump); eg: SQL> host exp scott/scott file=C:orcl1122exportscott3exp.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:orcl1122exportscott3exp.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

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读