Unix Technical Forum

Testing schema reset as night service ?

This is a discussion on Testing schema reset as night service ? within the Oracle Database forums, part of the Database Server Software category; --> Hi, Any proposals how to reset schema used for testing purposes every night ? Idea is to clear db ...


Go Back   Unix Technical Forum > Database Server Software > Oracle Database

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 03-20-2008, 01:46 PM
timo
 
Posts: n/a
Default Testing schema reset as night service ?

Hi,
Any proposals how to reset schema used for testing purposes every night ?

Idea is to clear db from test cases made during working day.

Does it go like this - and what are alternative ways (tools ?) to do it:
-exp a dmp when db is clear
-at nighttime run a .sh script to remove that testing schema
-imp that schema from dmp

BR, Timo


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 03-20-2008, 01:46 PM
gazzag
 
Posts: n/a
Default Re: Testing schema reset as night service ?

On 20 Mar, 08:24, "timo" <timo.ta...@luukku.com> wrote:
> Hi,
> Any proposals how to reset schema used for testing purposes every night ?
>
> Idea is to clear db from test cases made during working day.
>
> Does it go like this - and what are alternative ways (tools ?) to do it:
> -exp a dmp when db is clear
> -at nighttime run a .sh script to remove that testing schema
> -imp that schema from dmp
>
> BR, Timo


Oracle version?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 03-20-2008, 01:46 PM
timo
 
Posts: n/a
Default Re: Testing schema reset as night service ?


"gazzag" <gareth@jamms.org> wrote in message
news:d2a497bb-b801-4e8a-afad-a4e9fd653c0c@i12g2000prf.googlegroups.com...
> On 20 Mar, 08:24, "timo" <timo.ta...@luukku.com> wrote:
>> Hi,
>> Any proposals how to reset schema used for testing purposes every night ?
>>
>> Idea is to clear db from test cases made during working day.
>>
>> Does it go like this - and what are alternative ways (tools ?) to do it:
>> -exp a dmp when db is clear
>> -at nighttime run a .sh script to remove that testing schema
>> -imp that schema from dmp
>>
>> BR, Timo

>
> Oracle version?


10.2; linux


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 03-20-2008, 01:46 PM
gazzag
 
Posts: n/a
Default Re: Testing schema reset as night service ?

On 20 Mar, 11:09, "timo" <timo.ta...@luukku.com> wrote:
>
> 10.2; linux


I have certainly done as you have suggested and it works quite well.
Namely:

- drop and recreate the schema
- import into the schema

Another method would be:

- truncate tables in target schema
- repopulate target schema from source schema using either INSERT
over a database link or INSERT from <source_schema>.<table_name>
etc...

HTH

-g
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 03-28-2008, 05:38 AM
joel garry
 
Posts: n/a
Default Re: Testing schema reset as night service ?

On Mar 20, 1:24*am, "timo" <timo.ta...@luukku.com> wrote:
> Hi,
> Any proposals how to reset schema used for testing purposes every night ?
>
> Idea is to clear db from test cases made during working day.
>
> Does it go like this - and what are alternative ways (tools ?) to do it:
> -exp a dmp when db is clear
> -at nighttime run a .sh script to remove that testing schema
> -imp that schema from dmp
>
> BR, Timo


You might look into transportable tablespaces and rman options,
depending on whether you are wanting to refresh from live data or some
stable data set. Remember rman can restore tablespaces to a point in
time. I've heard some people are using flashback.

It all really depends what you are doing. You should have some test
data that includes bad data and data that comes near and goes over
functional design limits, and some that reflects actual data
distributions and values.

I'm always wishing I had time to do it right...

jg
--
@home.com is bogus.
awk 'BEGIN { q="'"'"'";print "Never say can"q"t."; exit }'
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 03-28-2008, 05:38 AM
Frank van Bortel
 
Posts: n/a
Default Re: Testing schema reset as night service ?

gazzag wrote:
> On 20 Mar, 11:09, "timo" <timo.ta...@luukku.com> wrote:
>> 10.2; linux

>
> I have certainly done as you have suggested and it works quite well.
> Namely:
>
> - drop and recreate the schema
> - import into the schema
>
> Another method would be:
>
> - truncate tables in target schema
> - repopulate target schema from source schema using either INSERT
> over a database link or INSERT from <source_schema>.<table_name>
> etc...
>
> HTH
>
> -g

Yet another idea, suited for large amounts of data (import would
take too long):
Use transportable tablespaces - all you import then, is the
metadata - you just copy the datafile(s) with all data from
another location.

Works for data only; if you have any source code that should
be reset, this does not work

--

Regards,
Frank van Bortel

Top-posting in UseNet newsgroups is one way to shut me up
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 03-28-2008, 05:38 AM
Frank van Bortel
 
Posts: n/a
Default Re: Testing schema reset as night service ?

joel garry wrote:

>
> You might look into transportable tablespaces and rman options,

You beat me to it
--

Regards,
Frank van Bortel

Top-posting in UseNet newsgroups is one way to shut me up
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 03-28-2008, 05:38 AM
Shakespeare
 
Posts: n/a
Default Re: Testing schema reset as night service ?


"timo" <timo.talja@luukku.com> schreef in bericht
news:gbpEj.36$2f2.28@read4.inet.fi...
> Hi,
> Any proposals how to reset schema used for testing purposes every night ?
>
> Idea is to clear db from test cases made during working day.
>
> Does it go like this - and what are alternative ways (tools ?) to do it:
> -exp a dmp when db is clear
> -at nighttime run a .sh script to remove that testing schema
> -imp that schema from dmp
>
> BR, Timo
>
>


Here's another option: use vmware, take a snapshot; do what ever you like
and return to your snapshot!

Shakespeare


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 03-28-2008, 05:38 AM
Steve Howard
 
Posts: n/a
Default Re: Testing schema reset as night service ?

On Mar 20, 4:24 am, "timo" <timo.ta...@luukku.com> wrote:
> Hi,
> Any proposals how to reset schema used for testing purposes every night ?
>
> Idea is to clear db from test cases made during working day.
>
> Does it go like this - and what are alternative ways (tools ?) to do it:
> -exp a dmp when db is clear
> -at nighttime run a .sh script to remove that testing schema
> -imp that schema from dmp
>
> BR, Timo


Hi Timo,

In addition to what others have posted, lookup flashback database.

HTH,

Steve
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 02:01 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com