Re: Generating PL/SQL Script from table

From: hpuxrac <johnbhurley_at_sbcglobal.net>
Date: Tue, 19 Aug 2008 17:09:21 -0700 (PDT)
Message-ID: <84f55d27-1811-4aa5-bcce-c2a753085fe8@a1g2000hsb.googlegroups.com>


On Aug 19, 2:40 pm, tcole6 <tco..._at_gmail.com> wrote:
> Sorry to keep asking SQL Server to Oracle questions...
>
> Within SQL Server, once I create a database, related tables, triggers,
> etc. I can automatically generate SQL scripts (through the Enterprise
> Manager) to duplicate the database and all related tables, triggers
> etc on another instance of SQL Server.  Then all I have to do is
> execute these scripts in Query Analyzer of another system and viola,
> there is my database, tables, triggers, etc.
>
> Is there such a function within the Oracle Enterprise Manager Console?
> I am running 9i.
>
> Thanks.

Traditionally many people rolled their own using some sql and plsql to generate more sql and plsql. That kind of approach is getting dated now ... dbms_metadata does all this pretty well but maybe not all available in 9i level. But if you dig around a little you can find all sorts of good or at least working examples of that kind of approach.

Many 3rd party software providers ( Quest software with Toad for example ) do a pretty nice job here but of course you pay for it.

Oracle now gives away SQL Developer and I think that it's ability to do that stuff is getting vastly improved with each new release ... but don't know for sure because of well dbms_metadata is the only approach I would advocate or at least use myself.

The export utility that a prior responder noted is "kind of" workable but aged and deprecated I would recommend staying away from that unless you want to play with an approach with a real limited shelf life. Received on Tue Aug 19 2008 - 19:09:21 CDT

Original text of this message