[Oracle] Data Pump 详细使用教程(1)- 总览

[Oracle] Data Pump 详细使用教程(2)- 总览

[Oracle] Data Pump 详细使用教程(3)- 总览

[Oracle] Data Pump 详细使用教程(4)- 总览

[Oracle] Data Pump 详细使用教程(5)- 总览

当我们起了一个datapump job之后,可以通过v$session_longops查看当前进度。

USERNAME - job owner
OPNAME - job name
TARGET_DESC - job operation
SOFAR - megabytes transferred thus far during the job
TOTALWORK - estimated number of megabytes in the job
UNITS - megabytes (MB)
MESSAGE - a formatted status message of the form:
'job_name: operation_name : nnn out of mmm MB done'
SYS@TEST16>select username,opname,sofar,TOTALWORK,UNITS,message from v$session_longops where opname='SYS_EXPORT_FULL_03';

USERNAME        OPNAME                    SOFAR  TOTALWORK UNITS MESSAGE
--------------- -------------------- ---------- ---------- ----- ------------------------------------------------------------
SYSTEM SYS_EXPORT_FULL_03 4737 35368 MB SYS_EXPORT_FULL_03: EXPORT : 4737 out of 35368 MB done

但有时候单单监控是不够的,我们可能还需要修改相应的JOB,这时我们就需要进行datapumo的命令交互模式。

有两种方式可以进入命令交互模式,分别是:

1. 在logging模式下按ctrl+C

2. expdp or impdp attach=SYSTEM.SYS_EXPORT_FULL_03

expdp交互模式的命令如下:

Activity Command Used

Add additional dump files.

ADD_FILE

Exit interactive mode and enter logging mode.

CONTINUE_CLIENT

Stop the export client session, but leave the job running.

EXIT_CLIENT

Redefine the default size to be used for any subsequent dump files.

FILESIZE

Display a summary of available commands.

HELP

Detach all currently attached client sessions and terminate the current job.

KILL_JOB

Increase or decrease the number of active worker processes for the current job. This command is valid only in the Enterprise Edition of Oracle Database 11g.

PARALLEL

Restart a stopped job to which you are attached.

START_JOB

Display detailed status for the current job and/or set status interval.

STATUS

Stop the current job for later restart.

STOP_JOB

impdp的交互模式命令如下:

Activity Command Used

Exit interactive-command mode.

CONTINUE_CLIENT

Stop the import client session, but leave the current job running.

EXIT_CLIENT

Display a summary of available commands.

HELP

Detach all currently attached client sessions and terminate the current job.

KILL_JOB

Increase or decrease the number of active worker processes for the current job. This command is valid only in Oracle Database Enterprise Edition.

PARALLEL

Restart a stopped job to which you are attached.

START_JOB

Display detailed status for the current job.

STATUS

Stop the current job.

STOP_JOB


下面以expdp为例,介绍几个常用命令(如果忘记命令,敲万能的help)。

1. status:查看当前job的状态,如完成的百分比、并行度等,每个worker代表一个并行进程。

Export> status

Job: SYS_EXPORT_FULL_03
Operation: EXPORT
Mode: FULL
State: EXECUTING
Bytes Processed: 8,357,285,928
Percent Done: 23
Current Parallelism: 2
Job Error Count: 0
Dump File: /home/oracle/dump/full_%u.dmp
Dump File: /home/oracle/dump/full_01.dmp
bytes written: 8,357,294,080
Dump File: /home/oracle/dump/full_02.dmp
bytes written: 4,096 Worker 1 Status:
Process Name: DW00
State: EXECUTING
Object Type: DATABASE_EXPORT/SCHEMA/TABLE/COMMENT
Completed Objects: 5,120
Worker Parallelism: 1 Worker 2 Status:
Process Name: DW01
State: EXECUTING
Object Schema: P95169
Object Name: GRADE_RCCASE
Object Type: DATABASE_EXPORT/SCHEMA/TABLE/TABLE_DATA
Completed Objects: 3
Total Objects: 1,866
Completed Rows: 23,505,613
Worker Parallelism: 1

2. parallel:动态调整并行度

Export> parallel=4

3. add_file:增加dumpfile

Export> ADD_FILE=hr2.dmp, dpump_dir2:hr3.dmp

4. stop_job, kill_job, start_job

stop_job只是暂停,之后可以用start_job重新启动,而kill_job直接杀掉,不可恢复

5. continue_client:退出交互模式,进入logging模式;

exit_client: 退出客户端

[Oracle] Data Pump 详细使用教程(5)- 命令交互模式的更多相关文章

  1. [Oracle] Data Pump 详细使用教程(4)- network_link

    [Oracle] Data Pump 详细使用教程(1)- 总览 [Oracle] Data Pump 详细使用教程(2)- 总览 [Oracle] Data Pump 详细使用教程(3)- 总览 [ ...

  2. [Oracle] Data Pump 详细使用教程(1)- 总览

    从10g开始,Oracle提供更高效的Data Pump(即expdp/impdp)来进行数据的导入和导出,老的exp/imp还可以用,但已经不建议使用.注意:expdp/impdp和exp/imp之 ...

  3. [Oracle] SQL*Loader 详细使用教程(2)- 命令行参数

    sqlldr工具   SQL*Loader的客户端工具是sqlldr,在操作系统的命令行下输入sqlldr,后面不接任何参数,将显示帮助信息如下所示(所有命令行参数的简单描述及其默认值),所以你并不需 ...

  4. [Oracle] SQL*Loader 详细使用教程(3)- 控制文件

    控制文件是SQL*Loader里最重要的文件,它是一个文本文件,用来定义数据文件的位置.数据的格式.以及配置数据加载过程的行为,在sqlldr中以control参数指定控制文件.   在控制文件里配置 ...

  5. 转 使用隐含Trace参数诊断Oracle Data Pump故障

    http://blog.itpub.net/17203031/viewspace-772718/ Data Pump数据泵是Oracle从10g开始推出的,用于取代传统exp/imp工具的数据备份还原 ...

  6. OGG初始化之使用Oracle Data Pump加载数据

    此方法使用Oracle Data Pump实用程序来建立目标数据.将副本应用于目标后,您将记录副本停止的SCN.包含在副本中的交易将被跳过以避免完整性违规冲突.从流程起点,Oracle GoldenG ...

  7. Oracle Data Pump 导出和导入数据

    Data pump export/import(hereinafter referred to as Export/Import for ease of reading)是一种将元数据和数据导出到系统 ...

  8. [Oracle] SQL*Loader 详细使用教程(1)- 总览

    SQL*Loader原理   SQL*Loader是Oracle提供的用于数据加载的一种工具,它比较适合业务分析类型数据库(数据仓库),能处理多种格式的平面文件,批量数据装载比传统的数据插入效率更高. ...

  9. [Oracle] SQL*Loader 详细使用教程(4)- 字段列表

    在上一篇中我们介绍了SQL*Loader中最重要的文件——控制文件,而本篇要介绍控制文件中最重要的部分——字段列表,字段列表的作用是把数据文件中的记录和数据库中表的列对应起来,下面是字段列表的一个例子 ...

随机推荐

  1. 很少有人知道的c++中的try块函数

    c++有一些在现实世界中很少看到的结构.这些结构有着自己的用法,但是要特别小心保守的予以运用.就像是网站 The Old New Thing首页标题上面的说的那样: “代码通常被读的次数原因超过了被写 ...

  2. linux源码“.config”文件分析

    一..config文件概述 .config文件是linux内核配置文件,当执行#make uImage编译生成内核时,顶层的Makefile会读取.config文件的内容,根据这个配置文件来编译所定制 ...

  3. POJ 3083 Children of the Candy Corn bfs和dfs

      Children of the Candy Corn Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 8102   Acc ...

  4. uoj164. 【清华集训2015】V 统计

    坑爹题面:http://uoj.ac/problem/164 正常题面: 对于一个序列支持下列5个操作: 1.区间加x 2.区间减x并与0取max 3.区间覆盖 4.单点查询 5.单点历史最大值查询 ...

  5. 解决poi导出Excel异常org.openxmlformats.schemas.spreadshe

    JAVA报表 POI未捕获到 servlet OUTEXCEL 的其中一个服务方法中抛出的异常.抛出的异常:java.lang.NoClassDefFoundError: org.openxmlfor ...

  6. mysql主从配置(清晰的思路)

    mysql主从配置.鄙人是在如下环境测试的: 主数据库所在的操作系统:win7 主数据库的版本:5.0 主数据库的ip地址:192.168.1.111 从数据库所在的操作系统:linux 从数据的版本 ...

  7. tomcat 系统架构与设计模式 第一部分 系统架构工作原理 转

    Tomcat 系统架构与设计模式,第 1 部分: 工作原理 许 令波, Java 开发工程师, 淘宝网 许令波,现就职于淘宝网,是一名 Java 开发工程师.对大型互联网架构设计颇感兴趣,并对一些开源 ...

  8. Bluetooth LE(低功耗蓝牙) - 第一部分

    前言 在写这篇文章的时候,谷歌刚刚发布了Android Wear ,摩托罗拉也发布了 Moto 360 智能手表.Android Wear的API还是相当基本的,是很好的文档材料,而且还会不断的更新, ...

  9. git reset到之前的某一个commit或者恢复之前删除的某一个分支

    一.使用了git reset之后,想要找回某一个commit 1.git log -g  这个命令只能显示少部分的commit 推荐使用git reflog 找到想要恢复的那个commit的hash, ...

  10. Unity3d 真实的植物渲染

    好久没写shader了,有些生疏,刚弄了个植物shader,分享一下. 先上图片: 重点需要注意的是fragment shader的透明部分 需要如此声明 Tags{ "LightMode& ...