instance setup

Use the infx inst func=new command to setup new Informix instances.

What gets created is controlled by a template file, but includes initial chunk files, directories for logs and ONCONFIG files.

Next, you use the infx inst func=init command to initialize the database instance.

example

Create an instance called infx01, using the default settings.

infx inst func=new newinst=infx01

This creates the directories and files needed by infx, adds entries to the sqlhosts file and creates a new onconfig file.

initialize

Use the init function of the instance service to initialize the new instance, and bring it online.

infx inst infx01 func=init squiggle=yes
Functions, like init, that destroy all database data require a special token, squiggle=yes for confirmation.

online instance

You now have a blank instance called infx01.

default instance

These are the directories and files created under /infx/inst/infx01.

location variable purpose
backup BACKUPDIR directory to store backups
backup/dbs ontape dbspace backups
backup/logs
ontape logical log backups
chks CHKDIR directory to contain chunk files
chks/root.001 new file to initialize root space.
dump specified in onconfig template for diagnostic dumps
etc directory to contain instance specific config files
infomrixdir INFORMIXDIR link to /infx/sw/latest
logs LOGDIR service and other command output
tmp TMPDIR temporary files used by services

config

The new function supports parameters that allow you to override the default config files and build the instance based on a different definition.

infx inst func=new newinst=infx01 config=myconfig onconfig=myonconfig servernum=10 sw=XXX
parameter description
config=myconfig instead of /infx/etc/inst-config.ini use the file /infx/local/etc/myconfig.ini
onconfig=myconfig instead of /infx/etc/infx.onconfig use the file /infx/local/etc/myonconfig.onconfig
servernum=10 use server number 10, instead of calculating the next available number
sw=XXX use /infx/sw/XXX instead of the informixdir specified in the config file

config=infx-config.inst

The supplied file, /infx/etc/infx-config.inst is the most basic prototype for an instance. You can use this as a basis to create instances and then manually modify them to your needs. You can also create new versions of this ini file to create whatever instance layouts you require.

When using config files, always copy the files from /infx/etc to /infx/local/etc before editing.

directories, links & files

This is the section of the infx-config.inst that defined the directories, files and links. All paths are relative to the instance specific directory. Specify absolute paths for files outside of that.
infx requires an etc, informixdir, logs and tmp directory for each instance.

sqlhosts

This section describes what sqlhosts entries will be created for the instance. This step is skipped if the entries are already in the sqlhosts file.

If you want to create multiple instances with TCP connections, you need to assign a unique port for each instance. When you specify a base port number, infx adds the server number to generate a unique port for the instance.

The sqlhosts file is created in the INFORMIXDIR by default, you can override this in the config.ini file and specify a central location.

Set central sqlhosts file for all instances on this host, in /infx/etc/config.ini

INFORMIXSQLHOSTS = /infx/local/etc/sqlhosts

onconfig=infx-small.onconfig

A new onconfig file is generated for the instance, based on the onconfig template. The default is /infx/etc/infx-small.onconfig.

This file has exactly the same format as the standard onconfig file, with the following tokens replaced when generating the file.

token description
[[INST] new instance name e.g. DBSERVERNAME [[INST]]
[[SERVERNUM]] new instance server number e.g. SERVERNUM [[SERVERNUM]]

This step is skipped when an onconfig file already exists for the instance.

The onconfig file is created in the INFORMIXDIR and is named onconfig.inst.