How to get the table creation script (DDL ) in enterprise manager? [message #67753] |
Thu, 31 January 2002 19:55 |
Siddh
Messages: 2 Registered: January 2002
|
Junior Member |
|
|
Hi,
I have to study a huge set of database tables (more than say 500). I have installed Oracle Enterprise Manager on my machine and able to see the schema of the tables.
Can anybody tell me how to get the table creation (DDL)scripts, from the schema - in PLAIN TEXT FORMAT.
So that I will use those scripts with some tool like ERWIN and study the entity relationships.
|
|
|
Re: How to get the table creation script (DDL ) in enterprise manager? [message #67754 is a reply to message #67753] |
Fri, 01 February 2002 02:58 |
Frank Naude
Messages: 4587 Registered: April 1998
|
Senior Member |
|
|
Hi,
As far as I understand one cannot use OEM to extract table creation DDL from the database. However, whenever making changes via OEM the "Show SQL" button can be used to see the SQL that will be applied to the database.
If you are running Oracle 9i you can use the DBMS_METADATA package to extract DDL definitions using SQL*Plus. Look at this example:
SQL> set pagesize 0
SQL> set long 90000
SQL> SELECT DBMS_METADATA.GET_DLL('TABLE','EMP','SCOTT') FROM DUAL;
Best regards
Frank
|
|
|
|