Installed Informix for the Mac...er, now what?
Posted in 2011
A newcomer installed Informix 11.70 Developer Edition on a MacBook Pro and couldn't work out from the docs how to start and stop the server manually. Respondents explained: source the generated environment script (e.g. $INFORMIXDIR/ol_informix1170.sh/.csh) to set INFORMIXDIR, PATH, ONCONFIG, INFORMIXSERVER, etc.; check status with 'onstat -' or ps; start with 'oninit -v' (using 'oninit -ivy' only for first-time initialization, as root/informix via sudo) and shut down with 'onmode -ky'. Jonathan also gave full manual setup steps (onconfig, chunks, sqlhosts) for when no demo instance exists, plus a Mac caveat that /tmp is a symlink and shouldn't be used for IDS files. Version can be checked with 'oninit -version'. The poster's problem was resolved.
Auto-generated by DrWatson from the posts below — may be imperfect; read the full thread.
Topics: Installation, Setup & Upgrades
In some ways this is the stupidest post I've ever written to a mailing list,
and for that I truly apologize.
I have consulted the documentation at
http://publib.boulder.ibm.com/infocenter/idshelp/v117/index.jsp after
installing Informix 11.70 Developer Edition on my MacBook Pro, but now I
cannot for the life of me understand how to start and stop the database
server. I know that oninit is somehow involved, but either I'm not
understanding the documentation's terminology or I'm reading the wrong
documentation.
In an ideal world I'd like to start the server up, connect to it and do a
few things, and then shut it down manually. I have no intention of running
this in the background every time my Mac starts up.
Could someone kindly point me and my slow brain at the relevant
documentation that shows how to accomplish this?
Thanks much,
Laird
--00151743f884dce51e04a597bd2f
Hello.
Did you check all your environment variables???
(INFORMIXSERVER, SHLIB_PATH...)?
Did you create the informix userid and group???
If so, I´d suggest you to read you machine notes, and also your
release notes (maybe you´ll have to change some onconfig parameters,
before using it, like SHMBASE onconfig parameter, etc....)
Could you post your "oninit -iv" output here???
Maybe it indicates some error message....
Best regards.
> In some ways this is the stupidest post I've ever written to a mailing
> list,
> and for that I truly apologize.
>
> I have consulted the documentation at
> http://publib.boulder.ibm.com/infocenter/idshelp/v117/index.jsp after
> installing Informix 11.70 Developer Edition on my MacBook Pro, but now I
> cannot for the life of me understand how to start and stop the database
> server. I know that oninit is somehow involved, but either I'm not
> understanding the documentation's terminology or I'm reading the wrong
> documentation.
>
> In an ideal world I'd like to start the server up, connect to it and do a
> few things, and then shut it down manually. I have no intention of running
> this in the background every time my Mac starts up.
>
> Could someone kindly point me and my slow brain at the relevant
> documentation that shows how to accomplish this?
>
> Thanks much,
> Laird
>
> --00151743f884dce51e04a597bd2f
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
On Mon, Jun 13, 2011 at 9:29 AM, amarini@fazenda.ms.gov.br < amarini@fazenda.ms.gov.br> wrote: > Did you check all your environment variables??? > No; I haven't done anything at all yet. I used the Mac installer and accepted all the defaults. Then I began reading documentation. So I haven't issued any commands yet. Best, Laird --000e0cd1f95a0900a104a59819f6
On Mon, Jun 13, 2011 at 06:17, Laird Nelson <ljnelson@gmail.com> wrote:
> In some ways this is the stupidest post I've ever written to a mailing
> list,
> and for that I truly apologize.
>
Not stupid at all.
I have consulted the documentation at
> http://publib.boulder.ibm.com/infocenter/idshelp/v117/index.jsp after
> installing Informix 11.70 Developer Edition on my MacBook Pro, but now I
> cannot for the life of me understand how to start and stop the database
> server. I know that oninit is somehow involved, but either I'm not
> understanding the documentation's terminology or I'm reading the wrong
> documentation.
>
> In an ideal world I'd like to start the server up, connect to it and do a
> few things, and then shut it down manually. I have no intention of running
> this in the background every time my Mac starts up.
>
> Could someone kindly point me and my slow brain at the relevant
> documentation that shows how to accomplish this?
>
(1) Which version of IDS are you using and did you create a private
installation if you have 11.70.FC2?
Assuming you don't have a private server:
(2) Did you ask the installer (permit the installer) to create a demo
instance for you?
* If you did...
Then there is an environment setting file somewhere - I think under
$INFORMIXDIR/demo but I don't usually use the demo server myself - that you
can source into your shell to set the environment variables.
. /Applications/IBM/Informix/demo/env-setting-script.sh # Bash, Korn
shell, etc
source /Applications/IBM/Informix/demo/env-setting-script.csh # Tcsh etc.
(You can use the command 'source' in Bash too - but you specify the Bash
file, not the C shell file.)
Caveat: the server must be running. If it is not running (because you've
rebooted since installing), you need to use 'sudo' privileges (or any
equivalent mechanism) to run the server as either user root or user
informix. Set the environment for the privileged user and then run "oninit"
or "oninit -v".
* If you did not...
Then there are a number of steps you must go through to configure and
initialize the server. This is most easily done with informix or root
privileges (gained using 'sudo').
INFORMIXDIR is where you installed the software -
/Applications/IBM/informix by default.
0. Choose a name for your database server. I use <machine>_<nn> where NN
is the server number (0..255), but that's because I routinely run many
servers on a single machine. Set this as $INFORMIXSERVER and $IXS:
export INFORMIXSERVER=apollo; export IXS=$INFORMIXSERVER1. Choose a directory to hold your server files: /usr/informix/$IXS. Set
an abbreviated env var such as IXL=/usr/informix/$IXS.
2. Create sub-directories $IXL/dev, $IXL/log, $IXL/tmp
3. All these directories should be owned by user informix, group informix,
and have 770 (or, at a pinch, 775) permission.
4. In $INFORMIXDIR/etc, copy onconfig.std to onconfig.$IXS.
5. Set ONCONFIG=onconfig.$IXS
6. Edit $ONCONFIG and set path names to appropriate locations (under
$IXL).
7. For the primary root chunk, choose a name (e.g.
$IXL/dev/$IXS.rootdbs.c0).
8. Create the primary root chunk as an empty file with
informix:informix:660 permissions.
9. Choose suitable names for the various log files (CONSOLE, MSGPATH, etc)
under $IXL/log.
10. Create empty files for these with suitable permissions
(informix:informix:660 or perhaps 664).
11. Add an entry to the sqlhosts file ($INFORMIXDIR/etc/sqlhosts) for $IXS
(write the expanded name in the file):
$IXS olsoctcp localhost 9088
12. Add $INFORMIXDIR/bin to your PATH.13. Set the DBSERVERNAME to $IXS.
14. Do a sanity check on other parameters in $ONCONFIG, creating files or
directories if necessary.
15. If all has gone well, you should be able to run:
ononit -ivy
With a small modicum of luck, that will bring up IDS, or show you on the
terminal why it failed (meaning I've forgotten some crucial step, such as
adding a "NETTYPE soctcp,1,50,NET" entry to $ONCONFIG). Note that you use
the '-ivy' option only the first time - the '-i' option means initialize;
thereafter, use no arguments to oninit, or just '-v'.
There are scripts that automate all this created by various people at
various times. My suite of such scripts is rather large and complex, and
semi-continually in flux as I need to exercise different features in IDS.
If you get all this running, then you should record the key environment
variables somewhere that you can use in your own login. The short form ones
($IXS, $IXL, etc - I use $IXD for $INFORMIXDIR and $IXH for
$INFORMIXSQLHOSTS) are not recognized by the software but they save me
typing.
You need to record:
* INFORMIXDIR
* PATH (add $INFORMIXDIR/bin to $PATH)
* ONCONFIG (for administration)
* INFORMIXSQLHOSTS (optionally; only needed if you choose a file other than
$INFORMIXDIR/etc/sqlhosts)
* DYLD_LIBRARY_PATH (add $IXD/lib:$IXD/lib/esql to it if you plan to write
any ESQL/C programs, or use any).
* INFORMIXSERVER
When you need to run the server, set these 6 environment variables. Start
the server (using 'sudo' to gain informix or root privileges; we can discuss
using role separation and adding you as a DBSA and so on separately). Then
use it (dbaccess or whatever). Then shut it down the server with 'onmode
-ky' (with informix or root privileges).
If you created a private server instance, you still follow steps 0..15
outlined above. The main difference is that you don't set the permissions
to informix:informix, and you ensure that there is no group write access to
files (and 600 permission on the chunks). You don't have to futz with
'sudo' then.
--
Jonathan Leffler <jonathan.leffler@gmail.com> #include <disclaimer.h>
Guardian of DBD::Informix - v2011.0612 - http://dbi.perl.org
"Blessed are we who can laugh at ourselves, for we shall never cease to be
amused."
--0016e647630640a27704a59a1050
On Mon, Jun 13, 2011 at 12:03 PM, Jonathan Leffler <
jonathan.leffler@gmail.com> wrote:
> Not stupid at all.
>
OK, but wait till you see my answers to your questions. :-)
> (1) Which version of IDS are you using and did you create a private
> installation if you have 11.70.FC2?
>
Well, I went here:
https://www14.software.ibm.com/webapp/iwm/web/reg/pick.do?source=ifxids&S_TACT=1
09HF16W&S_CMP=rnav&lang=en_US
Then I THINK I chose 11.70FC2DE from the mind-numbing list. :-) How would I
check what version I have, assuming for the moment that I already deleted
the installation tarball? Is there a "frob --version" command I can run to
tell for certain?
> (2) Did you ask the installer (permit the installer) to create a demo
> instance for you?
>
I think so. (How would I check?)
> * If you did...
>
> Then there is an environment setting file somewhere - I think under
> $INFORMIXDIR/demo but I don't usually use the demo server myself - that you
> can source into your shell to set the environment variables.
>
> .. /Applications/IBM/Informix/demo/env-setting-script.sh # Bash, Korn
> shell, etc
> source /Applications/IBM/Informix/demo/env-setting-script.csh # Tcsh etc.
>
> (You can use the command 'source' in Bash too - but you specify the Bash
> file, not the C shell file.)
>
OK, I don't see an env-setting-script.sh (I assume you were just handwaving
here at the name); I do see some ol_informix1170.csh/.sh files here. These
look like what you're talking about.
> Caveat: the server must be running.
How would I tell whether the server is running or not? Via onstat in some
manner? I say that like I know what I'm talking about, but really I just
saw "stat" in the filename and am guessing. :-) Also, it would be great to
know what arcane bit of history is responsible for the fact that all the
administration programs seem to start with "on" instead of, say, "ifx" (a
few do).
> If it is not running (because you've
> rebooted since installing), you need to use 'sudo' privileges (or any
> equivalent mechanism) to run the server as either user root or user
> informix. Set the environment for the privileged user and then run "oninit"
> or "oninit -v".
>
OK. I'll let you respond to my questions and then we'll take it from there
if you're still (miraculously) willing. :-) Thanks for your help so far.
Best,
Laird
--20cf3054a29df9b54404a59a9f69
On Mon, Jun 13, 2011 at 09:44, Laird Nelson <ljnelson@gmail.com> wrote:
> On Mon, Jun 13, 2011 at 12:03 PM, Jonathan Leffler <
> jonathan.leffler@gmail.com> wrote:
>
> > Not stupid at all.
>
> OK, but wait till you see my answers to your questions. :-)
>
Everyone is new to Informix at some time...
> > (1) Which version of IDS are you using and did you create a private
> > installation if you have 11.70.FC2?
>
> Well, I went here:
>
>
>
https://www14.software.ibm.com/webapp/iwm/web/reg/pick.do?source=ifxids&S_TACT=1
09HF16W&S_CMP=rnav&lang=en_US
>
> Then I THINK I chose 11.70FC2DE from the mind-numbing list. :-) How would I
> check what version I have, assuming for the moment that I already deleted
> the installation tarball? Is there a "frob --version" command I can run to
> tell for certain?
>
Yes. Pick your binary, and add the '-version' option:
For example:
$ oninit -versionProgram Name: oninit
Build Version: 11.70.FC2
Build Number: N195
Build Host: lxmac1.lenexa.ibm.com
Build OS: Darwin 9.2.0
Build Date: Tue Mar 15 22:47:41 CDT 2011
GLS Version: glslib-5.00.FC2
$
The '-V' option gives a simpler output.
> > (2) Did you ask the installer (permit the installer) to create a demo
> > instance for you?
>
> I think so. (How would I check?)
>
By finding it exists...
> * If you did...
> >
> > Then there is an environment setting file somewhere - I think under
> > $INFORMIXDIR/demo but I don't usually use the demo server myself - that
> you
> > can source into your shell to set the environment variables.
> >
> > .. /Applications/IBM/Informix/demo/env-setting-script.sh # Bash, Korn
> > shell, etc
> > source /Applications/IBM/Informix/demo/env-setting-script.csh # Tcsh etc.
> >
> > (You can use the command 'source' in Bash too - but you specify the Bash
> > file, not the C shell file.)
> >
>
> OK, I don't see an env-setting-script.sh (I assume you were just handwaving
> here at the name); I do see some ol_informix1170.csh/.sh files here. These
> look like what you're talking about.
>
The name was indeed hand-waving; the name you found is what you're looking
for. Their presence shows that you did create a demo server. It might be
in $INFORMIXDIR/demo/server. The install summary document, or should have
documented, the location of the files and the server - you might still find
that information in one of the install log files in
/Applications/IBM/informix.
> Caveat: the server must be running.
>
> How would I tell whether the server is running or not? Via onstat in some
> manner? I say that like I know what I'm talking about, but really I just
> saw "stat" in the filename and am guessing. :-) Also, it would be great to
> know what arcane bit of history is responsible for the fact that all the
> administration programs seem to start with "on" instead of, say, "ifx" (a
> few do).
>
The quickest way is 'onstat -' (as long as you have the environment set).
Other programs take longer to report that the server is down when it is
down, in general.
> > If it is not running (because you've
> > rebooted since installing), you need to use 'sudo' privileges (or any
> > equivalent mechanism) to run the server as either user root or user
> > informix. Set the environment for the privileged user and then run
> "oninit"
> > or "oninit -v".
>
> OK. I'll let you respond to my questions and then we'll take it from there
> if you're still (miraculously) willing. :-) Thanks for your help so far.
>
One other issue you can face on Mac that doesn't affect other platforms:
/tmp is a symlink to a private directory - so it may not work well as a
target for anything in IDS. Generally, anything configured under /tmp
should be somewhere else - $IXL in my previous missive.
--
Jonathan Leffler <jonathan.leffler@gmail.com> #include <disclaimer.h>
Guardian of DBD::Informix - v2011.0612 - http://dbi.perl.org
"Blessed are we who can laugh at ourselves, for we shall never cease to be
amused."
--0016e64763067e150504a59ad138
See below:
Art
Art S. Kagel
Advanced DataTools (www.advancedatatools.com)
Blog: http://informix-myview.blogspot.com/
Disclaimer: Please keep in mind that my own opinions are my own opinions and
do not reflect on my employer, Advanced DataTools, the IIUG, nor any other
organization with which I am associated either explicitly, implicitly, or by
inference. Neither do those opinions reflect those of other individuals
affiliated with any entity with which I am affiliated nor those of the
entities themselves.
On Mon, Jun 13, 2011 at 12:44 PM, Laird Nelson <ljnelson@gmail.com> wrote:
> On Mon, Jun 13, 2011 at 12:03 PM, Jonathan Leffler <
> jonathan.leffler@gmail.com> wrote:
>
> > Not stupid at all.
> >
>
> OK, but wait till you see my answers to your questions. :-)
>
;-)
>
> > (1) Which version of IDS are you using and did you create a private
> > installation if you have 11.70.FC2?
> >
>
> Well, I went here:
>
>
>
https://www14.software.ibm.com/webapp/iwm/web/reg/pick.do?source=ifxids&S_TACT=1
09HF16W&S_CMP=rnav&lang=en_US
>
> Then I THINK I chose 11.70FC2DE from the mind-numbing list. :-) How would I
> check what version I have, assuming for the moment that I already deleted
> the installation tarball? Is there a "frob --version" command I can run to
> tell for certain?
>
> > (2) Did you ask the installer (permit the installer) to create a demo
> > instance for you?
> >
>
> I think so. (How would I check?)
>
As Jonathan said, the existence of the environment files you found are a
clear indicator that you did.
>
> > * If you did...
> >
> > Then there is an environment setting file somewhere - I think under
> > $INFORMIXDIR/demo but I don't usually use the demo server myself - that
> you
> > can source into your shell to set the environment variables.
> >
> > .. /Applications/IBM/Informix/demo/env-setting-script.sh # Bash, Korn
> > shell, etc
> > source /Applications/IBM/Informix/demo/env-setting-script.csh # Tcsh etc.
> >
> > (You can use the command 'source' in Bash too - but you specify the Bash
> > file, not the C shell file.)
> >
>
> OK, I don't see an env-setting-script.sh (I assume you were just handwaving
> here at the name); I do see some ol_informix1170.csh/.sh files here. These
> look like what you're talking about.
>
Yup.
>
> > Caveat: the server must be running.
>
> How would I tell whether the server is running or not? Via onstat in some
> manner? I say that like I know what I'm talking about, but really I just
>
You can set up the environment by executing one of the environment scripts.
If you use sh/ksh/bash then run the .sh file as a 'dot' script (or "source"
it):
. ol_informix1170.sh
Then you can run the "onstat -" command and the headline of the onstat
report will tell you the server's status. Also, if you run "ps -ef" you
will find a number off "oninit" processes running. These are the database
engine's processes.
saw "stat" in the filename and am guessing. :-) Also, it would be great to
> know what arcane bit of history is responsible for the fact that all the
> administration programs seem to start with "on" instead of, say, "ifx" (a
> few do).
>
The "on" is historical. The original Informix engine, which is now known as
Standard Engine or SE, had utilities prefixed with db* and b*. When
Informix created its first shared memory shared cache version, known as
Turbo, the utilities for it were named beginning with tb* to differentiate
them from the non-shared versions. When Turbo was expanded and improved and
the ability to archive the server while users were actively accessing the
data (ie while "online"), it became Informix OnLine and the utilities were
renamed as on*. That prefix stuck even as Informix Dynamic Server and
eXtended Parallel Server were introduced later.
>
> > If it is not running (because you've
> > rebooted since installing), you need to use 'sudo' privileges (or any
> > equivalent mechanism) to run the server as either user root or user
> > informix. Set the environment for the privileged user and then run
> "oninit"
> > or "oninit -v".
> >
>
> OK. I'll let you respond to my questions and then we'll take it from there
> if you're still (miraculously) willing. :-) Thanks for your help so far.
>
Running onstat -? will print out the list of available status report options
(over 100 IB) and the query tool is known as dbaccess. Your demo instance
will have a demonstration database named 'stores', 'stores7', or
'stores_demo' - haven't actually installed an 11.70 instance with a demo
database so I don't know the exact name. To expand your server you can use
the onspaces utility to add additional data files (known as chunks) to the
existing dbspaces (logical organizations of chunks in which tables and
databases reside) or create new ones. The details are explained in the
Administrator's Guide and the commands are detailed in the Administrator's
Reference Manual.
> Best,
> Laird
>
> --20cf3054a29df9b54404a59a9f69
>
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--20cf3071c696aefbbe04a59d301a
On Mon, Jun 13, 2011 at 3:49 PM, Art Kagel <art.kagel@gmail.com> wrote:
> On Mon, Jun 13, 2011 at 12:44 PM, Laird Nelson <ljnelson@gmail.com> wrote:
> You can set up the environment by executing one of the environment scripts.
> If you use sh/ksh/bash then run the .sh file as a 'dot' script (or "source"
> it):
>
> .. ol_informix1170.sh
>
> Then you can run the "onstat -" command and the headline of the onstat
> report will tell you the server's status. Also, if you run "ps -ef" you
> will find a number off "oninit" processes running. These are the database
> engine's processes.
>
This is great; thank you. Did I overlook this in the (voluminous)
InfoCenter documentation? Which of the many thousands of tree nodes should
I have consulted to find this? I'm quite embarrassed that I was unable to
locate it.
> > it would be great to
> > know what arcane bit of history is responsible for the fact that all the
> > administration programs seem to start with "on" instead of, say, "ifx" (a
> > few do).
> >
>
> The "on" is historical. The original Informix engine, which is now known as
> Standard Engine or SE, had utilities prefixed with db* and b*. When
> Informix created its first shared memory shared cache version, known as
> Turbo, the utilities for it were named beginning with tb* to differentiate
> them from the non-shared versions. When Turbo was expanded and improved and
> the ability to archive the server while users were actively accessing the
> data (ie while "online"), it became Informix OnLine and the utilities were
> renamed as on*. That prefix stuck even as Informix Dynamic Server and
> eXtended Parallel Server were introduced later.
>
At least it wasn't platinum or titanium or unobtanium. Thanks.
> Running onstat -? will print out the list of available status report
> options
> (over 100 IB) and the query tool is known as dbaccess. Your demo instance
> will have a demonstration database named 'stores', 'stores7', or
> 'stores_demo' - haven't actually installed an 11.70 instance with a demo
> database so I don't know the exact name. To expand your server you can use
> the onspaces utility to add additional data files (known as chunks) to the
> existing dbspaces (logical organizations of chunks in which tables and
> databases reside) or create new ones. The details are explained in the
> Administrator's Guide and the commands are detailed in the Administrator's
> Reference Manual.
>
Thanks again to you and Jonathan for your help.
Best,
Laird
--20cf307f34c2f592b504a59dd1ed
On 13/06/2011 14:17, Laird Nelson wrote:
> In some ways this is the stupidest post I've ever written to a mailing list,
> and for that I truly apologize.
>
> I have consulted the documentation at
> http://publib.boulder.ibm.com/infocenter/idshelp/v117/index.jsp after
> installing Informix 11.70 Developer Edition on my MacBook Pro, but now I
> cannot for the life of me understand how to start and stop the database
> server. I know that oninit is somehow involved, but either I'm not
> understanding the documentation's terminology or I'm reading the wrong
> documentation.
>
> In an ideal world I'd like to start the server up, connect to it and do a
> few things, and then shut it down manually. I have no intention of running
> this in the background every time my Mac starts up.
>
> Could someone kindly point me and my slow brain at the relevant
> documentation that shows how to accomplish this?
Look up the oninit and onmode commands in the manual. You need to run
oninit -ivy
to initialise the engine (once),
onmode -ky
to shut it down and
oninit -v
to bring it up subsequently.
To configure it, you need to edit the onconfig file, setting ROOTDBS and
DBSERVERNAME are the only mandatory ones, I think, and the sqlhosts file
for database connectivity and /etc/services needs to be configured if
you want to use TCP connectivity.
--
Cheers,
Obnoxio The Clown
http://obotheclown.blogspot.com
I will now proceed to pleasure myself with this fish.