Toad World® Forums

Refreshing a Test database from Live data


#1

Hi ,

Just checking if I am doing the correct steps, or if there is a smarter way.

We have UAT databases that we set up from Live ones (suitably anonymised of course)

to refresh a UAT one :

export the data from Live

drop the UAT user

clone my ‘template’ user and call it the UAT name

import the data to UAT

run my anonymise scripts.

Is there a way to just clear all the data from the UAT user ? Then I could skip the drop / clone steps

Thanks


#2

Sure. To get rid of all data in a schema, just go to the schema browser for the UAT user, CTRL+A to select all tables, rt-click, choose “Truncate.”


#3

You also can use the common technique of writing a script that dynamically write a script to truncate all the tables in the schema. I’ve blogged on this technique.

www.toadworld.com/…/oracle-dynamic-scripting-sql-script-to-create-amp-run-a-sql-script.aspx