*Before* Ingres starts up?
You pretty much have to know the root locations. ingprenv II_DATABASE
will give you the default root location. If you've created databases
elsewhere with createdb -dlocation, you're just going to have to wire
them into your script.
ls $dataLocation/ingres/data/default should give you all of the
database names if you know all the data locations, and assuming that there
are no garbage directories that aren't databases.
(Actually, this is not quite true; you can define a relative location and
then I don't think it uses the data/default construct. I'm too lazy to
check at the moment. The old relative location thing is deprecated and
I'm not even sure you can do it any more.)
Depending on how dynamic the situation is, I might be tempted to put wrappers
around createdb and destroydb and track the database names via the
wrappers.
--
Karl R. Schendel, Jr.
K/B Computer Associates sche...@kbcomputer.com
Ingres, Unix, VMS
Karl,
It's Labor Day. Get a life.
Mikey
;-)
I'm laboring. Isn't that what I'm supposed to be doing? :-)
Besides, it's raining and nasty, and even the dog refuses to go outside.
I think I'll go back to bed now.
Karl
If ingres is down then I'd suggest
find / -name aaaaaaaa.cnf -print
Ah.
Depending on how quickly users might get in, and how vocal they are,
and how "ok" it is to just error them out if they get in too fast, here
are my ideas:
1. The "oh well" way: prior to starting Ingres, you create work directories
for iidbdb. As soon as you get Ingres up, you select from iidatabase and
create the rest. Most of the time you'll do this faster than users can
get in, especially if you jigger the iirundbms shellscript to do it for
you.
2. The "mostly good enough" way: at convenient intervals (say via cron
job), you query iidatabase and write a file. You use the file to initialize
the work area prior to Ingres startup. You then finish up with #1, ie
as soon as you get Ingres up you check your work and fix anything you did
wrong. (and update your little file of database names.) For added
spice, you wrap ingstop in something that refreshes your list; thus the
list can only be wrong after a createdb/destroydb followed by a crash.
3. The "always works" way: you set your normal DBMS configuration startup
count(s) to zero in CBF. You also arrange for the name_service and
define_address parameters to both be OFF. (Or you have another dbms config
that is this way.)
At Ingres startup, you first create a work directory for iidbdb, then do an
ingstart which doesn't start any dbms's. You then do an ingstart -iidbms
or ingstart -iidbms=nonames (however you have cbf set up), and read the
II_DBMS_SERVER poop that comes out. You use it to define your local
II_DBMS_SERVER, query iidatabase, and create the remaining work dirs.
You then either a) register that server with the Name Server, or b)
stop that server and start up normal one(s) by hand.
No, I don't know any way to start up a DBMS in closed state. I've often
wanted such a thing.
If it were me doing it, I would probably go with #1 or #2. #3 sounds
way too much like work.
By the way, I am curious to learn how work areas on tmpfs
performs in the real world. Have you tried it yet in any sort of
limited environment?
--
Karl R. Schendel, Jr. sche...@kbcomputer.com
K/B Computer Associates www.kbcomputer.com
Ingres, Unix, VMS Consulting and Training
In addition to Karl's excellent comments, there may be a way to start
a DBMS server in closed state.
First you have to define what that means - that only the DBA can get
in and no other clients can. On most sites, the connections come in
through iigcc (NET server) so unless you start that you cannot
connect. This is one rudimentary way.
For a better solution, start the DBMS server and then deregister it
from IINAMU.
Use "show" to show what the INGRES dbms server is (for each class)
then delete that. Also, ingstart shows you the ids as it comes up.
Now only the DBA can connect by specifying the DBMS server in the SQL
command or using II_DBMS_SERVER. People will have to know that ID
before they can connect.
To open this to the clients, just re-register it.
- Saurabh
Ampther possible way to do this is to start the DBMS , then use iimonitor to
set the server's listent state to shut. Once finished just set the server's
listen state to open.
John
"Saurabh Bhatnagar" <Saurabh....@ca.com> wrote in message
news:6dad5e97.03090...@posting.google.com...