
將expdp的dmp文件從asm磁盤組里邊放到本地文件系統(tǒng)里邊 參考原文: How To Extract Datapump File From ASM Diskgroup To Local Filesystem? (Doc ID 566941.1) 適用于: Oracle Database - Enterprise Edition - Version 11.1.0.6 to 11.1.0.7 [Release 11.1
將expdp的dmp文件從asm磁盤組里邊放到本地文件系統(tǒng)里邊
參考原文:
How To Extract Datapump File From ASM Diskgroup To Local Filesystem? (Doc ID 566941.1)
適用于:
Oracle Database - Enterprise Edition - Version 11.1.0.6 to 11.1.0.7 [Release 11.1]
Information in this document applies to any platform.
Information in this document applies to any platform.
目標(biāo):
從11.1.0.6開始, asmcmd 提供了cp命令,該cp命令跟os上的cp命令類似。
你可以使用asmcmd cp命令 copy 出asm磁盤組中的所有文件。
解決方案:
舉例:
1)在asm實(shí)例中建立一個(gè)directory
SQL> show parameter instance_name
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
instance_name string +ASM
SQL> alter diskgroup FRA add directory '+FRA/dumpsets';
Diskgroup altered.
2)在數(shù)據(jù)庫實(shí)例中建立一個(gè)directory--用于存放dmp文件
SQL> show parameter instance_name
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
instance_name string DB11G
SQL> create directory dumpsets as '+FRA/dumpsets';
Directory created.
3)在os上建立一個(gè)directory并在database 實(shí)例中,為此os directory 建立 db中的directory。該 os directory用于存放導(dǎo)出產(chǎn)生的logfile
SQL> ! mkdir /home/oracle/dumpsets
SQL> !ls -ld /home/oracle/dumpsets
drwxr-xr-x 2 oracle oinstall 4096 May 7 10:20 /home/oracle/dumpsets
SQL> create directory logfile_dest as '/home/oracle/dumpsets';
Directory created.
4)執(zhí)行expdp導(dǎo)出數(shù)據(jù)
expdp userid=system/storage01 directory='DUMPSETS' dumpfile=expdp_5_5.dat job_name=full_export logfile=logfile_dest:exp5_5.log
Export: Release 11.1.0.6.0 - Production on Wednesday, 07 May, 2008 10:22:57
Copyright (c) 2003, 2007, Oracle. All rights reserved.
Connected to: Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Starting "SYSTEM"."FULL_EXPORT": userid=system/******** directory=DUMPSETS dumpfile=expdp_5_5.dat job_name=full_export logfile=logfile_dest:exp5_5.log
Estimate in progress using BLOCKS method...
Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
Total estimation using BLOCKS method: 320 KB
Processing object type SCHEMA_EXPORT/USER
Processing object type SCHEMA_EXPORT/SYSTEM_GRANT
Processing object type SCHEMA_EXPORT/ROLE_GRANT
Processing object type SCHEMA_EXPORT/DEFAULT_ROLE
Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA
Processing object type SCHEMA_EXPORT/SYNONYM/SYNONYM
Processing object type SCHEMA_EXPORT/TYPE/TYPE_SPEC
.
.
.
Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/REF_CONSTRAINT
Processing object type SCHEMA_EXPORT/TABLE/TRIGGER
Processing object type SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
Processing object type SCHEMA_EXPORT/TABLE/POST_TABLE_ACTION
Processing object type SCHEMA_EXPORT/POST_SCHEMA/PROCACT_SCHEMA
. . exported "SYSTEM"."REPCAT$_AUDIT_ATTRIBUTE" 6.398 KB 2 rows
. . exported "SYSTEM"."REPCAT$_OBJECT_TYPES" 6.882 KB 28 rows
. . exported "SYSTEM"."REPCAT$_RESOLUTION_METHOD" 5.875 KB 19 rows
. . exported "SYSTEM"."REPCAT$_TEMPLATE_STATUS" 5.484 KB 3 rows
. . exported "SYSTEM"."REPCAT$_TEMPLATE_TYPES" 6.289 KB 2 rows
. . exported "SYSTEM"."DEF$_AQCALL" 0 KB 0 rows
. . exported "SYSTEM"."DEF$_AQERROR" 0 KB 0 rows
.
.
.
. . exported "SYSTEM"."REPCAT$_SITE_OBJECTS" 0 KB 0 rows
. . exported "SYSTEM"."REPCAT$_SNAPGROUP" 0 KB 0 rows
. . exported "SYSTEM"."REPCAT$_TEMPLATE_OBJECTS" 0 KB 0 rows
. . exported "SYSTEM"."REPCAT$_TEMPLATE_PARMS" 0 KB 0 rows
. . exported "SYSTEM"."REPCAT$_TEMPLATE_REFGROUPS" 0 KB 0 rows
. . exported "SYSTEM"."REPCAT$_TEMPLATE_SITES" 0 KB 0 rows
. . exported "SYSTEM"."REPCAT$_TEMPLATE_TARGETS" 0 KB 0 rows
. . exported "SYSTEM"."REPCAT$_USER_AUTHORIZATIONS" 0 KB 0 rows
. . exported "SYSTEM"."REPCAT$_USER_PARM_VALUES" 0 KB 0 rows
. . exported "SYSTEM"."SQLPLUS_PRODUCT_PROFILE" 0 KB 0 rows
Master table "SYSTEM"."FULL_EXPORT" successfully loaded/unloaded
******************************************************************************
Dump file set for SYSTEM.FULL_EXPORT is:
+FRA/dumpsets/expdp_5_5.dat
5)dmp文件被創(chuàng)建在了+FRA/dumpsets/下。
ASMCMD> ls -l +FRA/dumpsets/expdp_5_5.dat
Type Redund Striped Time Sys Name
N expdp_5_5.dat => +FRA/DB11G/DUMPSET/SYSTEMFULL_EXPORT_71029_1.303.654085391
6)將此dmp文件從asm 磁盤組中拷貝到os 的directory中。
ASMCMD> pwd
+fra/dumpsets
ASMCMD> ls
expdp_5_5.dat
ASMCMD> cp expdp_5_5.dat /home/oracle/dumpsets/expdp_5_5.dat
source +fra/dumpsets/expdp_5_5.dat
target /home/oracle/dumpsets/expdp_5_5.dat
copying file(s)...
file, /home/oracle/dumpsets/expdp_5_5.dat, copy committed.
ASMCMD> exit
$> ls -l /home/oracle/dumpsets/expdp_5_5.dat
-rw-r----- 1 oracle oinstall 2289664 May 7 11:05 /home/oracle/dumpsets/expdp_5_5.dat
聲明:本網(wǎng)頁內(nèi)容旨在傳播知識(shí),若有侵權(quán)等問題請(qǐng)及時(shí)與本網(wǎng)聯(lián)系,我們將在第一時(shí)間刪除處理。TEL:177 7030 7066 E-MAIL:11247931@qq.com