The idea is to use exp and imp utilities to extract only DDL in order to duplicate a schema.
To do this, export first the database using exp :
$> export ORACLE_HOME=/opt/oracle/10.2.0 $> export PATH=$PATH:$ORACLE_HOME/bin $> export ORACLE_SID=MYDB $> export NLS_LANG=AMERICAN_AMERICA.UTF8 $> exp userid=system file=export.dmp log=export.log owner=<schemaname_to_export> consistent=y
Import the database but specify that metadata will be redirected to a file :
$> imp userid=system file=export.dmp indexfile=metadata.txt fomuser=<schemaname_to_import>