Search code examples
oracle-databaseexportdatapump

Oracle expdp without data


Will there be any impact if expdp is used and the table has no data to be exported? For example, we run a job to perform expdp and the table to be dumped has no records at the instance the job was run, will there be exceptions for this? Should this be handled by another checking?


Solution

  • I just tried it, and it looks like it works just fine.

    Estimate in progress using BLOCKS method...
    Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
    Total estimation using BLOCKS method: 0 KB
    Processing object type TABLE_EXPORT/TABLE/TABLE
    Processing object type TABLE_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
    . . exported "SYSTEM"."BONUS"                                0 KB       0 rows
    Master table "SYSTEM"."SYS_EXPORT_TABLE_01" successfully loaded/unloaded
    ******************************************************************************
    Dump file set for SYSTEM.SYS_EXPORT_TABLE_01 is:
      /usr/lib/oracle/xe/app/oracle/admin/XE/dpdump/exp.dmp
    Job "SYSTEM"."SYS_EXPORT_TABLE_01" successfully completed at 22:10:10
    

    If you were to import the dump file, it should recreate the table but (obviously) without any rows.