need to extract DDL script [message #72799] |
Wed, 22 October 2003 09:15 |
Rudolf
Messages: 1 Registered: October 2003
|
Junior Member |
|
|
i need extract some DDL scripts of tables, views, procedures and so on. Are there any Oracle tools for it?
thanks!
|
|
|
|
|
Re: need to extract DDL script [message #74185 is a reply to message #72799] |
Fri, 01 October 2004 04:49 |
Dale
Messages: 2 Registered: October 2004
|
Junior Member |
|
|
>i need extract some DDL scripts of tables, views, procedures and so on. Are there any Oracle tools for it?
Try the freeware Oracle Export File DDL Extract Wizard Software. The DDL Wizard reads export files (no database access required) and extracts the DDL code. The extracted DDL Code is displayed in an intuitive GUI and can be written to disk as runnable SQL Scripts.
Also writes the DDL out as interlinked HTML documentation - a kind of DDL2HTML facilty.
http://www.DDLWizard.com
|
|
|
Re: need to extract DDL script [message #215351 is a reply to message #72799] |
Sun, 21 January 2007 16:00 |
SerhiySubota
Messages: 2 Registered: January 2007
|
Junior Member |
|
|
You may try this to export most important schema objects.
Please, pay attention to schema name filter on the last line:
select
dbms_metadata.get_DDL(
replace( object_type, ' ', '_'),
object_name,
owner
)
from (
select object_name, object_type, owner,
(CASE object_type
when 'TYPE' then 1
when 'SEQUENCE' then 2
when 'TABLE' then 3
when 'VIEW' then 4
when 'PACKAGE' then 5
when 'PROCEDURE' then 6
else 7
end
) orderBy
from
(
SELECT object_name, object_type, owner
FROM dba_objects
WHERE (
object_type not like '%JAVA%'
AND object_type not in('DATABASE LINK', 'SYNONYM')
)
UNION
SELECT NVL(l.longname, s.object_name), s.object_type, owner
FROM sys.dba_objects s, javasnm l
WHERE s.object_name = l.short(+) and
(s.object_type like '%JAVA SOURCE%' OR s.object_type = 'SYNONYM')
)
ORDER BY orderBy, object_type, object_name
)
where
owner = 'YOUR_SCHEMA_NAME'
|
|
|
|
Re: need to extract DDL script [message #215535 is a reply to message #215519] |
Mon, 22 January 2007 14:33 |
SerhiySubota
Messages: 2 Registered: January 2007
|
Junior Member |
|
|
I've found the topic trying to solve the same problem.
Google emphatically displayed on the first page in the majority of my searches.
Despite these advices didn't help me, isn't it a good idea to post another decision in such a popular place?
Not for Rudolf, but for other google-armed web-serfers.
Sorry for any inconvenience.
Serhiy Subota.
|
|
|
|