12c 資料泵命令列互動模式

snowdba發表於2015-02-27
資料泵作業執行過程中可以使用Ctrl+C組合鍵使其暫停,進入使用者互動模式。注意和普通的OS操作不一樣的地方是,Ctrl+C不會cancel正在執行的作業,而是使其資料泵進入互動模式。

下面的例子可以演示其效果
[oracle@snow ~]$ expdp dp/dp@pdb1 directory=dp_dir dumpfile=full_pdb1.dmp logfile=full_pdb1.log full=y reuse_dumpfiles=y

Export: Release 12.1.0.1.0 - Production on Mon Feb 9 20:59:01 2015

Copyright (c) 1982, 2013, Oracle and/or its affiliates. All rights reserved.

Connected to: Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
Starting "DP"."SYS_EXPORT_FULL_08": dp/********@pdb1 directory=dp_dir dumpfile=full_pdb1.dmp logfile=full_pdb1.log full=y reuse_dumpfiles=y
Estimate in progress using BLOCKS method...
Processing object type DATABASE_EXPORT/EARLY_OPTIONS/VIEWS_AS_TABLES/TABLE_DATA
Processing object type DATABASE_EXPORT/NORMAL_OPTIONS/TABLE_DATA
...省區部分輸出
Processing object type DATABASE_EXPORT/SCHEMA/TYPE/GRANT/OWNER_GRANT/OBJECT_GRANT
Processing object type DATABASE_EXPORT/SYSTEM_PROCOBJACT/PRE_SYSTEM_ACTIONS/PROCACT_SYSTEM
^C                  <==此處輸入Ctrl+c組合鍵進入互動模式
Export> stop_job    <==此處輸出stop_job停止當前作業
Are you sure you wish to stop this job ([yes]/no): yes

如果想要繼續剛才的作業SYS_EXPORT_FULL_08,使用下面的命令
[oracle@snow ~]$ expdp dp/dp@pdb1 attach=SYS_EXPORT_FULL_08

Export: Release 12.1.0.1.0 - Production on Mon Feb 9 20:59:50 2015

Copyright (c) 1982, 2013, Oracle and/or its affiliates. All rights reserved.

Connected to: Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options

Job: SYS_EXPORT_FULL_08
Owner: DP
Operation: EXPORT
Creator Privs: TRUE
GUID: 0EB33B193924505EE0530CE410AC082E
Start Time: Monday, 09 February, 2015 20:59:53
Mode: FULL
Instance: cdb
Max Parallelism: 1
Timezone: -07:00
Timezone version: 18
Endianness: LITTLE
NLS character set: AL32UTF8
NLS NCHAR character set: AL16UTF16
EXPORT Job Parameters:
Parameter Name Parameter Value:
CLIENT_COMMAND dp/********@pdb1 directory=dp_dir dumpfile=full_pdb1.dmp logfile=full_pdb1.log full=y reuse_dumpfiles=y
State: IDLING
Bytes Processed: 0
Current Parallelism: 1
Job Error Count: 0
Dump File: /home/oracle/full_pdb1.dmp
bytes written: 4,096

Worker 1 Status:
Instance ID: 1
Instance name: cdb
Host name: snow.oracle.com
State: UNDEFINED

Export> start_job <==此處輸入start_job繼續SYS_EXPORT_FULL_08作業

Export> continue_client  <==此處輸入continue_client退出互動模式,返回螢幕輸出模式繼續作業
Job SYS_EXPORT_FULL_08 has been reopened at Mon Feb 9 20:59:53 2015
Restarting "DP"."SYS_EXPORT_FULL_08": dp/********@pdb1 directory=dp_dir dumpfile=full_pdb1.dmp logfile=full_pdb1.log full=y reuse_dumpfiles=y
Processing object type DATABASE_EXPORT/EARLY_OPTIONS/VIEWS_AS_TABLES/TABLE
Processing object type DATABASE_EXPORT/EARLY_POST_INSTANCE_IMPCALLOUT/MARKER
Processing object type DATABASE_EXPORT/SCHEMA/XMLSCHEMA/XMLSCHEMA
Processing object type DATABASE_EXPORT/NORMAL_OPTIONS/TABLE
..省去部分輸出
Processing object type DATABASE_EXPORT/SCHEMA/POST_SCHEMA/PROCOBJ
Processing object type DATABASE_EXPORT/SCHEMA/POST_SCHEMA/PROCACT_SCHEMA
Processing object type DATABASE_EXPORT/AUDIT_UNIFIED/AUDIT_POLICY_ENABLE
Processing object type DATABASE_EXPORT/AUDIT
Processing object type DATABASE_EXPORT/POST_SYSTEM_IMPCALLOUT/MARKER
. . exported "SYS"."KU$_USER_MAPPING_VIEW" 6.164 KB 45 rows
. . exported "ORDDATA"."ORDDCM_DOCS" 252.9 KB 9 rows
. . exported "SYS"."AUD$" 22.81 KB 2 rows
. . exported "LBACSYS"."OLS$AUDIT_ACTIONS" 5.734 KB 8 rows
. . exported "LBACSYS"."OLS$DIP_EVENTS" 5.515 KB 2 rows
..省去部分輸出
. . exported "PM"."ONLINE_MEDIA" 7.856 MB 9 rows
. . exported "SH"."CUSTOMERS" 10.27 MB 55500 rows
. . exported "SH"."COSTS":"COSTS_Q1_1998" 139.6 KB 4411 rows
. . exported "SH"."COSTS":"COSTS_Q1_1999" 183.7 KB 5884 rows
. . exported "SH"."COSTS":"COSTS_Q1_2000" 120.7 KB 3772 rows
..省去部分輸出
. . exported "SH"."SALES":"SALES_Q4_2002" 0 KB 0 rows
. . exported "SH"."SALES":"SALES_Q4_2003" 0 KB 0 rows
Master table "DP"."SYS_EXPORT_FULL_08" successfully loaded/unloaded
******************************************************************************
Dump file set for DP.SYS_EXPORT_FULL_08 is:
/home/oracle/full_pdb1.dmp
Job "DP"."SYS_EXPORT_FULL_08" completed with 1 error(s) at Mon Feb 9 21:01:38 2015 elapsed 0 00:01:46


匯出作業完成!

常用匯入/匯出作業互動式命令如下

命令
描述
ADD_FILE (expdp獨有)
嚮匯出資料泵檔案集合新增檔案
CONTINUE_CLIENT
返回事件記錄模式
EXIT_CLIENT
退出客戶端會話並返回OS命令列介面,保持作業執行
FILESIZE (expdp獨有)
定義資料泵檔案尺寸
HELP
幫助
KILL_JOB
終止作業,不能在使用其它方式繼續。有別於stop_job
PARALLEL
調整並行度,根據伺服器壓力提高或者降低
REUSE_DUMPFILES (expdp獨有)
覆蓋已經存在的資料泵檔案
START_JOB
重啟當前作業,通常配合stop_job使用
STATUS
顯示當前作業的狀態
STOP_JOB[=IMMEDIATE]
停止正在執行的作業(將來可以使用expdp userid attach=作業號 配合互動式命令start_job來繼續該作業)

全文完

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29047826/viewspace-1442546/,如需轉載,請註明出處,否則將追究法律責任。

相關文章