Hi Flemming, On Wed, 5 Dec 2001 09:11:59 -0500 "Flemming Videbaek" <videbaek@sgs1.hirg.bnl.gov> wrote concerning "DB repliocation": > Dear Christian, > > This is an obvious thought (after the fact, hindsight is a wonderful > science), ... LOL > ... and we in fact also talked about doing a mirror of the > calibrations (and geom) to another rcf machine - unfortunately there > is no such thing as 'deadstable.not.here' - Well, I think rcas0005 is a likely candidate, since it doesn't allow logins at all, so less chance of someone putting too much strain on the machine. BTW, couldn't the problem with pii3 have been circumvented by having /usr or even / on a RAID system? I'm aksing, 'cause I don't know. > This does imply that one wants to be able to specify in the code > what RUNDB to use, since in normal cases you would not like to uses > the replicated but rather the 'true' rundatabase. The deafult could > be to use the RUNDB given in the brat-main but one should be able to > override this. Well, that is in fact possible, and the pii3 RUNDB is in fact the default option. To use another database, on another host, simply do BrRunsDb* myRunDb = Br[Rdbm|Root]RunsDb::Instance(); myRunsDb->SetHostName(<my RUNDB host name>); myRunsDb->SetDbName(<my RUNDB database name>); myRunsDb->SetUserName(<my RUNDB user name>); if (!myRunsDb->Connect()) return; BrMainDb* mainDb = BrMainDb::Instance(); if (!mainDb->Connect()) return; if (!mainDb->ConnectToCalib()) return; if (!mainDb->ConnectToGeom()) return; // And no more connections from BrMainDb. Ok, it's not as nice as the normal way of doing things, but it's a bit more flexible, since it alllows different kinds of backends to the database (Rdbm, Root, etc.). Yours, Christian Holm Christensen ------------------------------------------- Address: Sankt Hansgade 23, 1. th. Phone: (+45) 35 35 96 91 DK-2200 Copenhagen N Cell: (+45) 28 82 16 23 Denmark Office: (+45) 353 25 305 Email: cholm@nbi.dk Web: www.nbi.dk/~cholm
This archive was generated by hypermail 2b30 : Thu Dec 06 2001 - 09:23:02 EST