Home » RDBMS Server » Server Utilities » need to extract DDL script
need to extract DDL script [message #72799] Wed, 22 October 2003 09:15 Go to next message
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 #72800 is a reply to message #72799] Wed, 22 October 2003 10:28 Go to previous messageGo to next message
Thiru
Messages: 1089
Registered: May 2002
Senior Member
Yes..

Re: need to extract DDL script [message #74119 is a reply to message #72799] Wed, 15 September 2004 07:46 Go to previous messageGo to next message
ded_mzoaj
Messages: 1
Registered: September 2004
Junior Member
select *
from user_source
Re: need to extract DDL script [message #74185 is a reply to message #72799] Fri, 01 October 2004 04:49 Go to previous messageGo to next message
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 Go to previous messageGo to next message
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 #215519 is a reply to message #215351] Mon, 22 January 2007 12:02 Go to previous messageGo to next message
joy_division
Messages: 4642
Registered: February 2005
Location: East Coast USA
Senior Member
SerhiySubota, Rudolf has passed away due to old age waiting 3.25 years for the answer.
Re: need to extract DDL script [message #215535 is a reply to message #215519] Mon, 22 January 2007 14:33 Go to previous messageGo to next message
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.
Re: need to extract DDL script [message #215537 is a reply to message #215535] Mon, 22 January 2007 14:58 Go to previous message
joy_division
Messages: 4642
Registered: February 2005
Location: East Coast USA
Senior Member
No, keep doing it. My tongue-in-cheek response was meant to bring a chuckle.
Previous Topic: commit in sql loader
Next Topic: Query regarding importing DUMP file
Goto Forum:
  


Current Time: Thu Dec 08 02:05:58 CST 2016

Total time taken to generate the page: 0.10778 seconds