dbTalk Databases Forums  

Schema DDL

comp.databases.oracle.tools comp.databases.oracle.tools


Discuss Schema DDL in the comp.databases.oracle.tools forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
ExecMan
 
Posts: n/a

Default Schema DDL - 10-20-2011 , 04:16 PM






Hi,

I want to have a backup script that exports all the DDL for each user
in the database. All grants, privileges, indexes, tables, types, etc.

I'm having trouble creating one that does all the object types. I'm
trying lots of examples, but none are really working because I want to
do this in a script, spooling each schema to a different file, and
make sure it is all objects, meaning types, synonyms, privileges, etc.

Thanks in advance!

Reply With Quote
  #2  
Old   
Robert Klemme
 
Posts: n/a

Default Re: Schema DDL - 10-21-2011 , 05:28 AM






On 10/20/2011 11:16 PM, ExecMan wrote:
Quote:
I want to have a backup script that exports all the DDL for each user
in the database. All grants, privileges, indexes, tables, types, etc.

I'm having trouble creating one that does all the object types. I'm
trying lots of examples, but none are really working because I want to
do this in a script, spooling each schema to a different file, and
make sure it is all objects, meaning types, synonyms, privileges, etc.
What exactly is your question now? What did you try and which problems
did you encounter?

I'd say as a general hint you need PL/SQL package DBMS_METADATA (notably
GET_DDL) and combine that with a query on ALL_OBJECTS, USER_OBJECTS or
DBA_OBJECTS.

Kind regards

robert

Reply With Quote
  #3  
Old   
Michel Cadot
 
Posts: n/a

Default Re: Schema DDL - 10-22-2011 , 02:52 AM



"ExecMan" <artmerar (AT) yahoo (DOT) com> a écrit dans le message de news: 704a827b-d4e5-493e-91e3-2fcd9e2101d0...oglegroups.com...
Quote:
Hi,

I want to have a backup script that exports all the DDL for each user
in the database. All grants, privileges, indexes, tables, types, etc.

I'm having trouble creating one that does all the object types. I'm
trying lots of examples, but none are really working because I want to
do this in a script, spooling each schema to a different file, and
make sure it is all objects, meaning types, synonyms, privileges, etc.

Thanks in advance!
expdp / full=Y content=METADATA_ONLY

Regards
Michel

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.