Thursday, February 5, 2015

Creating an (import-) SQL file with DBMS_DATAPUMP

DBMS_DATAPUMP can create SQL files from a schema so that these files can later be run to re-create the schema.

This is described in Oracle Note 1519981.1: How to Generate A SQL File Using The DBMS_DATAPUMP_API?. Unfortunately,
the note does not explicitely state that the creation of such an sql file consists of two steps, first the schema has to be dumped
ordinarly, then, the dumped file has to be turned into the desired SQL file.