After you install infx, you run the discovery service to locate existing Informix instances. This automatically configures infx to access and manage them.
The infx disco
command locates instances in the output of onstat -g dis
, reads their ONCONFIG files, and creates the required files and directories.
This all happens automatically in the background, the purpose of this post is to go through each of those steps in more detail.
Step 1. Locate instances
The infx disco
command uses the output from onstat -g dis
to locate existing instances.
Sample output:
There are 1 servers found Server : ol_informix1170 Server Number : 116 Server Type : IDS Server Status : Down Server Version: IBM Informix Dynamic Server Version 11.70.FC4IE Shared Memory : 0x44000000 INFORMIXDIR : /home/informix/sw/IIF_11.70FC4IE ONCONFIG : /home/informix/sw/IIF_11.70FC4IE/etc/onconfig.ol_informix1170 SQLHOSTS : /home/informix/sw/IIF_11.70FC4IE/etc/sqlhosts.ol_informix1170 Host : bobii
Step 2. Set up instance variables
infx uses the following information to connect to the instance:
variable | setting |
---|---|
INFORMIXSERVER | ol_informix1170 |
INFORMIXDIR | /home/informix/sw/IIF_11.70FC4IE |
ONCONFIG | onconfig.ol_informix1170 |
INFORMIXSQLHOSTS | /home/informix/sw/IIF_11.70FC4IE/etc/sqlhosts.ol_informix1170 |
Step 3. Set up infx variables
infx calculates other values it needs, by reading the ONCONFIG file:
infx var | variable | value | location |
---|---|---|---|
CHKDIR | ROOTPATH | directory portion of path | /infx/inst/ol_informix1170/etc/config.ini |
instalias | DBSERVERALIAS | alternate instance names | /infx/local/etc/config.ini |
Step 4. Set up directories
infx requires a few directories for each instance. These are for config information, log files and temp files:
directory | reason |
---|---|
/infx/inst/ol_informix1170 | top level directory |
/infx/inst/ol_informix1170/etc | instance specific config files |
/infx/inst/ol_informix1170/tmp | infx services temp files |
/infx/inst/ol_informix1170/logs | infx services log files |
Once set up is complete, and you can start executing infx commands on this instance e.g.
demo1b@bobii:/home/informix>infx list bobii(192.168.0.34) cpus: 2/2 mem: 3.89gb free: 0.03gb time: Sun Mar 18 11:48:16 2012 stat inst mode version up mem read write informixdir .. ... ... ... ... ... ... ... ... ok ol_informix1170 online 11.70.FC4IE 00:00:20 0.17gb 93.85% 96.53% IIF_11.70FC4IE ... ... ... ... ... ... ... ... ...
infx disco options
By default, the infx disco
command only lists instances and does not automatically set up anything.
You must specify additional options to set up any instances.
command | function |
---|---|
infx disco | list new instances |
infx disco newinst=ol_informix1170 save=yes | set up new instance called ol_informix1170 |
infx disco newinst=all save=yes | set up all new instances |
infx auto service
The infx auto
service is used to automatically execute a command against every instance on a host.
For example, this service is used to start and stop the instances at boot time, and to execute automatic backups.
By default, infx creates four files for each new instance. These files prevent the automatic service from executing against the new instance.
When you are ready for infx to include the new instances, remove these files from /infx/inst/ol_informix1170/etc
file | purpose |
---|---|
deny-auto-backup-dbs | do not include in automatic backups |
deny-auto-clean | do not automatically clean storage pools |
deny-auto-start | do not automatically start instance at system boot time |
deny-auto-stop | do not automatically stop instance at system shutdown time |
For more information about installing and configuring infx, see www.infx.me/1-install
No comments:
Post a Comment