Oracle資料泵(Oracle Data Pump) 19c
Oracle資料泵(Oracle Data Pump) 可以實現資料的高速移動,資料泵是基於資料庫服務端的,它執行在資料庫內部,而不是一個獨立執行的客戶端應用程式。
資料泵由三部分組成:命令列客戶端(expdp和impdp)、資料泵API、後設資料API。
expdp和impdp呼叫資料泵API和後設資料API共同完成資料的遷移。
資料泵移動資料有四種方式:
資料檔案複製(Data file copying)、直接路徑(direct path)、外部表(external tables)、網路連結匯入(network link import)
安裝Oracle資料庫後,可以在 $ORACLE_HOME/bin 目錄下找到 expdp 和 impdp 的程式,匯入和匯出的過程,實際上
就是在執行這兩個程式:
################expdp##################
1、使用前,建立邏輯目錄directory
[oracle@dbserver ~]$ mkdir -p /home/oracle/dumpdir/dumppdb1/
2、 切換到pdb1 進資料庫將其建立成邏輯目錄directory:create directory directory_name as path
SQL> alter session set container = pdb1; Session altered. SQL> show pdbs; CON_ID CON_NAME OPEN MODE RESTRICTED ---------- ------------------------------ ---------- ---------- 3 PDB1 READ WRITE NO SQL> SQL> create directory dumppdb1 as '/home/oracle/dumpdir/dumppdb1/'; Directory created.
3、透過查詢 dba_directories 可以看到新建 directory 的資訊:
SQL> set linesize 9999; SQL> select * from dba_directories where DIRECTORY_NAME = 'DUMPPDB1'; OWNER DIRECTORY_NAME DIRECTORY_PATH ORIGIN_CON_ID ------------------------------ ------------------------------ ------------------------------ ------------- SYS DUMPPDB1 /home/oracle/dumpdir/dumppdb1/ ##########
4、 單獨建立一個dba許可權的資料泵使用者
SQL> show pdbs; CON_ID CON_NAME OPEN MODE RESTRICTED ---------- ------------------------------ ---------- ---------- 3 PDB1 READ WRITE NO SQL>create user dump_pdb1_user identified by dump_pdb1_user; Grant succeeded. SQL> grant dba to dump_pdb1_user; Grant succeeded. SQL> grant read,write on directory DUMPPDB1 to dump_pdb1_user; Grant succeeded.
注意###########################
可插拔資料庫,在一個容器cdb中以多租戶的形式同時存在多個資料庫pdb。在為pdb做資料泵匯入匯出時和傳統的資料庫
有少許不同。
1,需要為pdb新增tansnames
2,匯入匯出時需要在userid引數內指定其tansnames的值,比如 userid=user/pwd@tnsname
##############################
5、將PDB1新增tnsnames,確保tnsping OK
[oracle@dbserver admin]$ cat tnsnames.ora # tnsnames.ora Network Configuration File: /u01/app/oracle/product/19c/dbhome_1/network/admin/tnsnames.ora # Generated by Oracle configuration tools. PROD = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = dbserver)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = prod) ) ) PDB1 = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = dbserver)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = pdb1) ) ) LISTENER_PROD = (ADDRESS = (PROTOCOL = TCP)(HOST = dbserver)(PORT = 1521)) [oracle@dbserver admin]$ tnsping pdb1 TNS Ping Utility for Linux: Version 19.0.0.0.0 - Production on 16-FEB-2022 11:26:08 Copyright (c) 1997, 2020, Oracle. All rights reserved. Used parameter files: Used TNSNAMES adapter to resolve the alias Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = dbserver)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = pdb1))) OK (0 msec)
6、透過expdp匯出
全庫匯出, tablespaces模式匯出, schemas模式匯出, tables模式匯出
6.1、 全庫匯出
[oracle@dbserver dumppdb1]$ expdp dump_pdb1_user/dump_pdb1_user@pdb1 directory=DUMPPDB1 dumpfile=full.dump logfile=full_dump.log full=y; Export: Release 19.0.0.0.0 - Production on Wed Feb 16 12:16:18 2022 Version 19.10.0.0.0 Copyright (c) 1982, 2019, Oracle and/or its affiliates. All rights reserved. Connected to: Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production Starting "DUMP_PDB1_USER"."SYS_EXPORT_FULL_01": dump_pdb1_user/********@pdb1 directory=DUMPPDB1 dumpfile=full.dump logfile=full_dump.log full=y 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/NORMAL_OPTIONS/VIEWS_AS_TABLES/TABLE_DATA Processing object type DATABASE_EXPORT/SCHEMA/TABLE/TABLE_DATA Processing object type DATABASE_EXPORT/SCHEMA/TABLE/INDEX/STATISTICS/INDEX_STATISTICS Processing object type DATABASE_EXPORT/SCHEMA/TABLE/STATISTICS/TABLE_STATISTICS Processing object type DATABASE_EXPORT/STATISTICS/MARKER Processing object type DATABASE_EXPORT/PRE_SYSTEM_IMPCALLOUT/MARKER Processing object type DATABASE_EXPORT/PRE_INSTANCE_IMPCALLOUT/MARKER Processing object type DATABASE_EXPORT/TABLESPACE Processing object type DATABASE_EXPORT/PROFILE Processing object type DATABASE_EXPORT/SCHEMA/USER Processing object type DATABASE_EXPORT/RADM_FPTM Processing object type DATABASE_EXPORT/GRANT/SYSTEM_GRANT/PROC_SYSTEM_GRANT Processing object type DATABASE_EXPORT/SCHEMA/GRANT/SYSTEM_GRANT Processing object type DATABASE_EXPORT/SCHEMA/ROLE_GRANT Processing object type DATABASE_EXPORT/SCHEMA/DEFAULT_ROLE Processing object type DATABASE_EXPORT/SCHEMA/ON_USER_GRANT Processing object type DATABASE_EXPORT/SCHEMA/TABLESPACE_QUOTA Processing object type DATABASE_EXPORT/RESOURCE_COST Processing object type DATABASE_EXPORT/TRUSTED_DB_LINK Processing object type DATABASE_EXPORT/DIRECTORY/DIRECTORY Processing object type DATABASE_EXPORT/DIRECTORY/GRANT/OWNER_GRANT/OBJECT_GRANT Processing object type DATABASE_EXPORT/SYSTEM_PROCOBJACT/PRE_SYSTEM_ACTIONS/PROCACT_SYSTEM Processing object type DATABASE_EXPORT/SYSTEM_PROCOBJACT/PROCOBJ Processing object type DATABASE_EXPORT/SYSTEM_PROCOBJACT/POST_SYSTEM_ACTIONS/PROCACT_SYSTEM Processing object type DATABASE_EXPORT/SCHEMA/PROCACT_SCHEMA 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/NORMAL_OPTIONS/TABLE Processing object type DATABASE_EXPORT/NORMAL_OPTIONS/VIEWS_AS_TABLES/TABLE Processing object type DATABASE_EXPORT/NORMAL_POST_INSTANCE_IMPCALLOUT/MARKER Processing object type DATABASE_EXPORT/SCHEMA/TABLE/TABLE Processing object type DATABASE_EXPORT/SCHEMA/TABLE/COMMENT Processing object type DATABASE_EXPORT/SCHEMA/TABLE/INDEX/INDEX Processing object type DATABASE_EXPORT/FINAL_POST_INSTANCE_IMPCALLOUT/MARKER Processing object type DATABASE_EXPORT/AUDIT_UNIFIED/AUDIT_POLICY_ENABLE Processing object type DATABASE_EXPORT/POST_SYSTEM_IMPCALLOUT/MARKER . . exported "SYS"."KU$_USER_MAPPING_VIEW" 6.101 KB 39 rows . . exported "SYSTEM"."REDO_DB" 25.59 KB 1 rows . . exported "WMSYS"."WM$WORKSPACES_TABLE$" 12.10 KB 1 rows . . exported "WMSYS"."WM$HINT_TABLE$" 9.984 KB 97 rows . . exported "LBACSYS"."OLS$INSTALLATIONS" 6.960 KB 2 rows . . exported "WMSYS"."WM$WORKSPACE_PRIV_TABLE$" 7.078 KB 11 rows . . exported "SYS"."DAM_CONFIG_PARAM$" 6.531 KB 14 rows . . exported "SYS"."TSDP_SUBPOL$" 6.328 KB 1 rows . . exported "WMSYS"."WM$NEXTVER_TABLE$" 6.375 KB 1 rows . . exported "LBACSYS"."OLS$PROPS" 6.234 KB 5 rows . . exported "WMSYS"."WM$ENV_VARS$" 6.015 KB 3 rows . . exported "SYS"."TSDP_PARAMETER$" 5.953 KB 1 rows . . exported "SYS"."TSDP_POLICY$" 5.921 KB 1 rows . . exported "WMSYS"."WM$VERSION_HIERARCHY_TABLE$" 5.984 KB 1 rows . . exported "WMSYS"."WM$EVENTS_INFO$" 5.812 KB 12 rows . . exported "LBACSYS"."OLS$AUDIT_ACTIONS" 5.757 KB 8 rows . . exported "LBACSYS"."OLS$DIP_EVENTS" 5.539 KB 2 rows . . exported "AUDSYS"."AUD$UNIFIED":"AUD_UNIFIED_P0" 0 KB 0 rows . . exported "AUDSYS"."AUD$UNIFIED":"SYS_P221" 100.4 KB 96 rows . . exported "AUDSYS"."AUD$UNIFIED":"SYS_P248" 12.66 MB 5918 rows . . exported "LBACSYS"."OLS$AUDIT" 0 KB 0 rows . . exported "LBACSYS"."OLS$COMPARTMENTS" 0 KB 0 rows . . exported "LBACSYS"."OLS$DIP_DEBUG" 0 KB 0 rows . . exported "LBACSYS"."OLS$GROUPS" 0 KB 0 rows . . exported "LBACSYS"."OLS$LAB" 0 KB 0 rows . . exported "LBACSYS"."OLS$LEVELS" 0 KB 0 rows . . exported "LBACSYS"."OLS$POL" 0 KB 0 rows . . exported "LBACSYS"."OLS$POLICY_ADMIN" 0 KB 0 rows . . exported "LBACSYS"."OLS$POLS" 0 KB 0 rows . . exported "LBACSYS"."OLS$POLT" 0 KB 0 rows . . exported "LBACSYS"."OLS$PROFILE" 0 KB 0 rows . . exported "LBACSYS"."OLS$PROFILES" 0 KB 0 rows . . exported "LBACSYS"."OLS$PROG" 0 KB 0 rows . . exported "LBACSYS"."OLS$SESSINFO" 0 KB 0 rows . . exported "LBACSYS"."OLS$USER" 0 KB 0 rows . . exported "LBACSYS"."OLS$USER_COMPARTMENTS" 0 KB 0 rows . . exported "LBACSYS"."OLS$USER_GROUPS" 0 KB 0 rows . . exported "LBACSYS"."OLS$USER_LEVELS" 0 KB 0 rows . . exported "SYS"."AUD$" 28.08 KB 33 rows . . exported "SYS"."DAM_CLEANUP_EVENTS$" 0 KB 0 rows . . exported "SYS"."DAM_CLEANUP_JOBS$" 0 KB 0 rows . . exported "SYS"."TSDP_ASSOCIATION$" 0 KB 0 rows . . exported "SYS"."TSDP_CONDITION$" 0 KB 0 rows . . exported "SYS"."TSDP_FEATURE_POLICY$" 0 KB 0 rows . . exported "SYS"."TSDP_PROTECTION$" 0 KB 0 rows . . exported "SYS"."TSDP_SENSITIVE_DATA$" 0 KB 0 rows . . exported "SYS"."TSDP_SENSITIVE_TYPE$" 0 KB 0 rows . . exported "SYS"."TSDP_SOURCE$" 0 KB 0 rows . . exported "SYSTEM"."REDO_LOG" 0 KB 0 rows . . exported "WMSYS"."WM$BATCH_COMPRESSIBLE_TABLES$" 0 KB 0 rows . . exported "WMSYS"."WM$CONSTRAINTS_TABLE$" 0 KB 0 rows . . exported "WMSYS"."WM$CONS_COLUMNS$" 0 KB 0 rows . . exported "WMSYS"."WM$LOCKROWS_INFO$" 0 KB 0 rows . . exported "WMSYS"."WM$MODIFIED_TABLES$" 0 KB 0 rows . . exported "WMSYS"."WM$MP_GRAPH_WORKSPACES_TABLE$" 0 KB 0 rows . . exported "WMSYS"."WM$MP_PARENT_WORKSPACES_TABLE$" 0 KB 0 rows . . exported "WMSYS"."WM$NESTED_COLUMNS_TABLE$" 0 KB 0 rows . . exported "WMSYS"."WM$RESOLVE_WORKSPACES_TABLE$" 0 KB 0 rows . . exported "WMSYS"."WM$RIC_LOCKING_TABLE$" 0 KB 0 rows . . exported "WMSYS"."WM$RIC_TABLE$" 0 KB 0 rows . . exported "WMSYS"."WM$RIC_TRIGGERS_TABLE$" 0 KB 0 rows . . exported "WMSYS"."WM$UDTRIG_DISPATCH_PROCS$" 0 KB 0 rows . . exported "WMSYS"."WM$UDTRIG_INFO$" 0 KB 0 rows . . exported "WMSYS"."WM$VERSION_TABLE$" 0 KB 0 rows . . exported "WMSYS"."WM$VT_ERRORS_TABLE$" 0 KB 0 rows . . exported "WMSYS"."WM$WORKSPACE_SAVEPOINTS_TABLE$" 0 KB 0 rows . . exported "MDSYS"."RDF_PARAM$" 6.515 KB 3 rows . . exported "SYS"."AUDTAB$TBS$FOR_EXPORT" 5.953 KB 2 rows . . exported "SYS"."DBA_SENSITIVE_DATA" 0 KB 0 rows . . exported "SYS"."DBA_TSDP_POLICY_PROTECTION" 0 KB 0 rows . . exported "SYS"."FGA_LOG$FOR_EXPORT" 0 KB 0 rows . . exported "SYS"."NACL$_ACE_EXP" 0 KB 0 rows . . exported "SYS"."NACL$_HOST_EXP" 6.914 KB 1 rows . . exported "SYS"."NACL$_WALLET_EXP" 0 KB 0 rows . . exported "SYS"."SQL$TEXT_DATAPUMP" 0 KB 0 rows . . exported "SYS"."SQL$_DATAPUMP" 0 KB 0 rows . . exported "SYS"."SQLOBJ$AUXDATA_DATAPUMP" 0 KB 0 rows . . exported "SYS"."SQLOBJ$DATA_DATAPUMP" 0 KB 0 rows . . exported "SYS"."SQLOBJ$PLAN_DATAPUMP" 0 KB 0 rows . . exported "SYS"."SQLOBJ$_DATAPUMP" 0 KB 0 rows . . exported "SYSTEM"."SCHEDULER_JOB_ARGS" 0 KB 0 rows . . exported "SYSTEM"."SCHEDULER_PROGRAM_ARGS" 0 KB 0 rows . . exported "WMSYS"."WM$EXP_MAP" 7.718 KB 3 rows . . exported "WMSYS"."WM$METADATA_MAP" 0 KB 0 rows . . exported "HF"."HF" 5.507 KB 2 rows Master table "DUMP_PDB1_USER"."SYS_EXPORT_FULL_01" successfully loaded/unloaded ****************************************************************************** Dump file set for DUMP_PDB1_USER.SYS_EXPORT_FULL_01 is: /home/oracle/dumpdir/dumppdb1/full.dump Job "DUMP_PDB1_USER"."SYS_EXPORT_FULL_01" successfully completed at Wed Feb 16 12:18:56 2022 elapsed 0 00:02:37
6.2、 tablespaces模式匯出
[oracle@dbserver dumppdb1]$ expdp dump_pdb1_user/dump_pdb1_user@pdb1 directory=DUMPPDB1 dumpfile=tablespsce_hf.dump logfile=tablespace_hf_dump.log tablespaces=hf Export: Release 19.0.0.0.0 - Production on Wed Feb 16 12:23:18 2022 Version 19.10.0.0.0 Copyright (c) 1982, 2019, Oracle and/or its affiliates. All rights reserved. Connected to: Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production Starting "DUMP_PDB1_USER"."SYS_EXPORT_TABLESPACE_01": dump_pdb1_user/********@pdb1 directory=DUMPPDB1 dumpfile=tablespsce_hf.dump logfile=tablespace_hf_dump.log tablespaces=hf Processing object type TABLE_EXPORT/TABLE/TABLE_DATA Processing object type TABLE_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS Processing object type TABLE_EXPORT/TABLE/STATISTICS/MARKER Processing object type TABLE_EXPORT/TABLE/TABLE . . exported "HF"."HF" 5.507 KB 2 rows Master table "DUMP_PDB1_USER"."SYS_EXPORT_TABLESPACE_01" successfully loaded/unloaded ****************************************************************************** Dump file set for DUMP_PDB1_USER.SYS_EXPORT_TABLESPACE_01 is: /home/oracle/dumpdir/dumppdb1/tablespsce_hf.dump Job "DUMP_PDB1_USER"."SYS_EXPORT_TABLESPACE_01" successfully completed at Wed Feb 16 12:23:33 2022 elapsed 0 00:00:14
6.3、 schemas 模式匯出
[oracle@dbserver dumppdb1]$ expdp dump_pdb1_user/dump_pdb1_user@pdb1 directory=DUMPPDB1 dumpfile=schemas_hf.dump logfile=schemas_hf_dump.log schemas=hf Export: Release 19.0.0.0.0 - Production on Wed Feb 16 12:24:41 2022 Version 19.10.0.0.0 Copyright (c) 1982, 2019, Oracle and/or its affiliates. All rights reserved. Connected to: Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production Starting "DUMP_PDB1_USER"."SYS_EXPORT_SCHEMA_01": dump_pdb1_user/********@pdb1 directory=DUMPPDB1 dumpfile=schemas_hf.dump logfile=schemas_hf_dump.log schemas=hf Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA Processing object type SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS Processing object type SCHEMA_EXPORT/STATISTICS/MARKER Processing object type SCHEMA_EXPORT/USER Processing object type SCHEMA_EXPORT/ROLE_GRANT Processing object type SCHEMA_EXPORT/DEFAULT_ROLE Processing object type SCHEMA_EXPORT/TABLESPACE_QUOTA Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA Processing object type SCHEMA_EXPORT/TABLE/TABLE . . exported "HF"."HF" 5.507 KB 2 rows Master table "DUMP_PDB1_USER"."SYS_EXPORT_SCHEMA_01" successfully loaded/unloaded ****************************************************************************** Dump file set for DUMP_PDB1_USER.SYS_EXPORT_SCHEMA_01 is: /home/oracle/dumpdir/dumppdb1/schemas_hf.dump Job "DUMP_PDB1_USER"."SYS_EXPORT_SCHEMA_01" successfully completed at Wed Feb 16 12:25:10 2022 elapsed 0 00:00:29
6.4、 tables模式匯出
[oracle@dbserver dumppdb1]$ expdp dump_pdb1_user/dump_pdb1_user@pdb1 directory=DUMPPDB1 dumpfile=table_hf.dump logfile=table_hf_dump.log tables=hf.hf Export: Release 19.0.0.0.0 - Production on Wed Feb 16 12:31:36 2022 Version 19.10.0.0.0 Copyright (c) 1982, 2019, Oracle and/or its affiliates. All rights reserved. Connected to: Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production Starting "DUMP_PDB1_USER"."SYS_EXPORT_TABLE_01": dump_pdb1_user/********@pdb1 directory=DUMPPDB1 dumpfile=table_hf.dump logfile=table_hf_dump.log tables=hf.hf Processing object type TABLE_EXPORT/TABLE/TABLE_DATA Processing object type TABLE_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS Processing object type TABLE_EXPORT/TABLE/STATISTICS/MARKER Processing object type TABLE_EXPORT/TABLE/TABLE . . exported "HF"."HF" 5.507 KB 2 rows Master table "DUMP_PDB1_USER"."SYS_EXPORT_TABLE_01" successfully loaded/unloaded ****************************************************************************** Dump file set for DUMP_PDB1_USER.SYS_EXPORT_TABLE_01 is: /home/oracle/dumpdir/dumppdb1/table_hf.dump Job "DUMP_PDB1_USER"."SYS_EXPORT_TABLE_01" successfully completed at Wed Feb 16 12:31:48 2022 elapsed 0 00:00:12
檢視生成的檔案
[oracle@dbserver dumppdb1]$ pwd /home/oracle/dumpdir/dumppdb1 [oracle@dbserver dumppdb1]$ ll total 17272 -rw-r----- 1 oracle oinstall 16957440 Feb 16 12:18 full.dump -rw-r--r-- 1 oracle oinstall 10042 Feb 16 12:18 full_dump.log -rw-r----- 1 oracle oinstall 352256 Feb 16 12:25 schemas_hf.dump -rw-r--r-- 1 oracle oinstall 1372 Feb 16 12:25 schemas_hf_dump.log -rw-r----- 1 oracle oinstall 176128 Feb 16 12:31 table_hf.dump -rw-r--r-- 1 oracle oinstall 1109 Feb 16 12:31 table_hf_dump.log -rw-r--r-- 1 oracle oinstall 1146 Feb 16 12:23 tablespace_hf_dump.log -rw-r----- 1 oracle oinstall 176128 Feb 16 12:23 tablespsce_hf.dump
################impdp##################
1-5 同上,匯出一樣,匯入也需要先做以上1-5步
6、透過impdp匯入
全庫匯入, tablespaces模式 匯入,schemas模式 匯入,tables模式 匯入
6.1 全庫匯入
源103上pdb1 匯入到150的pdb2上
源103上的pdb1 SQL> select name from v$datafile; NAME -------------------------------------------------------------------------------- /u01/app/oracle/oradata/PROD/pdb1/system01.dbf /u01/app/oracle/oradata/PROD/pdb1/sysaux01.dbf /u01/app/oracle/oradata/PROD/pdb1/undotbs01.dbf /u01/app/oracle/oradata/PROD/pdb1/hf01.dbf 目標端150上的pdb2 SQL> select name from v$datafile; NAME -------------------------------------------------------------------------------- /u01/app/oracle/oradata/PROD/pdb2/system01.dbf /u01/app/oracle/oradata/PROD/pdb2/sysaux01.dbf /u01/app/oracle/oradata/PROD/pdb2/undotbs01.dbf /u01/app/oracle/oradata/PROD/pdb2/dw01.dbf
源端先匯出pdb1的全備,scp到目標端,再匯入。
源103匯出全備 [oracle@dbserver dumppdb1]$ expdp dump_pdb1_user/dump_pdb1_user@pdb1 directory=DUMPPDB1 dumpfile=full.dump logfile=full_dump.log full=y Export: Release 19.0.0.0.0 - Production on Thu Feb 17 08:42:18 2022 Version 19.10.0.0.0 Copyright (c) 1982, 2019, Oracle and/or its affiliates. All rights reserved. Connected to: Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production Starting "DUMP_PDB1_USER"."SYS_EXPORT_FULL_01": dump_pdb1_user/********@pdb1 directory=DUMPPDB1 dumpfile=full.dump logfile=full_dump.log full=y Processing object type DATABASE_EXPORT/EARLY_OPTIONS/VIEWS_AS_TABLES/TABLE_DATA 。。。。。。。。。。。。 。。。。。。。。。。。 。。。。。。。。。。。。 . . exported "HF"."HF" 5.507 KB 2 rows Master table "DUMP_PDB1_USER"."SYS_EXPORT_FULL_01" successfully loaded/unloaded ****************************************************************************** Dump file set for DUMP_PDB1_USER.SYS_EXPORT_FULL_01 is: /home/oracle/dumpdir/dumppdb1/full.dump Job "DUMP_PDB1_USER"."SYS_EXPORT_FULL_01" successfully completed at Thu Feb 17 08:47:06 2022 elapsed 0 00:04:45
[oracle@dbserver dumppdb1]$ scp full.dump 10.8.98.150:/home/oracle/dumpdir/dumppdb2
150匯入 匯入前我現在目標端建立了tablspace hf,檔案是。 create tablespace hf datafile '/u01/app/oracle/oradata/PROD/pdb2/hf01.dbf' size 100m autoextend on next 100m; [oracle@dbserver dumppdb2]$ impdp system/oracle@pdb2 directory=DUMPPDB2 dumpfile=full.dump logfile=full.log Import: Release 19.0.0.0.0 - Production on Thu Feb 17 09:03:01 2022 Version 19.10.0.0.0 Copyright (c) 1982, 2019, Oracle and/or its affiliates. All rights reserved. Connected to: Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production Master table "SYSTEM"."SYS_IMPORT_FULL_01" successfully loaded/unloaded Starting "SYSTEM"."SYS_IMPORT_FULL_01": system/********@pdb2 directory=DUMPPDB2 dumpfile=full.dump logfile=full.log Processing object type DATABASE_EXPORT/PRE_SYSTEM_IMPCALLOUT/MARKER Processing object type DATABASE_EXPORT/PRE_INSTANCE_IMPCALLOUT/MARKER Processing object type DATABASE_EXPORT/TABLESPACE ORA-31684: Object type TABLESPACE:"UNDOTBS1" already exists ORA-31684: Object type TABLESPACE:"TEMP" already exists ORA-31684: Object type TABLESPACE:"HF" already exists Processing object type DATABASE_EXPORT/PROFILE Processing object type DATABASE_EXPORT/SCHEMA/USER ORA-31684: Object type USER:"PDB1ADMIN" already exists ORA-31684: Object type USER:"DUMP_PDB1_USER" already exists ORA-31684: Object type USER:"PDBA" already exists ORA-31684: Object type USER:"DW" already exists ORA-31684: Object type USER:"DUMP_PDB2_USER" already exists Processing object type DATABASE_EXPORT/RADM_FPTM Processing object type DATABASE_EXPORT/GRANT/SYSTEM_GRANT/PROC_SYSTEM_GRANT Processing object type DATABASE_EXPORT/SCHEMA/GRANT/SYSTEM_GRANT Processing object type DATABASE_EXPORT/SCHEMA/ROLE_GRANT Processing object type DATABASE_EXPORT/SCHEMA/DEFAULT_ROLE Processing object type DATABASE_EXPORT/SCHEMA/ON_USER_GRANT Processing object type DATABASE_EXPORT/SCHEMA/TABLESPACE_QUOTA Processing object type DATABASE_EXPORT/RESOURCE_COST Processing object type DATABASE_EXPORT/TRUSTED_DB_LINK Processing object type DATABASE_EXPORT/DIRECTORY/DIRECTORY ORA-31684: Object type DIRECTORY:"DUMPPDB2" already exists ORA-31684: Object type DIRECTORY:"DUMPPDB1" already exists Processing object type DATABASE_EXPORT/DIRECTORY/GRANT/OWNER_GRANT/OBJECT_GRANT Processing object type DATABASE_EXPORT/SYSTEM_PROCOBJACT/PRE_SYSTEM_ACTIONS/PROCACT_SYSTEM >>> Cannot set an SCN larger than the current SCN. If a Streams Capture configuration was imported then the Apply that processes the captured messages needs to be dropped and recreated. See My Oracle Support article number 1380295.1. Processing object type DATABASE_EXPORT/SYSTEM_PROCOBJACT/PROCOBJ Processing object type DATABASE_EXPORT/SYSTEM_PROCOBJACT/POST_SYSTEM_ACTIONS/PROCACT_SYSTEM Processing object type DATABASE_EXPORT/SCHEMA/PROCACT_SCHEMA Processing object type DATABASE_EXPORT/EARLY_OPTIONS/VIEWS_AS_TABLES/TABLE Processing object type DATABASE_EXPORT/EARLY_OPTIONS/VIEWS_AS_TABLES/TABLE_DATA . . imported "SYS"."KU$_EXPORT_USER_MAP" 6.132 KB 41 rows Processing object type DATABASE_EXPORT/EARLY_POST_INSTANCE_IMPCALLOUT/MARKER Processing object type DATABASE_EXPORT/NORMAL_OPTIONS/TABLE Processing object type DATABASE_EXPORT/NORMAL_OPTIONS/TABLE_DATA . . imported "SYSTEM"."REDO_DB_TMP" 25.59 KB 1 rows . . imported "WMSYS"."E$WORKSPACES_TABLE$" 12.10 KB 1 rows . . imported "WMSYS"."E$HINT_TABLE$" 9.984 KB 97 rows . . imported "WMSYS"."E$WORKSPACE_PRIV_TABLE$" 7.078 KB 11 rows . . imported "SYS"."AMGT$DP$DAM_CONFIG_PARAM$" 6.531 KB 14 rows . . imported "SYS"."DP$TSDP_SUBPOL$" 6.328 KB 1 rows . . imported "WMSYS"."E$NEXTVER_TABLE$" 6.375 KB 1 rows . . imported "WMSYS"."E$ENV_VARS$" 6.015 KB 3 rows . . imported "SYS"."DP$TSDP_PARAMETER$" 5.953 KB 1 rows . . imported "SYS"."DP$TSDP_POLICY$" 5.921 KB 1 rows . . imported "WMSYS"."E$VERSION_HIERARCHY_TABLE$" 5.984 KB 1 rows . . imported "WMSYS"."E$EVENTS_INFO$" 5.812 KB 12 rows . . imported "AUDSYS"."AMGT$DP$AUD$UNIFIED":"AUD_UNIFIED_P0" 0 KB 0 rows . . imported "AUDSYS"."AMGT$DP$AUD$UNIFIED":"SYS_P221" 150.1 KB 192 rows . . imported "AUDSYS"."AMGT$DP$AUD$UNIFIED":"SYS_P248" 25.25 MB 11828 rows . . imported "LBACSYS"."OLS_DP$OLS$AUDIT" 0 KB 0 rows . . imported "LBACSYS"."OLS_DP$OLS$COMPARTMENTS" 0 KB 0 rows . . imported "LBACSYS"."OLS_DP$OLS$GROUPS" 0 KB 0 rows . . imported "LBACSYS"."OLS_DP$OLS$LAB" 0 KB 0 rows . . imported "LBACSYS"."OLS_DP$OLS$LEVELS" 0 KB 0 rows . . imported "LBACSYS"."OLS_DP$OLS$POL" 0 KB 0 rows . . imported "LBACSYS"."OLS_DP$OLS$POLS" 0 KB 0 rows . . imported "LBACSYS"."OLS_DP$OLS$POLT" 0 KB 0 rows . . imported "LBACSYS"."OLS_DP$OLS$PROFILE" 0 KB 0 rows . . imported "LBACSYS"."OLS_DP$OLS$PROG" 0 KB 0 rows . . imported "LBACSYS"."OLS_DP$OLS$USER" 0 KB 0 rows . . imported "SYS"."AMGT$DP$AUD$" 28.05 KB 34 rows . . imported "SYS"."AMGT$DP$DAM_CLEANUP_EVENTS$" 0 KB 0 rows . . imported "SYS"."AMGT$DP$DAM_CLEANUP_JOBS$" 0 KB 0 rows . . imported "SYS"."DP$TSDP_ASSOCIATION$" 0 KB 0 rows . . imported "SYS"."DP$TSDP_CONDITION$" 0 KB 0 rows . . imported "SYS"."DP$TSDP_FEATURE_POLICY$" 0 KB 0 rows . . imported "SYS"."DP$TSDP_PROTECTION$" 0 KB 0 rows . . imported "SYS"."DP$TSDP_SENSITIVE_DATA$" 0 KB 0 rows . . imported "SYS"."DP$TSDP_SENSITIVE_TYPE$" 0 KB 0 rows . . imported "SYS"."DP$TSDP_SOURCE$" 0 KB 0 rows . . imported "SYSTEM"."REDO_LOG_TMP" 0 KB 0 rows . . imported "WMSYS"."E$BATCH_COMPRESSIBLE_TABLES$" 0 KB 0 rows . . imported "WMSYS"."E$CONSTRAINTS_TABLE$" 0 KB 0 rows . . imported "WMSYS"."E$CONS_COLUMNS$" 0 KB 0 rows . . imported "WMSYS"."E$LOCKROWS_INFO$" 0 KB 0 rows . . imported "WMSYS"."E$MODIFIED_TABLES$" 0 KB 0 rows . . imported "WMSYS"."E$MP_GRAPH_WORKSPACES_TABLE$" 0 KB 0 rows . . imported "WMSYS"."E$MP_PARENT_WORKSPACES_TABLE$" 0 KB 0 rows . . imported "WMSYS"."E$NESTED_COLUMNS_TABLE$" 0 KB 0 rows . . imported "WMSYS"."E$RESOLVE_WORKSPACES_TABLE$" 0 KB 0 rows . . imported "WMSYS"."E$RIC_LOCKING_TABLE$" 0 KB 0 rows . . imported "WMSYS"."E$RIC_TABLE$" 0 KB 0 rows . . imported "WMSYS"."E$RIC_TRIGGERS_TABLE$" 0 KB 0 rows . . imported "WMSYS"."E$UDTRIG_DISPATCH_PROCS$" 0 KB 0 rows . . imported "WMSYS"."E$UDTRIG_INFO$" 0 KB 0 rows . . imported "WMSYS"."E$VERSION_TABLE$" 0 KB 0 rows . . imported "WMSYS"."E$VT_ERRORS_TABLE$" 0 KB 0 rows . . imported "WMSYS"."E$WORKSPACE_SAVEPOINTS_TABLE$" 0 KB 0 rows Processing object type DATABASE_EXPORT/NORMAL_OPTIONS/VIEWS_AS_TABLES/TABLE Processing object type DATABASE_EXPORT/NORMAL_OPTIONS/VIEWS_AS_TABLES/TABLE_DATA . . imported "MDSYS"."RDF_PARAM$TBL" 6.515 KB 3 rows . . imported "SYS"."AMGT$DP$AUDTAB$TBS$FOR_EXPORT" 5.953 KB 2 rows . . imported "SYS"."DP$DBA_SENSITIVE_DATA" 0 KB 0 rows . . imported "SYS"."DP$DBA_TSDP_POLICY_PROTECTION" 0 KB 0 rows . . imported "SYS"."AMGT$DP$FGA_LOG$FOR_EXPORT" 0 KB 0 rows . . imported "SYS"."NACL$_ACE_IMP" 0 KB 0 rows . . imported "SYS"."NACL$_HOST_IMP" 6.914 KB 1 rows . . imported "SYS"."NACL$_WALLET_IMP" 0 KB 0 rows . . imported "SYS"."DATAPUMP$SQL$TEXT" 0 KB 0 rows . . imported "SYS"."DATAPUMP$SQL$" 0 KB 0 rows . . imported "SYS"."DATAPUMP$SQLOBJ$AUXDATA" 0 KB 0 rows . . imported "SYS"."DATAPUMP$SQLOBJ$DATA" 0 KB 0 rows . . imported "SYS"."DATAPUMP$SQLOBJ$PLAN" 0 KB 0 rows . . imported "SYS"."DATAPUMP$SQLOBJ$" 0 KB 0 rows . . imported "SYSTEM"."SCHEDULER_JOB_ARGS_TMP" 0 KB 0 rows . . imported "SYSTEM"."SCHEDULER_PROGRAM_ARGS_TMP" 0 KB 0 rows . . imported "WMSYS"."E$EXP_MAP" 7.718 KB 3 rows . . imported "WMSYS"."E$METADATA_MAP" 0 KB 0 rows Processing object type DATABASE_EXPORT/NORMAL_POST_INSTANCE_IMPCALLOUT/MARKER Processing object type DATABASE_EXPORT/SCHEMA/TABLE/TABLE Processing object type DATABASE_EXPORT/SCHEMA/TABLE/TABLE_DATA . . imported "HF"."HF" 5.507 KB 2 rows Processing object type DATABASE_EXPORT/SCHEMA/TABLE/STATISTICS/TABLE_STATISTICS Processing object type DATABASE_EXPORT/STATISTICS/MARKER Processing object type DATABASE_EXPORT/FINAL_POST_INSTANCE_IMPCALLOUT/MARKER 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/POST_SYSTEM_IMPCALLOUT/MARKER Job "SYSTEM"."SYS_IMPORT_FULL_01" completed with 10 error(s) at Thu Feb 17 09:04:29 2022 elapsed 0 00:01:28
6.2、 tablespaces模式 匯入
源 SQL> select * from st; ID NAME ---------- ---------- 1 shaoting 2 shaoting SQL> select name from v$datafile; NAME -------------------------------------------------------------------------------- /u01/app/oracle/oradata/PROD/pdb1/system01.dbf /u01/app/oracle/oradata/PROD/pdb1/sysaux01.dbf /u01/app/oracle/oradata/PROD/pdb1/undotbs01.dbf /u01/app/oracle/oradata/PROD/pdb1/hf01.dbf /u01/app/oracle/oradata/PROD/pdb1/st01.dbf 目標 SQL> select name from v$datafile; NAME -------------------------------------------------------------------------------- /u01/app/oracle/oradata/PROD/pdb2/system01.dbf /u01/app/oracle/oradata/PROD/pdb2/sysaux01.dbf /u01/app/oracle/oradata/PROD/pdb2/undotbs01.dbf /u01/app/oracle/oradata/PROD/pdb2/dw01.dbf /u01/app/oracle/oradata/PROD/pdb2/hf01.dbf
匯出
[oracle@dbserver dumppdb1]$ expdp dump_pdb1_user/dump_pdb1_user@pdb1 directory=DUMPPDB1 dumpfile=tablespace_st.dump logfile=tablespace_st_dump.log tablespaces=st Export: Release 19.0.0.0.0 - Production on Thu Feb 17 11:13:09 2022 Version 19.10.0.0.0 Copyright (c) 1982, 2019, Oracle and/or its affiliates. All rights reserved. Connected to: Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production Starting "DUMP_PDB1_USER"."SYS_EXPORT_TABLESPACE_01": dump_pdb1_user/********@pdb1 directory=DUMPPDB1 dumpfile=tablespace_st.dump logfile=tablespace_st_dump.log tablespaces=st Processing object type TABLE_EXPORT/TABLE/TABLE_DATA Processing object type TABLE_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS Processing object type TABLE_EXPORT/TABLE/STATISTICS/MARKER Processing object type TABLE_EXPORT/TABLE/TABLE . . exported "ST"."ST" 5.507 KB 2 rows Master table "DUMP_PDB1_USER"."SYS_EXPORT_TABLESPACE_01" successfully loaded/unloaded ****************************************************************************** Dump file set for DUMP_PDB1_USER.SYS_EXPORT_TABLESPACE_01 is: /home/oracle/dumpdir/dumppdb1/tablespace_st.dump Job "DUMP_PDB1_USER"."SYS_EXPORT_TABLESPACE_01" successfully completed at Thu Feb 17 11:13:36 2022 elapsed 0 00:00:25
匯入,目標端先手動建立相應的tablespace,user
SQL> create tablespace st datafile '/u01/app/oracle/oradata/PROD/pdb2/st01.dbf' size 100m autoextend on next 100m; Tablespace created. SQL> create user st identified by st default tablespace st; User created. SQL> grant dba to st; Grant succeeded. [oracle@dbserver dumppdb2]$ impdp system/oracle@pdb2 directory=DUMPPDB2 dumpfile=tablespace_st.dump Import: Release 19.0.0.0.0 - Production on Thu Feb 17 11:28:01 2022 Version 19.10.0.0.0 Copyright (c) 1982, 2019, Oracle and/or its affiliates. All rights reserved. Connected to: Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production Master table "SYSTEM"."SYS_IMPORT_FULL_01" successfully loaded/unloaded Starting "SYSTEM"."SYS_IMPORT_FULL_01": system/********@pdb2 directory=DUMPPDB2 dumpfile=tablespace_st.dump Processing object type TABLE_EXPORT/TABLE/TABLE Processing object type TABLE_EXPORT/TABLE/TABLE_DATA . . imported "ST"."ST" 5.507 KB 2 rows Processing object type TABLE_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS Processing object type TABLE_EXPORT/TABLE/STATISTICS/MARKER Job "SYSTEM"."SYS_IMPORT_FULL_01" successfully completed at Thu Feb 17 11:28:20 2022 elapsed 0 00:00:18
6.3、 schemas模式 匯入
源端匯出 [oracle@dbserver dumppdb1]$ expdp dump_pdb1_user/dump_pdb1_user@pdb1 directory=DUMPPDB1 dumpfile=schemas_hf.dump logfile=schemas_hf_dump.log schemas=hf Export: Release 19.0.0.0.0 - Production on Thu Feb 17 14:09:19 2022 Version 19.10.0.0.0 Copyright (c) 1982, 2019, Oracle and/or its affiliates. All rights reserved. Connected to: Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production Starting "DUMP_PDB1_USER"."SYS_EXPORT_SCHEMA_01": dump_pdb1_user/********@pdb1 directory=DUMPPDB1 dumpfile=schemas_hf.dump logfile=schemas_hf_dump.log schemas=hf Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA Processing object type SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS Processing object type SCHEMA_EXPORT/STATISTICS/MARKER 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/TABLE/TABLE . . exported "HF"."HF01" 5.976 KB 2 rows . . exported "HF"."HF" 5.507 KB 2 rows Master table "DUMP_PDB1_USER"."SYS_EXPORT_SCHEMA_01" successfully loaded/unloaded ****************************************************************************** Dump file set for DUMP_PDB1_USER.SYS_EXPORT_SCHEMA_01 is: /home/oracle/dumpdir/dumppdb1/schemas_hf.dump Job "DUMP_PDB1_USER"."SYS_EXPORT_SCHEMA_01" successfully completed at Thu Feb 17 14:10:16 2022 elapsed 0 00:00:55
目標端匯入 [oracle@dbserver dumppdb2]$ impdp system/oracle@pdb2 directory=DUMPPDB2 dumpfile=schemas_hf.dump Import: Release 19.0.0.0.0 - Production on Thu Feb 17 14:18:21 2022 Version 19.10.0.0.0 Copyright (c) 1982, 2019, Oracle and/or its affiliates. All rights reserved. Connected to: Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production Master table "SYSTEM"."SYS_IMPORT_FULL_01" successfully loaded/unloaded Starting "SYSTEM"."SYS_IMPORT_FULL_01": system/********@pdb2 directory=DUMPPDB2 dumpfile=schemas_hf.dump Processing object type SCHEMA_EXPORT/USER ORA-31684: Object type USER:"HF" already exists 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/TABLE/TABLE Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA . . imported "HF"."HF01" 5.976 KB 2 rows . . imported "HF"."HF" 5.507 KB 2 rows Processing object type SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS Processing object type SCHEMA_EXPORT/STATISTICS/MARKER Job "SYSTEM"."SYS_IMPORT_FULL_01" completed with 1 error(s) at Thu Feb 17 14:18:29 2022 elapsed 0 00:00:07
6.4、tables 模式 匯入
103匯出 [oracle@dbserver dumppdb1]$ expdp dump_pdb1_user/dump_pdb1_user@pdb1 directory=DUMPPDB1 dumpfile=table_lh.dump logfile=table_lh_dump.log tables=lh.lh Export: Release 19.0.0.0.0 - Production on Thu Feb 17 13:49:37 2022 Version 19.10.0.0.0 Copyright (c) 1982, 2019, Oracle and/or its affiliates. All rights reserved. Connected to: Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production Starting "DUMP_PDB1_USER"."SYS_EXPORT_TABLE_01": dump_pdb1_user/********@pdb1 directory=DUMPPDB1 dumpfile=table_lh.dump logfile=table_lh_dump.log tables=lh.lh Processing object type TABLE_EXPORT/TABLE/TABLE_DATA Processing object type TABLE_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS Processing object type TABLE_EXPORT/TABLE/STATISTICS/MARKER Processing object type TABLE_EXPORT/TABLE/TABLE . . exported "LH"."LH" 5.507 KB 2 rows Master table "DUMP_PDB1_USER"."SYS_EXPORT_TABLE_01" successfully loaded/unloaded ****************************************************************************** Dump file set for DUMP_PDB1_USER.SYS_EXPORT_TABLE_01 is: /home/oracle/dumpdir/dumppdb1/table_lh.dump Job "DUMP_PDB1_USER"."SYS_EXPORT_TABLE_01" successfully completed at Thu Feb 17 13:49:58 2022 elapsed 0 00:00:21
目標端,建立相應使用者,然後匯入 [oracle@dbserver dumppdb2]$ impdp system/oracle@pdb2 directory=DUMPPDB2 dumpfile=table_lh.dump Import: Release 19.0.0.0.0 - Production on Thu Feb 17 13:57:51 2022 Version 19.10.0.0.0 Copyright (c) 1982, 2019, Oracle and/or its affiliates. All rights reserved. Connected to: Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production Master table "SYSTEM"."SYS_IMPORT_FULL_01" successfully loaded/unloaded Starting "SYSTEM"."SYS_IMPORT_FULL_01": system/********@pdb2 directory=DUMPPDB2 dumpfile=table_lh.dump Processing object type TABLE_EXPORT/TABLE/TABLE Processing object type TABLE_EXPORT/TABLE/TABLE_DATA . . imported "LH"."LH" 5.507 KB 2 rows Processing object type TABLE_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS Processing object type TABLE_EXPORT/TABLE/STATISTICS/MARKER Job "SYSTEM"."SYS_IMPORT_FULL_01" successfully completed at Thu Feb 17 13:57:56 2022 elapsed 0 00:00:04
目標端,匯入 [oracle@dbserver dumppdb2]$ impdp system/oracle@pdb2 directory=DUMPPDB2 dumpfile=table_hf01.dump Import: Release 19.0.0.0.0 - Production on Thu Feb 17 14:12:47 2022 Version 19.10.0.0.0 Copyright (c) 1982, 2019, Oracle and/or its affiliates. All rights reserved. Connected to: Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production Master table "SYSTEM"."SYS_IMPORT_FULL_01" successfully loaded/unloaded Starting "SYSTEM"."SYS_IMPORT_FULL_01": system/********@pdb2 directory=DUMPPDB2 dumpfile=table_hf01.dump Processing object type TABLE_EXPORT/TABLE/TABLE Processing object type TABLE_EXPORT/TABLE/TABLE_DATA . . imported "HF"."HF01" 5.976 KB 2 rows Processing object type TABLE_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS Processing object type TABLE_EXPORT/TABLE/STATISTICS/MARKER Job "SYSTEM"."SYS_IMPORT_FULL_01" successfully completed at Thu Feb 17 14:12:53 2022 elapsed 0 00:00:05
這裡我都是測試的,平時注意匯入的時候配合使用。
REMAP_SCHEMA
REMAP_TABLE
REMAP_TABLESPACE
REMAP_SCHEMA Objects from one schema are loaded into another schema. REMAP_TABLE Table names are remapped to another table. For example, REMAP_TABLE=HR.EMPLOYEES:EMPS. REMAP_TABLESPACE Tablespace objects are remapped to another tablespace.
更多的可以impdp -help檢視更多的命令
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/70004783/viewspace-2855789/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Oracle Data Pump 11G 資料泵元件Oracle元件
- Oracle 19c Concepts(05):Data IntegrityOracle
- 【ASK_ORACLE】重灌Oracle資料泵(Datapump)工具的方法Oracle
- Oracle資料庫(資料泵)遷移方案(上)Oracle資料庫
- Oracle資料庫(資料泵)遷移方案(下)Oracle資料庫
- Oracle 19c Concepts(09):Data Concurrency and ConsistencyOracle
- Oracle expdp資料泵遠端匯出Oracle
- oracle邏輯備份之--資料泵Oracle
- G008-ORACLE-DG ORACLE 19C Active Data Guard DML RedirectionOracle
- Oracle資料泵匯出匯入(expdp/impdp)Oracle
- 史上最全Oracle資料泵常用命令Oracle
- Oracle資料泵的匯入和匯出Oracle
- 【Data Pump】Data Pump的並行引數原理並行
- 【BUILD_ORACLE】使用Oracle資料泵線上不停機克隆/遷移PDBUIOracle
- Oracle 19c Concepts(06):Data Dictionary and Dynamic Performance ViewsOracleORMView
- Oracle資料庫的邏輯備份工具-expdp資料泵Oracle資料庫
- 【BUILD_ORACLE】Oracle 19c RAC搭建(六)建立RAC資料庫UIOracle資料庫
- Oracle使用資料泵expdp,impdp進行資料匯出匯入Oracle
- 異構資料庫資料遷移 oracle to mysql之oracle sqlloader和mysql load data資料庫OracleMySql
- Oracle 19c adg全庫遷移資料Oracle
- Oracle 19C Data Guard基礎運維-02 Switchovers(物理)Oracle運維
- Oracle 19C Data Guard基礎運維-03 Failovers(物理)Oracle運維AI
- Oracle 19C Data Guard基礎運維-06 PROTECTION MODEOracle運維
- Oracle 12C新特性-資料泵新引數(LOGTIME)Oracle
- 【DATAPUMP】Oracle資料泵定時備份刪除指令碼Oracle指令碼
- 【Datapump】Oracle資料泵遷移資料命令參考(expdp/impdp說明)Oracle
- 使用Data Guard Broker進行Data Guard物理備用庫配置(Oracle 19c)Oracle
- 將Oracle 12c資料庫註冊到Oracle 19c Grid InfrastructureOracle資料庫ASTStruct
- Oracle 19c Concepts(01):Introduction to Oracle DatabaseOracleDatabase
- Oracle 19c Concepts(13):Oracle Database InstanceOracleDatabase
- Oracle 19C 資料庫引數推薦(一)Oracle資料庫
- Oracle 19C 資料庫引數推薦(二)Oracle資料庫
- Oracle 19C 資料庫引數推薦(三)Oracle資料庫
- Oracle 19C 資料庫引數推薦(四)Oracle資料庫
- Oracle 19C 資料庫引數推薦(五)Oracle資料庫
- 【BEST】Oracle 資料庫19c配置最佳實踐Oracle資料庫
- Oracle 19c資料庫體系結構-2Oracle資料庫
- Oracle 19c資料庫體系結構-1Oracle資料庫