演習: TTSメタデータ操作のパラレル化

この演習では、トランスポータブル表領域(TTS)メタデータに対するエクスポートおよびインポート操作をパラレル化する方法を示します。

  1. 新しい演習を開始する前に、演習の環境の推奨事項を参照してください。
  2. Oracle 20cのPDB20で、トランスポートする表領域USERSを読取り専用に設定します。
    $ sqlplus sys@PDB20 AS SYSDBA                   
    SQL*Plus: Release 20.0.0.0.0 - Production on Wed Nov 20 07:29:31 2019
    Version 20.2.0.0.0
    
    Copyright (c) 1982, 2019, Oracle.  All rights reserved.
    
    Enter password: password
    
    Connected to:
    Oracle Database 20c Enterprise Edition Release 20.0.0.0.0 - Production
    Version 20.2.0.0.0
    
    SQL> ALTER TABLESPACE users READ ONLY;
    
    Tablespace altered.
    
    SQL> EXIT
    Disconnected from Oracle Database 20c Enterprise Edition Release 20.0.0.0.0 - Production
    Version 20.2.0.0.0
    $
  3. TTSをPDB20に対してパラレルに実行します。
    $ expdp \"sys@PDB20 AS SYSDBA\" dumpfile=PDB20.dmp TRANSPORT_TABLESPACES=users TRANSPORT_FULL_CHECK=YES LOGFILE=tts.log REUSE_DUMPFILES=YES PARALLEL=2
    
    Export: Release 20.0.0.0.0 - Production on Wed Nov 20 07:40:41 2019
    Version 20.2.0.0.0
    
    Copyright (c) 1982, 2019, Oracle and/or its affiliates.  All rights reserved.
    Password: password
    Connected to: Oracle Database 20c Enterprise Edition Release 20.0.0.0.0 - Production
    Starting "SYS"."SYS_EXPORT_TRANSPORTABLE_02":  "sys/********@PDB20 AS SYSDBA" dumpfile=PDB20.dmp TRANSPORT_TABLESPACES=users TRANSPORT_FULL_CHECK=YES LOGFILE=tts.log REUSE_DUMPFILES=YES PARALLEL=2
    ORA-39396: Warning: exporting encrypted data using transportable option without password
    
    ORA-39396: Warning: exporting encrypted data using transportable option without password
    
    Processing object type TRANSPORTABLE_EXPORT/INDEX/STATISTICS/INDEX_STATISTICS
    Processing object type TRANSPORTABLE_EXPORT/STATISTICS/TABLE_STATISTICS
    Processing object type TRANSPORTABLE_EXPORT/INDEX/STATISTICS/BITMAP_INDEX/INDEX_STATISTICS
    Processing object type TRANSPORTABLE_EXPORT/PLUGTS_BLK
    Processing object type TRANSPORTABLE_EXPORT/STATISTICS/MARKER
    Processing object type TRANSPORTABLE_EXPORT/POST_INSTANCE/PLUGTS_BLK
    Processing object type TRANSPORTABLE_EXPORT/INDEX/INDEX
    Processing object type TRANSPORTABLE_EXPORT/TABLE
    Processing object type TRANSPORTABLE_EXPORT/COMMENT
    Processing object type TRANSPORTABLE_EXPORT/CONSTRAINT/CONSTRAINT
    Processing object type TRANSPORTABLE_EXPORT/CONSTRAINT/REF_CONSTRAINT
    Processing object type TRANSPORTABLE_EXPORT/TRIGGER
    Processing object type TRANSPORTABLE_EXPORT/INDEX/BITMAP_INDEX/INDEX
    Processing object type TRANSPORTABLE_EXPORT/INDEX/DOMAIN_INDEX/SECONDARY_TABLE/INDEX/INDEX
    Processing object type TRANSPORTABLE_EXPORT/INDEX/DOMAIN_INDEX/SECONDARY_TABLE/TABLE
    Processing object type TRANSPORTABLE_EXPORT/INDEX/DOMAIN_INDEX/SECONDARY_TABLE/CONSTRAINT
    Processing object type TRANSPORTABLE_EXPORT/INDEX/DOMAIN_INDEX/INDEX
    Processing object type TRANSPORTABLE_EXPORT/MATERIALIZED_VIEW
    Master table "SYS"."SYS_EXPORT_TRANSPORTABLE_02" successfully loaded/unloaded
    ******************************************************************************
    Dump file set for SYS.SYS_EXPORT_TRANSPORTABLE_02 is:
      /u01/app/oracle/admin/ORCL/dpdump/A2B63C30139C0D6BE0530600000A01C5/PDB20.dmp
    ******************************************************************************
    Datafiles required for transportable tablespace USERS:
      /u02/app/oracle/oradata/users01.dbf
    Job "SYS"."SYS_EXPORT_TRANSPORTABLE_02" completed with 2 error(s) at Wed Apr 8 13:59:55 2020 elapsed 0 00:03:36
    $ 
  4. 表領域を読取り/書込みに戻します。
    $ sqlplus sys@PDB20 AS SYSDBA                 
    
    SQL*Plus: Release 20.0.0.0.0 - Production on Wed Nov 20 07:29:31 2019
    Version 20.2.0.0.0
    
    Copyright (c) 1982, 2019, Oracle.  All rights reserved.
    
    Enter password: password
    
    Connected to:
    Oracle Database 20c Enterprise Edition Release 20.0.0.0.0 - Production
    Version 20.2.0.0.0
    
    SQL> ALTER TABLESPACE users READ WRITE;
    
    Tablespace altered.
    
    SQL> EXIT
    Disconnected from Oracle Database 20c Enterprise Edition Release 20.0.0.0.0 - Production
    Version 20.2.0.0.0
    $