Re: Saving/restoring test data

From: Bola Ogunlana (DBA) <"Bola>
Date: 1996/10/28
Message-ID: <327562C9.511A_at_lbhnet.hackney.gov.uk>#1/1


Bart Zwaferink wrote:
>
> Hello,
>
> I am looking for a method or a tool that makes it easy to copy out
> test data of a user schema. Later on it must be possible to copy the
> data of the file back again in the schema of the user. The reason for
> this is that it must be possible to save and restore different versions
> of test data. The problem of the Oracle export/import mechanism is that
> besides the data also the software (packages/triggers) is restored. I
> just want to restore the data of the tables because in the mean time new
> versions of the software might have been installed.
> Another problem that we face is the changing of the table definitions
> but that is not our most important concern at this time. But solving
> that problem as well would be very much appreciated.
>
> Thanks in advance,
>
> Bart Zwaferink
>
> E-mail: bzwaferi_at_pvf.nl
The user level export should be okay for you to capture all the information you need.
When you want to read the data back into the database, don't do a complete user import, just select the table data. If I remeber rightly its the TABLES=... option of the import utility. The table list name shouldn't be a problem you can easily get this from the Data dictionary.
Note however that when you use the TABLE=... option you dont need the ( ) as can be easily assumed from the documentation, you separate the tablenames with commas & if the tables already exist on the database (within the schema you're importing into of course) you will need the IGNORE=Y option.

As per the changing table definitions issue, you may need to explore the "CREATE TABLE new_table as SELECT....from old_table" or the sqlpus "COPY" command. They are well documented in one of those Oracle Documentation thingies.   

Hope the above hint helps. Received on Mon Oct 28 1996 - 00:00:00 CET

Original text of this message