How to create many Instances in the informix DATABASE and what are the configuration files need to be modifed
Submitted by karthik04 on Wed, 2009-06-03 07:04
Hi Spokey,
How to create many instance in the informix DB and what are the Configuration files needed to be changed
For Example
Assume that i am having an onconfig.server1 as
SERVERNUM 9
DBSERVERNAME server1
DBSERVERALIASES
And onconfig.server2 as
SERVERNUM 15
DBSERVERNAME server2
DBSERVERALIASES
In this Case what are the changes we have to do for the Environment file
Now in the envoronment file it is pointing to onconfig.server1 & sqlhost.server1
If iam creating one more instance how can i modify these files
Could you Please give us some technical solutions
- Login or register to post comments
- 1600 reads
- Email this page
- Printer-friendly version
- Send to friend
- PDF version











Summary of actions
You are going to have to either put additional entries in your $INFORMIXDIR/etc/sqlhosts file for the new instance OR create a new, separate sqlhosts file with the necessary entries.
Personally, I would rather go with a single sqlhosts file, it means that you have one fewer environment variable to set in your environment.
sqlhosts:
server1 onipcshm yourhostname fakeservice1
server2 onipcshm yourhostname fakeservice2
I would then create two environment setting files, say server1.env and server2.env
server1.env:
INFORMIXSERVER=server1
ONCONFIG=onconfig.server1
PS1=[server1]$
export INFORMIXSERVER ONCONFIG PS1
server2.env:
INFORMIXSERVER=server2
ONCONFIG=onconfig.server2
PS1=[server2]$
export INFORMIXSERVER ONCONFIG PS1
Running ". server1.env" or ". server2.env" should then allow you to toggle between instances.
Note that if you want to access these instances via TCP, you will have to:
1. add new TCP services to /etc/hosts
2. add new entries to sqlhosts
3. amend the onconfig files to add the new DBSERVERALIASES
4. create new environment "scripts" if you want to use the TCP connections on the host
Sample sqlhosts entry (assuming a DBSERVERALIAS of "server1tcp" and a TCP service name of "server1tcp" in /etc/hosts) :
server1tcp onsoctcp yourhostname server1tcp
Note that on some platforms, the "onsoctcp" might be replaced by "ontlitcp". Your release notes will tell you which one to use.
server1tcp.env:
INFORMIXSERVER=server1tcp
ONCONFIG=onconfig.server1
PS1=[server1tcp]$
export INFORMIXSERVER ONCONFIG PS1
I hope this clarifies what needs to be done. Please let me know how you get on, or if you have any further questions.
how to create many instance in informix DB
Hi Spokey ,
Thanks a Lot for your Valuable information
Still i have some doutbs Could you Please Clarify these
I have created the two onconfig file
Onconfig.server1
Onconfig.server2
With the same DBSERVERNAME example - MAINSERVER for both the oncong.server1 & onconfig.server2
I have modified only the SERVERNUM parmater alone in the two onconfig FILES
Apart from that everything is same including the ROOTPATH etc there is no change
And in the sqlhosts I have done like this
Sqlhosts.server1
demo_on onipcshm on_hostname on_servername
demo_se seipcpip se_hostname sqlexec
MAINSERVER onipcshm liux5858 5021
Sqlhosts.server2
demo_on onipcshm on_hostname on_servername
demo_se seipcpip se_hostname sqlexec
MAINSERVER onipchsm linux5858 5020
And the two Environment files are
Env.server1
export INFORMIXDIR=/home/informix
export INFORMIXBIN=/home/informix/bin
export PATH=/home/informix/bin:/home/informix/lib:/home/informix:$PATH
export LD_LIBRARY_PATH=/home/informix/lib:/home/informix/lib/tools:/home/informix/lib/esql
export INFORMIXSQLHOSTS=/home/informix/etc/sqlhosts.server1
export INFORMIXSERVER=MAINSERVER
export DBSERVERNAME=MAINSERVER
export ONCONFIG=onconfig.server2
export DBDATE=dmy4
export DBMONEY=Rs
export DBCENTURY=C
export DBEDIT=vi
export C4GLFLAGS="-static"
export INFORMIXC="cc -m64"
export TERM=ansi
export TERMCAP=$INFORMIXDIR/etc/termcap
export STMT_CACHE=2
ENV.server2
export INFORMIXDIR=/home/informix
export INFORMIXBIN=/home/informix/bin
export PATH=/home/informix/bin:/home/informix/lib:/home/informix:$PATH
export LD_LIBRARY_PATH=/home/informix/lib:/home/informix/lib/tools:/home/informix/lib/esql
export INFORMIXSQLHOSTS=/home/informix/etc/sqlhosts.server2
export INFORMIXSERVER=MAINSERVER
export DBSERVERNAME=MAINSERVER
export ONCONFIG=onconfig.server2
export DBDATE=dmy4
export DBMONEY=Rs
export DBCENTURY=C
export DBEDIT=vi
export C4GLFLAGS="-static"
export INFORMIXC="cc -m64"
export TERM=ansi
export TERMCAP=$INFORMIXDIR/etc/termcap
export STMT_CACHE=2
When I Login to the Production DB I have initialize the server
Using onint –ivy
Where i am using the onconfig.server1 & sqlhost.server1 with env.server1
When I Login to the Development DB I have initialize the server
Using onint –ivy
Where iam using the onconfig.server2 & sqlhost.server2 with env.server2
Now iam able to create the database with the name karthik in both the production and Development
Actually this is my doubt
When I login as an Informix User to create the DBSPACES I have create two dbspaces with the Chunk name productiondbs and Developmentdbs
But when I login in the production server I used the dbaccess tool to create the database
DBACCESS ? DATABASE ? CREATE ? karthik ? then it ask for DBSPACE
Here it is showing all the three DBSPACE rootbs, Productiondbs & Development DBS
So I can select any of these and here the database is created with the name karthik
But when I Login in the Development Environment to create the DB
Using the dbaccess tool
DBACCESS ? DATABASE ? CREATE ? karthik ? then it ask for DBSPACE
Here it is showing only the roodbs other dbspaces it is not showing
I don’t know why the other DBSPACES is not showing
How can I get the other dbspaces here?
Is the rootdbspath can be same in the two onconfig file?
What are the main chages to be done in the two onconfigfiles?
Please let me know my file is correct or any other modifications needs to be done
And here is my onconfig FLIE the ony change in Both the file is only the SERVERNUM for onconfig1.server1 it is 9 and for other(onconfig.server2) it is 8
ROOTNAME rootdbs
#######ROOTPATH $INFORMIXDIR/tmp/demo_on.rootdbs
#####ROOTPATH /newdbs/chunk/rootdbs
ROOTPATH /newdbs/chunk/rootdbs
ROOTOFFSET 0
#######ROOTSIZE 200000
ROOTSIZE 20000000
MIRROR 0
MIRRORPATH /hom/informix/tmp/demo_on.root_mirror
MIRROROFFSET 0
PHYSFILE 50000
PLOG_OVERFLOW_PATH /home/informix/tmp
PHYSBUFF 128
LOGFILES 6
LOGSIZE 10000
DYNAMIC_LOGS 2
LOGBUFF 64
LTXHWM 70
LTXEHWM 80
MSGPATH /home/informix/tmp/online.log
CONSOLE /home/informix/tmp/online.con
TBLTBLFIRST 0
TBLTBLNEXT 0
TBLSPACE_STATS 1
DBSPACETEMP
SBSPACETEMP
SBSPACENAME
SYSSBSPACENAME
ONDBSPACEDOWN 2
SERVERNUM 9
DBSERVERNAME MAINSERVER
DBSERVERALIASES
NETTYPE ipcshm,1,50,CPU
NETTYPE onsoctcp,1,50,NET
LISTEN_TIMEOUT 60
MAX_INCOMPLETE_CONNECTIONS 1024
FASTPOLL 1
MULTIPROCESSOR 0
VPCLASS cpu,num=1,noage
VP_MEMORY_CACHE_KB 0
SINGLE_CPU_VP 0
CLEANERS 8
AUTO_AIOVPS 1
DIRECT_IO 0
LOCKS 20000
DEF_TABLE_LOCKMODE page
RESIDENT 0
SHMBASE 0x44000000
SHMVIRTSIZE 32656
SHMADD 8192
EXTSHMADD 8192
SHMTOTAL 0
SHMVIRT_ALLOCSEG 0.000000
SHMNOACCESS
CKPTINTVL 300
AUTO_CKPTS 1
RTO_SERVER_RESTART 0
BLOCKTIMEOUT 3600
TXTIMEOUT 300
DEADLOCK_TIMEOUT 60
HETERO_COMMIT 0
TAPEDEV STDIO
TAPEBLK 32
TAPESIZE 0
LTAPEDEV /dev/null
LTAPEBLK 32
LTAPESIZE 0
BAR_ACT_LOG /home/informix/bar_act.log
BAR_DEBUG_LOG /home/informix/bar_dbug.log
BAR_DEBUG 0
BAR_MAX_BACKUP 0
BAR_RETRY 1
BAR_NB_XPORT_COUNT 20
BAR_XFER_BUF_SIZE 31
RESTARTABLE_RESTORE on
BAR_PROGRESS_FREQ 0
BAR_BSALIB_PATH
BACKUP_FILTER
RESTORE_FILTER
BAR_PERFORMANCE 0
ISM_DATA_POOL ISMData
ISM_LOG_POOL ISMLogs
DD_HASHSIZE 31
DD_HASHMAX 10
DS_HASHSIZE 31
DS_POOLSIZE 127
PC_HASHSIZE 31
PC_POOLSIZE 127
STMT_CACHE 0
STMT_CACHE_HITS 0
STMT_CACHE_SIZE 512
STMT_CACHE_NOLIMIT 0
STMT_CACHE_NUMPOOL 1
USEOSTIME 0
STACKSIZE 32
ALLOW_NEWLINE 0
USELASTCOMMITTED NONE
FILLFACTOR 90
MAX_FILL_DATA_PAGES 0
BTSCANNER num=1,threshold=5000,rangesize=-1,alice=6,compression=default
ONLIDX_MAXMEM 5120
MAX_PDQPRIORITY 100
DS_MAX_QUERIES
DS_TOTAL_MEMORY
DS_MAX_SCANS 1048576
DS_NONPDQ_QUERY_MEM 128
DATASKIP off
OPTCOMPIND 2
DIRECTIVES 1
EXT_DIRECTIVES 0
OPT_GOAL -1
IFX_FOLDVIEW 0
AUTO_REPREPARE 1
RA_PAGES 64
RA_THRESHOLD 16
EXPLAIN_STAT 1
#SQLTRACE level=low,ntraces=1000,size=2,mode=global
#DBCREATE_PERMISSION informix
#DB_LIBRARY_PATH
IFX_EXTEND_ROLE 1
SECURITY_LOCALCONNECTION 0
UNSECURE_ONSTAT 0
ADMIN_USER_MODE_WITH_DBSA 0
SSL_KEYSTORE_LABEL
PLCY_POOLSIZE 127
PLCY_HASHSIZE 31
USRC_POOLSIZE 127
USRC_HASHSIZE 31
STAGEBLOB
OPCACHEMAX 0
ON_RECVRY_THREADS 1
OFF_RECVRY_THREADS 10
DUMPDIR /home/informix/tmp
DUMPSHMEM 1
DUMPGCORE 0
DUMPCORE 0
DUMPCNT 1
ALARMPROGRAM /home/informix/etc/alarmprogram.sh
ALRM_ALL_EVENTS 0
STORAGE_FULL_ALARM 600,3
SYSALARMPROGRAM /home/informix/etc/evidence.sh
RAS_PLOG_SPEED 25000
RAS_LLOG_SPEED 0
EILSEQ_COMPAT_MODE 0
QSTATS 0
WSTATS 0
#VPCLASS jvp,num=1
JVPJAVAHOME /home/informix/extend/krakatoa/jre
JVPHOME /home/informix/extend/krakatoa/
JVPPROPFILE /home/informix/extend/krakatoa/.jvpprops
JVPLOGFILE /home/informix/jvp.log
#JDKVERSION 1.5
JVPJAVALIB /bin
JVPJAVAVM jvm
#JVPARGS -verbose:jni
#JVPCLASSPATH $INFORMIXDIR/extend/krakatoa/krakatoa_g.jar:$INFORMIXDIR/extend/krakatoa/jdbc_g.jar
JVPCLASSPATH /home/informix/extend/krakatoa/krakatoa.jar:/home/informix/extend/krakatoa/jdbc.jar
BUFFERPOOL size=2K,buffers=50000,lrus=8,lru_min_dirty=50.000000,lru_max_dirty=60.000000
AUTO_LRU_TUNING 1
DRLOSTFOUND /home/informix/etc/dr.lostfound
ADMIN_MODE_USERS