Note: I had a previous version of this tutorial which used a home-grown utility to create the database files in the federation. This one used to work fine with version 3.x of Objectivity, but with 4.x it changed its behavior. Specifically, it does not put a new database into the same directory where the federation boot file is, but that's where we want all the databases to go. So we use the standard oonewdb tool to create the new databases in the Makefiles instead. However, you can still look at the create.c utility, even if we don't use it anymore (and it's no longer part of the distribution). The tar files with all the examples is now called tutorial_0_1.tar. If you already used the old version, please get this new one, or change the Makefiles accordingly.
The idea is that this federated database created here and now will accomodate the little exercise projects which will come as this course evolves.
In order to create a federated database for your own use and pleasure, you will select a top directory where all this stuff will be located (I picked /phenix/u/purschke/Objectivity). Also, you will need to give your federated database an unique numerical identifier, so using number 1 is probably not a good idea. A good start to get something unique maybe your UID (I picked number 9866 in my examples).
Type
> klog
Password: your password
> cd your_top_directory > tar xvf /phenix/u/purschke/Objectivity/tutorial_0_1.tar
You should find the following files:
drwxr-sr-x 2 purschke rhphenix 1024 Oct 13 11:53 Body
-rw-r--r-- 1 purschke rhphenix 261 Oct 13 12:04 Makefile
-rw-r--r-- 1 purschke rhphenix 971 Sep 08 23:20 config.sys
drwxr-sr-x 2 purschke rhphenix 512 Oct 13 12:04 db
-rw-r--r-- 1 purschke rhphenix 1170 Sep 09 11:31 setup.com
Edit setup.com, and find and change the lines
setenv OBJY_TOP_DIR /phenix/u/purschke/Objectivity
to point to your top directory, and change the number in
setenv OBJY_FDID 9866
to the unique number you picked. Then source the command
(we assume that you are using tcsh, by the way):
> source setup.com
In your top directory, type make now to create the federated
database and the create utility. You should see something
like
ribm01 % make
oonewfd -fdlocalpath .FDB \
-pagesize 8192 -lockserverhost ribm01.rhic.bnl.gov \
-fdnumber 9866 /phenix/u/purschke/Objectivity/db/TheDB
Objectivity/DB (TM) Create Federated Database Utility, Version 4.0.2
Copyright (c) Objectivity, Inc 1993, 1996. All rights reserved.
Federated Database "/phenix/u/purschke/Objectivity/db/TheDB" created.
ribm01 %
If you want to clean up, you should use "make clean". As a rule, all Makefiles have a clean target. In particular for the projects to come you should always use "make clean" rather than just delete the databases in order to de-register them properly from the federation.