Oracle: exporting only schema

本小妞迷上赌 提交于 2019-12-12 12:30:05

问题


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


回答1:


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.




回答2:


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




回答3:


If you are only interested in the table definitions with their constraints and indexes you can also do an export using Oracle's SQL Developer.

In SQL Developer 4.0, this is under Tools | Database Export... On the first page of the wizard, ensure that "Export DDL" is checked and "Export Data" is not. Note that this allows you to export all types of database objects; you can limit it to just tables and indices if you like on the "Object Types" page.



来源:https://stackoverflow.com/questions/4049657/oracle-exporting-only-schema

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!