1.在源端库(orcl)把表空间设置为只读
alter tablespace tsp_sztech read only;
alter tablespace users read only;
alter tablespace baseitem read only;
2. 创建公共db LINK,
一定是公共link,否则,认不到
SQL> create public database link linkorcl
connect to system identified by system
using 'orcl';
3.拷贝对应只读表空间的数据文件到目标库(pdb1)所在位置
scp file hostname:/u02/oradata/CDB1/pdb1/.
4.目标库导入
[oracle@dbserver admin]$
impdp system/oracle_4U@192.168.133.134:1521/pdb1
network_link=linkorcl
transportable=always
full=y
transport_datafiles='/u02/oradata/CDB1/pdb1/baseitem01.dbf',
'/u02/oradata/CDB1/pdb1/tsp_sztech01.dbf',
'/u02/oradata/CDB1/pdb1/users01.dbf'
logfile=imp2.log
Import: Release 19.0.0.0.0 - Production on Fri Mar 26 00:26:20 2021
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 "SYSTEM"."SYS_IMPORT_FULL_04": system/********@192.168.133.134:1521/pdb1 network_link=linkorcl transportable=always full=y transport_datafiles=/u02/oradata/CDB1/pdb1/baseitem01.dbf,/u02/oradata/CDB1/pdb1/tsp_sztech01.dbf,/u02/oradata/CDB1/pdb1/users01.dbf logfile=imp2.log
Estimate in progress using BLOCKS method...
Processing object type DATABASE_EXPORT/PLUGTS_FULL/FULL/PLUGTS_TABLESPACE
Processing object type DATABASE_EXPORT/PLUGTS_FULL/PLUGTS_BLK
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
Total estimation using BLOCKS method: 5.796 MB
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
... 此处略 300字
Processing object type DATABASE_EXPORT/POST_SYSTEM_IMPCALLOUT/MARKER
Job "SYSTEM"."SYS_IMPORT_FULL_04" completed with 8 error(s) at Fri Mar 26 00:32:42 2021 elapsed 0 00:06:22
5.验证
|