Link to home
Start Free TrialLog in
Avatar of tonydba
tonydba

asked on

exact ddl

Could you please tell me the exact ddl for a particular schema in a database....
ASKER CERTIFIED SOLUTION
Avatar of slightwv (䄆 Netminder)
slightwv (䄆 Netminder)

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hi, this works for me:

set long 90000
set feedback off
set echo off
set heading on
set lines 100
set arraysize 100
UNDEFINE SCHEMA
SPOOL /tmp/delete.me

select
   dbms_metadata.GET_DDL(u.object_type,u.object_name,'&&SCHEMA') ||';'
from
   dba_objects u
where
   owner = '&&SCHEMA'
/  
SPOOL OFF
Won't completely agree with dvz ..
Coz you won't get constraints info this way :)
Avatar of slightwv (䄆 Netminder)
slightwv (䄆 Netminder)

>>Hi, this works for me:

I don't think this will get the grants which is part of the asker's previous question.
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.