Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 924
Michael Avatar asked Dec 17 '25 15:12

Michael


2 Answers

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.

like image 150
Aaron Avatar answered Dec 19 '25 06:12

Aaron


There will be no exception if you export an empty table. The export utility will just export the metadata for the table (i.e. the DDL).

like image 37
Justin Cave Avatar answered Dec 19 '25 07:12

Justin Cave



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!