+ Reply to Thread
Results 1 to 5 of 5

Generating PL/SQL Script from table

  1. Generating PL/SQL Script from table

    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.

  2. Re: Generating PL/SQL Script from table

    On Aug 19, 1:40*pm, tcole6 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.


    With Oracle that's known as the exp utility, and a full export will,
    with some reservations, create a file which will, when imported into a
    newly created database, duplicate a database at the schema level;
    tables, indexes, views, packages, procedures, functions, triggers,
    types, etc. are all duplicated into the destination database.


    David Fitzjarrell

  3. Re: Generating PL/SQL Script from table

    On Tue, 19 Aug 2008 11:40:18 -0700 (PDT), tcole6
    wrote:

    >Sorry to keep asking SQL Server to Oracle questions...


    Really sorry indeed, as apparently you refuse to read documentation.
    Please stop turning this forum into a free doc abstraction service.

    docs are at http://tahiti.oracle.com

    --
    Sybrand Bakker
    Senior Oracle DBA

  4. Re: Generating PL/SQL Script from table

    On Aug 19, 2:40*pm, tcole6 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.

  5. Re: Generating PL/SQL Script from table

    On Aug 19, 11:40*pm, tcole6 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.


    U can create SQL scripts after creating a new Database by running the
    default script in cmd promt

+ Reply to Thread