Pergunta

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?

Foi útil?

Solução

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.

Outras dicas

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

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/

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

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top