expdp&impdp管理job

(一)交互模式使用

注:虽然可以直接使用screen来替代的,但status命令可以看到更多信息

下面以expdp为例, impdp完全一样只是少了add_file以及filesize命令

ATTACH [=[schema_name.]job_name]

$ expdp ltxt/ltxt attach=LTXT.SYS_IMPORT_FULL_04

用于进义交互界面,如果不指定且当前schema只有一个job, 而且此job还必须是运行的,则连接此job

如果连接一个stopped job,则必须指定job name,  通过dba_datapump_jobs查看

You cannot attach to a job in another schema unless it is already running.

If the dump file set or master table for the job have been deleted, then the attach operation will fail.

Altering the master table in any way will lead to unpredictable results.

add_file=[directory_object:]file_name[,...]

仅用于expdp

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

Export>add_file=expdat_%U.dmp

continue_client

Changes the Export mode from interactive-command mode to logging mode.

即切到前台运行,如果job处于stopped状态会被start

Export> continue_client

exit_client

Stops the export client session, exits Export, and discontinues logging to the terminal, but leaves the current job running. 即切到后台运行

Export> exit_client

FILESIZE=integer[B默认| KB | MB | GB | TB]

重定义filesize大小,设置为0则无限制, 仅用于expdp

Export> FILESIZE=100MB

Help

Export> HELP

kill_job

删除任务,只有expdp时有,无法被重启动, kill_job后会删除master table及dumpfile, 日志会保留

Export> kill_job

PARALLEL=integer

Export> parallel=4

增加或减小并行度,增加立刻生效,减少要等当前work process完成才行

An increase takes effect immediately if there are sufficient files and resources. A decrease does not take effect until an existing process finishes its current task. If the value is decreased, then workers are idled but not deleted until the job exits.

START_JOB

Export> start_job   

STATUS[=integer]

不仅能看状态还可以重设置日志状态的显示间隔

You have the option of specifying how frequently, in seconds, this status should be displayed in logging mode. If no value is entered or if the default value of 0 is used, then the periodic status display is turned off and status is displayed only once.

This status information is written only to your standard output device, not to the log file (even if one is in effect).

STOP_JOB[=IMMEDIATE]

Export> stop_job    

停止当前正在运行的任务,可以通过start_job重启

Stops the current job either immediately or after an orderly shutdown

An orderly shutdown stops the job after worker processes have finished their current tasks.

There is no risk of corruption or data loss when you specify STOP_JOB=IMMEDIATE. However, some tasks that were incomplete at the time of shutdown may have to be redone at restart time.

  • 查看job状态
  1. 使用交互模式的status
  2. 通过日志logfile
  3. 通过datapump视图

DBA_DATAPUMP_JOBS        --正在运行的数据泵作业

DBA_DATAPUMP_SESSION  --使用导入导出作业中的用户会话

  1. 通过V$SESSION_LONGOPS         --数据泵进度(in megabytes of table data transferred)

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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值