Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: DDL in a PL/SQL block?
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
--
We are born naked, wet and hungry...then things get worse Received on Mon Mar 06 2000 - 03:57:17 CST