Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: DDL in a PL/SQL block?

Re: DDL in a PL/SQL block?

From: Connor McDonald <connor_mcdonald_at_yahoo.com>
Date: Mon, 06 Mar 2000 17:57:17 +0800
Message-ID: <38C380FD.73EE@yahoo.com>


RoadRaat wrote:
>
> Thank you for your reply.
>
> Clearly the solution to this problem is presently beyond my scope. I haven't
> yet studied packages. I went to your website, though, and now have the scripts
> you suggested so I can examine them thoroughly and learn from them. I
> particularly like your coding style. That is a nice model for me to emulate.
>
> My idea for a back up script was admittedly not a production level program.
> Working with Oracle 8 on student machines, I just wanted to be able copy all
> tables into backup tables so that no matter how I screw up the tables, I could
> restore from the backups and leave the machine the way I left it. A CREATE
> statement works in any SQL*Plus script I write, but doesn't work in a PL/SQL
> block.
>
> Onward and upward.
>
> RoadRaat

For that I would be tempted just to use export and import.

'exp' to unload the tables to flat files, and 'imp' into a different schema (which will contain your backup). This will also copy all the appropriate indexes, definitions, foreign keys, triggers etc etc...

HTH
--



Connor McDonald
http://www.oracledba.co.uk

We are born naked, wet and hungry...then things get worse Received on Mon Mar 06 2000 - 03:57:17 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US