[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. service httpd restart失败解决方法(小记)

    1.首先查看错误日志 /var/log/message看看具体问题.如果一时难以判定直接使用下面一招 2.直接中断http服务,killall -9 httpd,  然后重启http,service ...

  2. Welcome to JimmyCheung's blog!

    博客开通,写写学习笔记,写写心情,写写生活中的点点滴滴~ 有钱的捧个钱场嘞,没钱的贡献个点击量,新鲜的博客出炉咯,来五毛钱的博文呗~ By Jimmy 2014.09.16

  3. 掌握C++基础

    以下是笔者在ubuntu系统下编译运行通过的一些反应c++基础特性的例子,包括类,结构体,构造函数,析构函数,函数的重载,this指针,类的继承,虚函数,函数的覆盖和隐藏等.(由于格式问题代码中的乱码 ...

  4. bzoj 3669: [Noi2014]魔法森林 动态树

    3669: [Noi2014]魔法森林 Time Limit: 30 Sec  Memory Limit: 512 MBSubmit: 363  Solved: 202[Submit][Status] ...

  5. Git 忽略已经提交的文件

    如果想在本地忽略某个文件的话执行这个命令: git update-index --assume-unchanged <file> 如果想重新同步这个文件的话执行这个命令. git upda ...

  6. C语言的static和extern关键字

    我的博客:www.while0.com 如果A.c要包含B.c里的一个变量或函数,则在A.c中要用extern关键字声明.注意: ①如果是包含的B.c里的函数,则在A.c里声明的时候可以不写exter ...

  7. gcc c语言中scanf输入格式不正确,清空缓冲区问题

    我的博客:www.while0.com 折磨了一下午,只因为fflush(stdin)再gcc里和vc里表现不一致.gcc里不能够清空缓冲区.直接上例子: #include <stdio.h&g ...

  8. Android开发详解之onTouch和onClick详解

    android组件中的onTouch,onClick,onLongClick事件发生先后顺序和关联: 一,onTouch返回false 首先是onTouch事件的down事件发生,此时,如果长按,触发 ...

  9. SQL Server 阻塞分析

    一.加锁(locking).阻塞(blocking).死锁(deadlock)定义        加锁:用于管理多个连接的进程.当连接需要访问一块数据时,在这些数据上放置某种类型的锁.      阻塞 ...

  10. FPGA入门学习第一课:二分频器

    分频器还是比较简单的,一般的思路是:每数几个时钟就输出一个时钟.最简单的当数二分频器了,每当时钟上升沿(或下降沿)就把输出翻转一下.这样就刚好实现了二分频器了. 网上也搜到了最简实现”二分频最简单了, ...