Text from a ddl [message #340883] |
Thu, 14 August 2008 15:16 |
thorin666
Messages: 144 Registered: March 2007
|
Senior Member |
|
|
Hi, i want to know if anyone know where i can get the ddl of any object, table, package, index or view.
I know that toad or sqlnavigator can get the sql from a table or object, but i don't know howto search it using sqlplus. Is there any view to get it?
thank you in advance
|
|
|
|
Re: Text from a ddl [message #340885 is a reply to message #340884] |
Thu, 14 August 2008 15:30 |
thorin666
Messages: 144 Registered: March 2007
|
Senior Member |
|
|
anacedent wrote on Thu, 14 August 2008 15:20 | DBMS_METADATA is the current way.
I don't recall if that existed in V8.1 or not.
It can be mined out of the Data Dictionary, but it is messy.
alternatively do
exp full=yes rows=no
imp show=yes
you really, really should be using a supported Oracle DB version at least during the current century!
|
anacedent, thank you for your quick response.
i know that you're right(about the version thing), but you must to know that the version of the dbms is not my last word, is a directive indication.
btw, i must to know a ddl of a package body
SELECT dbms_metadata.get_ddl('PACKAGE BODY','NAMEBODY') FROM DUAL;
*
ERROR at line 1:
ORA-00904: invalid column name
|
|
|
|
|
|