数据加载与传输

来源:互联网 发布:mac版flashplayer 编辑:程序博客网 时间:2024/04/30 07:15
请输入用户名:  sys/sys as sysdba
连接到:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> create directory mypump as
  2  'F:\oracleintall\intall1\admin\oracle\dpdump\temp';
目录已创建。
SQL> grant read,write dba_directory mypump to scott;
grant read,write dba_directory mypump to scott
           *
第 1 行出现错误:
ORA-00990: 权限缺失或无效
SQL> grant read,write on directory mypump to scott;
授权成功。
SQL> select * from dba_directorys where directory_name='mypump';
select * from dba_directorys where directory_name='mypump'
              *
第 1 行出现错误:
ORA-00942: 表或视图不存在
SQL>  select * from dba_directories where directory_name='mypump';
未选定行
SQL> show user;
USER 为 "SYS"
SQL> select * from dba_directories where directory_name='MYPUMP';
OWNER                          DIRECTORY_NAME
------------------------------ ------------------------------
DIRECTORY_PATH
--------------------------------------------------------------------------------
SYS                            MYPUMP

F:\oracleintall\intall1\admin\oracle\dpdump\temp



例14.2执行EXPDP命令指定help参数,来查看expdp命令的所有参数信息如下:

C:\Users\Administrator>expdp help=y


14.3.2 实现数据导出


<1>导出表

例14.5导出scott用户中dept和emp表,如下:

C:\Users\Administrator>expdp scott/tiger directory=mypump dumpfile=exptab.dmp tables=dept,emp
Export: Release 11.2.0.1.0 - Production on 星期日 12月 13 00:22:34 2015
Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.
连接到: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
启动 "SCOTT"."SYS_EXPORT_TABLE_01":  scott/******** directory=mypump dumpfile=exptab.dmp tables=dept,emp
正在使用 BLOCKS 方法进行估计...
处理对象类型 TABLE_EXPORT/TABLE/TABLE_DATA
使用 BLOCKS 方法的总估计: 128 KB
处理对象类型 TABLE_EXPORT/TABLE/TABLE
处理对象类型 TABLE_EXPORT/TABLE/INDEX/INDEX
处理对象类型 TABLE_EXPORT/TABLE/CONSTRAINT/CONSTRAINT
处理对象类型 TABLE_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS
处理对象类型 TABLE_EXPORT/TABLE/COMMENT
处理对象类型 TABLE_EXPORT/TABLE/CONSTRAINT/REF_CONSTRAINT
处理对象类型 TABLE_EXPORT/TABLE/TRIGGER
处理对象类型 TABLE_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
. . 导出了 "SCOTT"."DEPT"                              5.960 KB       5 行
. . 导出了 "SCOTT"."EMP"                               8.625 KB      15 行
已成功加载/卸载了主表 "SCOTT"."SYS_EXPORT_TABLE_01"
******************************************************************************
SCOTT.SYS_EXPORT_TABLE_01 的转储文件集为:
  F:\ORACLEINTALL\INTALL1\ADMIN\ORACLE\DPDUMP\TEMP\EXPTAB.DMP
作业 "SCOTT"."SYS_EXPORT_TABLE_01" 已于 00:23:05 成功完成


提示:执行expdp命令后,显示dept表和emp表的导出过程,从导出结果可以看出,输出文件的名称exptab.dmp

在导出过程中,Data Pump创建并使用一个一个名为sys_export_schema_01的外部表。


<2>导出数据库

使用expdp命令时指定full参数,将导出数据库的所有对象, 包括数据库元数据、数据和所有对象的转储

例14.6导出默认数据库中的所有对象,导出语句如下:

C:\Users\Administrator>expdp system/oracle directory=mypump dumpfile=expdb.dmp full=y


14.4.2 实现数据导入

impdp system/oracle directory =mypump dumpfile =expdb.dmp full=y






0 0
原创粉丝点击
热门问题 老师的惩罚 人脸识别 我在镇武司摸鱼那些年 重生之率土为王 我在大康的咸鱼生活 盘龙之生命进化 天生仙种 凡人之先天五行 春回大明朝 姑娘不必设防,我是瞎子 新生儿吃多漾奶怎么办 婴儿总是睡不熟怎么办 新生儿不不吃奶怎么办 学生沉迷网络游戏班主怎么办 手机用不了卡怎么办 手机变竖屏怎么办 游戏不支持分屏怎么办 服装设计做到没思路怎么办 眼睛变单眼皮了怎么办 换手机号银行卡绑定怎么办 麦当劳mdp改版了怎么办 摆摊做小吃下雨怎么办 cad2014画图很卡怎么办 头皮有毛囊虫怎么办 头发上的毛囊炎怎么办 狗笼子里面拉屎怎么办 地图鱼起白点怎么办 初中学不好高中怎么办 初中孩子英语不好怎么办 初中孩子数学不好怎么办 万能声卡声音小怎么办 营业执照显示经营异常怎么办 暑假教育培训证怎么办 账套引入失败怎么办 报税报错了怎么办 税盘一年没抄税怎么办 初级会计证没领怎么办 房贷没有流水账怎么办 锦州银行倒闭了怎么办 认缴期限过了怎么办 吃了假猪血怎么办 橡皮泥粘头发上怎么办 遇到难相处同事怎么办 遇到奇葩家长怎么办啊! 过期的孕妇奶粉怎么办 肝脏造血功能差怎么办 移动数据显示e怎么办 42天婴儿咳嗽怎么办 脚扭伤贴膏药过敏怎么办 哺乳期乳房有硬块怎么办 蒲乳期乳房有硬块怎么办