Re: Schema DDL

From: Robert Klemme <shortcutter_at_googlemail.com>
Date: Fri, 21 Oct 2011 12:28:27 +0200
Message-ID: <9gcvqbFheuU1_at_mid.individual.net>


On 10/20/2011 11:16 PM, ExecMan wrote:
> 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 Received on Fri Oct 21 2011 - 12:28:27 CEST

Original text of this message