Unloading a database without the data

rlively@cruces.aoc (Richard Lively) wrote:

>I want to create a testing version of a production database. I would
>like the quickest method possible to unload and rebuild everything
>from the production database EXCEPT the data itself. I can write a
>routine to query and load appropriate test data. Does anyone know of
>an easier way of doing this other than:

>	1. Using copydb to get all table, permission, view information
>	2. use ingmenu to find all applications, forms, reports and
>	   then use copyapp, copyform, and copyrep

>Of course, '2.' is the one I want to avoid if possible. And will '1.'
>and '2.' get me everything (at least everything that is catalogued in
>the DB)?

>Any help would be greatly appreciated (it's a big application!).

You could try running an unloaddb - and then with the unload.ing
script only run the sql that unloads the Ingres tables - the line with
the -u'$ingres'

You can then run the full reload.ing script following your createdb
command. You will get a number of errors from the "copy from"
commands, but it will reload the ingres catalogs with all the forms,
reports, applications etc, and build all of your database tables.

You can ignore the copy errors. 

Should be quicker than a lot of manual effort.

Graham
+------------------------+--------------------------+
|     Graham Jakins      |  Ganda Systems           |
|                        |  11 Delwood Place        |
|   Systems Consultant   |  Willetton  6155         |
|                        |  Western Australia       |
| jakinsg@acslink.net.au |  Voice +61 9 310 9994    |
|                        |  Fax   +61 9 313 5808    |
+------------------------+--------------------------+  
Ingres Q & A
To William's Home Page

© William Yuan 2000

Email William