lunes, 2 de mayo de 2022

Oracle 21c New Feature: INCLUDE and EXCLUDE parameters in expdp for the same job

 Starting in Oracle 21c, we can use the parameters INCLUDE and EXCLUDE in the same job for expdp. Before this you were able to use only one of these parameters for the same job.

 In the following example, I will export the table DGOMEZ.TABLE2 and excluding the table  DGOMEZ.TABLE1:


[oracle@localhost ~]$ expdp system/system@localhost:1521/pdb11 exclude=table:"IN('TABLE1')" include=table:"IN('TABLE2')" schemas='DGOMEZ'

Export: Release 21.0.0.0.0 - Production on
Mon May 02 03:39:07 2022
Version 21.3.0.0.0

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

Connected to: Oracle Database 21c Enterprise Edition Release 21.0.0.0.0 - Production
Starting "SYSTEM"."SYS_EXPORT_SCHEMA_01":  system/********@localhost:1521/pdb11 exclude=table:IN('TABLE1') include=table:IN('TABLE2') schemas=DGOMEZ
Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
Processing object type SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
Processing object type SCHEMA_EXPORT/TABLE/TABLE
. . exported "DGOMEZ"."TABLE2"                           5.054 KB       1 rows
Master table "SYSTEM"."SYS_EXPORT_SCHEMA_01" successfully loaded/unloaded
******************************************************************************
Dump file set for SYSTEM.SYS_EXPORT_SCHEMA_01 is:
  /u01/app/oracle/product/19.0.0/db_base/admin/orcl/dpdump/E8D8634299033724E055000000000001/expdat.dmp
Job "SYSTEM"."SYS_EXPORT_SCHEMA_01" successfully completed at
Mon May 02 03:39:29 2022 elapsed 0 00:00:19

[oracle@localhost ~]$

 

  In the following example, I will export the table DGOMEZ.TABLE1 and excluding the table  DGOMEZ.TABLE2:

 [oracle@localhost ~]$ expdp system/****@localhost:1521/pdb11 exclude=table:"IN('TABLE2')" include=table:"IN('TABLE1')" schemas='DGOMEZ'

Export: Release 21.0.0.0.0 - Production on
Mon May 02 03:40:00 2022
Version 21.3.0.0.0

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

Connected to: Oracle Database 21c Enterprise Edition Release 21.0.0.0.0 - Production
Starting "SYSTEM"."SYS_EXPORT_SCHEMA_01":  system/********@localhost:1521/pdb11 exclude=table:IN('TABLE2') include=table:IN('TABLE1') schemas=DGOMEZ
Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
Processing object type SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
Processing object type SCHEMA_EXPORT/TABLE/TABLE
. . exported "DGOMEZ"."TABLE1"                           5.054 KB       1 rows
Master table "SYSTEM"."SYS_EXPORT_SCHEMA_01" successfully loaded/unloaded
******************************************************************************
Dump file set for SYSTEM.SYS_EXPORT_SCHEMA_01 is:
  /u01/app/oracle/product/19.0.0/db_base/admin/orcl/dpdump/E8D8634299033724E055000000000001/expdat.dmp
Job "SYSTEM"."SYS_EXPORT_SCHEMA_01" successfully completed at
Mon May 02 03:40:27 2022 elapsed 0 00:00:25

[oracle@localhost ~]$


No hay comentarios:

Publicar un comentario

Oracle ACE Director Award - Deiby Gómez

Thanks #OracleACE Program for this awesome certificate recognizing the work I have done in the community for the last year. Looking forwa...