[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

copying Objy schema & db's



FYI:
I was experimenting with Objy V5 and there seems to
be a straighforward way to copy parts of an existing
federation to a new federation, that avoids the need
for an empty reference fdederation (schema only).
I have tried this on a small federation and it worked.

let OLD = boot file of existing federation
let NEW = boot file of the new federation
let dbN = denote database file N

To create a new federation with the same schema as
the old federation, but no data do:

ooschemadump -outfile schema.dmp OLD
oonewfd [...] NEW
ooschemaupgrade -infile schema.dmp NEW

Also, with some minor editing you can change schema.dmp
into a valid ddl file for OLD & NEW.

To copy over individual database files do:

oocopydb -db db1 [...] OLD
ooattachdb -db db1 [...] NEW

Also, note that it appears to work to let NEW reference
the exact same db file as OLD.  I think you must do ooattachdb
to get the entry in the catalog but then you can rm the db file
and set oochangedb -catalogonly to reference the file in OLD,
if they have the same db number and dbname.
In the case of having many read-only db files in hpss and only some
on disk, even though the Objy catalog has disk references for all
of them, you can have seperate federations using the same db files.

In other words, it may work very well to let individuals be using
their own federations but actually sharing most of the data files
& space, without corrupting or needing write access
to a "master" federation.

This mode of operation may not be supported or encouraged by
Objectivity, Inc. but I think it will make Objy data more robust
and performant in our environment.

Doug

 

Douglas