RE:Q: What instances have I?
Posted in 1997
Looking in $INFORMIXDIR/etc/sqlhosts should
give you some pointers but to see what is
currently active you can try this.
It is a longwinded way to do it but it should do
the trick.
run ipcs to determine what shared memory
segments you have running.
The initial shared memory segment will end in 01
for each server. See how many you have got.
this will give you the count of servers.
To find out the server numbers do this.
1. Take the *01 number and minus from it the
value. hex 52564801.
2. Divide the result by hex 10000
The result is your server number in hex.
3. Convert to decimal and grep for
SERVERNUM in $INFORMIXDIR/etc.these are your active servers.
HTH
rgds
Peter Tashkoff <tashkop@zespri.co.nz>
Project Consultant/DBA
Zespri International Limited.
This posting may not be used by any party for
the vilification of any other.
>>> <science@raptor.cqi.com> 11/April/1997
06:51am >>>
How does one find information about various
instances that exist on one's machine?
Specifically, say you go up to a new (to you)
machine and want to answer the question,
"What are my instances, and what are their
configurations?" I'm having a little problem with
this.
For example, one can set the
INFORMIXSERVER variable, then run "onstat
-c", but if the ONCONFIG variable is not set, it
always gives the contents of
$INFORMIXDIR/etc/onconfig. If you set the
ONCONFIG variable to something that does not
correspond to the true configuration file
associated with the INFORMIXSERVER setting,
onstat will duly give you the information
associated with the ONCONFIG setting. And
one can't rely on using, say, "grep
'^DBSERVERNAME' $INFORMIXDIR/etc/* |
grep
$INFORMIXSERVER" because several files like
this might exist in that directory.
Also, the instance files in
$INFORMIXDIR/etc/.infos.* don't appear to be
guaranteed accurate, either. These could be
wiped out (the DBA Guide, vol. 2 tells how to
regenerate *one* for a given
INFORMIXSERVER), and the documentation
also says that when an instance is taken offline,
this file is removed.
Please reply to the group or via e-mail. Thanks.
-Charlie Kapp
-------------------==== Posted via Deja News
====-----------------------
http://www.dejanews.com/ Search, Read,
Post to Usenet