How do I Move a Federation?

A federated database consists of a catalog that knows the location and name
of the catalog and all the database files that belong to that federation.
The catalog also knows the host name of the lockserver, journal server name
and filepath and the bootfile server name and filepath.

We consider two cases where one may wish to move a federation from one server
to another. In both cases the federation is assumed to reside on one server.
It is also assumed that the user has run srtpath and set the OO_FD_BOOT env
variable to the appropriate bootfile.

Case 1: The original host has been renamed

In this case the original machine no longer exists and the federation exists
on a server with a different name from that in the catalog. These are the
steps that are needed in order to make the federation recognise the new server:

Make sure that there are no outstanding transactions on the federation.
You may need to restart the lockserver (to remove the locks from the lock
table) and move the journal files aside (don't delete the journal files,
just rename them).

Make sure that the lockserver process is running on the lock server host.
Then run the objectivity command:

The serverfilepath option requires the new file path under which the federation
will be placed, the jnlfilepath option requires the new file path for the
journal files on the journal server and the bootfilepath option requires
the new bootfile path.

For example, suppose we wish to move a federation from objyserv07 to objyserv01
and the filepath under which we wish the federation to reside is /nfs/objyserv01/objy/databases/user1/hasan/18754.
We also intend to use objyserv01 as the lock and journal server and we wish
the journal files to appear under /nfs/objyserv01/objy/databases/user1/hasan/18754/journals
and the bootfile to appear under /nfs/objyserv01/objy/databases/user1/hasan/18754/bootfile.
The arguments to supply to the script would be:

This script will produce a tcshell script (changefederation.tcsh) that contains
all the commands necessary to register in the catalog the location of the
moved federation.

Edit the changefederation.tcsh script and remove the commands after the
"end of the oochangedb commands" (you only need to change the host name
for the database files, the other commands would change attributes that
were already changed with the ooinstallfd command)

Make sure that your OO_FD_BOOT is pointing to the bootfile and make the
changefederation.tcsh script exectuable, then run:

changefederation.tcsh >& <somefile>

Check the output file <somefile> for errors. The most likely cause of
errors could be:

Not having objy applications in the path (srtpath should fix this).

The lockserver application not running.

Incorrect database file permissions. Check that the ams server (if one
is used), or the user belongs to the group that can read and update the
database files.

Case 2: Moving a federation from host A to host B

Here, both the original host and the target host exist. These steps describe
how to move the federation from one server to another. It is assumed that both
the source and target federations exist on one server.

Make sure that there are no outstanding locks on the federation and that
there are no clients accessing the federation.

Run the script (existing in the BdbOpsUtils package, version V00-03-00
and above):

The serverfilepath option requires the new file path under which the federation
will be placed, the jnlfilepath option requires the new file path for the
journal files on the journal server and the bootfilepath option requires
the new bootfile path.

For example, suppose we wish to move a federation from objyserv07 to objyserv01
and the filepath under which we wish the federation to reside is /nfs/objyserv01/objy/databases/user1/hasan/18754.
We also intend to use objyserv01 as the lock and journal server and we wish
the journal files to appear under /nfs/objyserv01/objy/databases/user1/hasan/18754/journals
and the bootfile to appear under /nfs/objyserv01/objy/databases/user1/hasan/18754/bootfile.
The arguments to supply to the script would be: