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: dumping a table in sql insert format?

Re: dumping a table in sql insert format?

From: DA Morgan <damorgan_at_psoug.org>
Date: Thu, 17 May 2007 18:24:49 -0700
Message-ID: <1179451485.844183@bubbleator.drizzle.com>


Mark Harrison wrote:
> DA Morgan <damorgan_at_psoug.org> wrote:

>> Mark Harrison wrote:
>>> What's the best way to dump some tables into a file
>>> such that the data is in a series of insert statements?
>>>
>>> I would like to set up some regression tests for my
>>> database, and this is the seed data that is needed
>>> after the schema has been created.
>>>
>>> TIA!
>>> Mark
>>>
>> SELECT 'INSERT INTO t VALUES (' || srvr_id || ')' FROM servers;
>>
>> Wouldn't external tables be easier?

>
> Well, here's my goal, any suggestions appreciated...
>
> I want to be able to easily set up and tear down a development or test
> environment. Ideally such things as sequences will all be initialized
> to known values, so that regression testing is as easy as possible,
> e.g. doing simple string comparisons (dates/times are the main
> trouble here).

My choice would be to set it up once.
Turn on archiving and flashback.
Create a guaranteed restore point.
And at the end of each run just FLASHBACK DATABASE TO <restore_point>;

-- 
Daniel A. Morgan
University of Washington
damorgan_at_x.washington.edu
(replace x with u to respond)
Puget Sound Oracle Users Group
www.psoug.org
Received on Thu May 17 2007 - 20:24:49 CDT

Original text of this message

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