Utility functions to maintain Informix instances and databases from the command line.
Remove old service log files
infx cleanIn config.ini, define how the service and instance logs will be cleaned up. Specify a number of log files to keep for each service, otherwise defaults to 28.
Example:
[cleanup]backup-logs=3restore=-1This example will only keep three days of logical log backup service logs. Setting restore=-1 will keep all restore service log files.
Installs Informix software from a tar file.
infx idsinstall tar=iif.11.70.FC4TL.linux-x86_64.tarThis will install Informix version 11.70FC4TL. By default, infx looks for the tar file in /infx/tar. Specify an absolute path to specify a file in a different location.
A unique directory is used for each version. The above tar file will install to /infx/sw/IIF_11.70FC4TL.
schGet schema information about a table. You must supply a template to format the output for the command line. The examples use the included test templates.
demo1@bobii:/home/informix/jgh>infx table func=sch tab=barlog db=bartest templ=infx-test-tabschinfo for table: bartest:..barlogcolumns col no=1 name=id attrs=serial not null col no=2 name=stamp attrs=datetime year to second col no=3 name=note attrs=char(128) col no=4 name=logno attrs=integeroptions: extent size 16 next size 16lock mode rowconstraintsindex name=ix1_barlog type=U attrs=id opt=in idx01infoGet information about a table, broken down by partitions.. You must supply a template to format the output for the command line. The examples use the included test templates.
demo1@bobii:/home/informix/jgh>infx table func=info tab=barlog db=bartest templ=infx-test-partinfopartitions:name=barlog, owner=informix, object=barlog, space=dat01, ext=1name=barlog-ix1_barlog, owner=informix, object=ix1_barlog, space=idx01, ext=1ddlPrint out the table schema SQL from the Informix dbschema utility, demo1@bobii:/home/informix/jgh>infx table func=sch tab=barlog db=bartest templ=infx-test-tabddlgrant dba to "informix";{ TABLE "informix".barlog row size = 144 number of columns = 4 index size = 9 }create table "informix".barlog ( id serial not null , stamp datetime year to second, note char(128), logno integer ) extent size 16 next size 16 lock mode row;revoke all on "informix".barlog from "public" as "informix";grant select on "informix".barlog to "public" as "informix";grant update on "informix".barlog to "public" as "informix";grant insert on "informix".barlog to "public" as "informix";grant delete on "informix".barlog to "public" as "informix";grant index on "informix".barlog to "public" as "informix";create unique index "informix".ix1_barlog on "informix".barlog (id) using btree in idx01;shrinkExecute the SQL Admin API table shrink task on the specified table.
infx sysadnin func=shrink tab=barlog db=bartestinfx sysadnin func=lmode lmode=page tab=barlog db=bartestfilesUse these functions to manage instance files. infx automatically maps functional file names to paths within the instance tree.
fileCat the contents of the specified fileinfx file file=config.iniCats the contents of /infx/local/etc/config.ini infx file file=bar_act_logCats the contents of the BAR_ACT_LOG file as specified in ONCONFIG. file-newCreate a new file infx file-new file=deny-auto-backup-dbsCreate a file to stop the instance being included in the backup by the auto service. file-rmRemove a file infx file-rm file=deny-auto-backup-dbsRemove the file that stops the instance being included in the backup by the auto service. file-copyMake a local copy of a config file in /infx/etc infx file-copy file=sub-infx-ontape.iniCreate a copy of the standard sub-infx-ontape.ini file in /infx/local/etc |