Michael
Michael

Reputation: 33

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?

Upvotes: 3

Views: 4985

Answers (4)

DBA
DBA

Reputation: 51

There is no question of exception in data pump unless until you mention a wrong table name. It should work properly. I found many datapump options reference here http://www.acehints.com/p/site-map.html

Upvotes: 0

tsells
tsells

Reputation: 2771

expdp will export empty tables. Trying to export tables using the legacy export functions will not export empty tables.

Please see my blog post here on the subject.

http://tsells.wordpress.com/2011/02/10/oracle-11g2-does-not-export-empty-tables-when-using-exp-exe/

Upvotes: 0

Aaron
Aaron

Reputation: 57748

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.

Upvotes: 4

Justin Cave
Justin Cave

Reputation: 231661

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).

Upvotes: 1

Related Questions