Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Oracle: exporting only schema

I have an Oracle 10g database, and now I need to export, if possible, only the schema.
(Only table structures with index etc... without data!)

Is this possible with exp/imp or do I need expdp/impdp?

Greets

like image 424
domiSchenk Avatar asked Jan 30 '26 05:01

domiSchenk


2 Answers

It is possible with exp, using parameter ROWS=N.

10g documentation is here.

Data pump is preferred these days though; the equivalent parameter is CONTENT=METADATA_ONLY.

like image 119
Alex Poole Avatar answered Feb 01 '26 00:02

Alex Poole


Check scheme2ddl tool from oracle-ddl2svn bundle.

scheme2ddl is command line utility for export oracle schema in set of ddl scripts. provide lot of configurations via basic command line options or advanced XML configuration

like image 40
qwazer Avatar answered Feb 01 '26 00:02

qwazer