生成数据库Oracle pl-sql上的表模式(ddl) [英] generate database & tables schema (ddl) on Oracle pl-sql
问题描述
任何人都有一个PL-SQL语句,我可以使用该语句来生成数据库& Oracle 10g上特定数据库的数据表架构?我需要.sql文件中的架构,并且如果可能与ANSI-92/99 sql实现兼容,那么我可以在sql server 2005上直接使用生成的.sql.
Anyone have a PL-SQL statement that i can use to generate database & tables schema for specific database on Oracle 10g? I need the schema in .sql file and if possible compatible with ANSI-92/99 sql implementation, so i can use the generated .sql directly on sql server 2005.
已经听说过exp/imp,但似乎生成了转储文件,我只需要在.sql文件上添加一个简单的ddl.
Already heard about exp/imp, but it seems generated dump file, what i need just a simple ddl on .sql file.
谢谢
推荐答案
I wrote oraddlscript which calls dbms_metadata.get_ddl (Pop's answer) for each database object owned by a user and writes the DDL to a file.
更新:已回答的评论
这篇关于生成数据库Oracle pl-sql上的表模式(ddl)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!