dbTalk Databases Forums  

Moving from Informix SE to Innovator-C

comp.databases.informix comp.databases.informix


Discuss Moving from Informix SE to Innovator-C in the comp.databases.informix forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
loc
 
Posts: n/a

Default Moving from Informix SE to Innovator-C - 05-19-2011 , 08:17 AM






I'm currently using Informix 4GL 7.50.UC4 with Informix SE 7.25.UC6R1
on Linux and I have two databases set up with the same database name,
but each in a different path, this is because the database name is
specified in the 4GL programs with the DATABASE statement. I then use
the env variable DBPATH to point 4GL to which database it should use.

I've downloaded and installed Informix Innovator-C Edition 11.70.UC2IE
which I'd like to use with the 4GL programs, but how to I do the
equivalent of using DBPATH to point to the SE .dbs directories since
IDS doesn't work this way?

During install I let the install script create an instance and
initialize the server, it created the following dbspaces

/opt/IBM/informix/db1/dbspaces/datadbs
/opt/IBM/informix/db1/dbspaces/llogdbs
/opt/IBM/informix/db1/dbspaces/plogdbs
/opt/IBM/informix/db1/dbspaces/rootdbs
/opt/IBM/informix/db1/dbspaces/sbspace
/opt/IBM/informix/db1/dbspaces/tempdbs

I then used dbaccess to create a database:

create database mydb in datadbs;

Now I want to create another database named 'mydb' which will contain
different data so I think I need to setup multiple residency on the
Innovator-C server, to do this I did:

cp etc/onconfig.db1 etc/onconfig.db2

#onconfig.db1
SERVERNUM 0
DBSERVERNAME linux_host
DBSERVERALIASES dr_linux_host
ROOTNAME rootdbs
ROOTPATH /opt/IBM/informix/db1/dbspaces/rootdbs
ROOTOFFSET 0
ROOTSIZE 200000
MIRROR 0

Then I edited onconfig.db2 and changed the following

#onconfig.db2
SERVERNUM 1
DBSERVERNAME linux_host
DBSERVERALIASES dr_linux_host
ROOTNAME rootdbs02
ROOTPATH /opt/IBM/informix/db2/dbspaces/rootdbs02
ROOTOFFSET 0
ROOTSIZE 200000
MIRROR 0

touch /opt/IBM/informix/db2/dbspaces/rootdbs02
chmod 660 /opt/IBM/informix/db2/dbspaces/rootdbs02
chown informix:informix /opt/IBM/informix/db2/dbspaces/rootdbs02
export ONCONFIG=onconfig.db2
oninit -i

touch /opt/IBM/informix/db2/dbspaces/datadbs02
chmod 660 /opt/IBM/informix/db2/dbspaces/datadbs02
chown informix:informix /opt/IBM/informix/db2/dbspaces/datadbs02
onspaces -c -d datadbs02 -p /opt/IBM/informix/db2/dbspaces/datadbs02 -
o 0 -s 4194304

Now using dbaccess I tried to create a database with the same name
'mydb' in space datadbs02 but I got an error that it already existed.
Shouldn't $ONCONFIG specify which instance I'm using and let me create
a database with the same name in each instance?

Reply With Quote
  #2  
Old   
Jon Ritson
 
Posts: n/a

Default Re: Moving from Informix SE to Innovator-C - 05-19-2011 , 10:04 AM






1. You need different "DBSERVERNAME / DBSERVERALIASES" for a different ... DBSERVER.

2. You need to modify your active sqlhosts file (default $INFORMIXDIR/etc/sqlhosts) or $INFORMIXSQLHOSTS

So, for instance one you get your environment variables set (generally just "." in a file like :

File Name linux_host.env
export INFORMIXSERVER=linux_host
export INFORMIXDIR=/opt/IBM/informix
export PATH=$INFORMIXDIR/bin:$PATH
export ONCONFIG=onconfig.db1

File Name linux_host1.env
export INFORMIXSERVER=linux_host1
export INFORMIXDIR=/opt/IBM/informix
export PATH=$INFORMIXDIR/bin:$PATH
export ONCONFIG=onconfig.db2

and in your sqlhosts file you will have something like :

# Entries for db1 dbserver
linux_host onpicshm linux_host linux_host_shm
dr_linux_host onsoctcp linux_host 9799
# Entries for db2 dbserver (suggest using something other than DB2 :O )
linux_host1 onpicshm linux_host linux_host1_shm
dr_linux_host1 onsoctcp linux_host 9800

To get at linux_host :
.. ./linux_host1.env

To get at linux_host1 :
.. ./linux_host1.env

etc. etc. etc.

Hopefully makes some sense :/

Reply With Quote
  #3  
Old   
Mark Scranton
 
Posts: n/a

Default Re: Moving from Informix SE to Innovator-C - 05-19-2011 , 11:22 AM



Hi -

It's a "big jump" from SE to 11.7 - VERY big. The differences in the architecture and specifically in your case the dbspaces in IDS 7+ vs. the disk allocation is SE is significant. In IDS 7+ (including 11 of course), there is much more to creating database/dbspaces than just working at the "disk level" as in SE. I'd be happy to help, but a phone call would be much better since again, the overall architecture and "way things are done" is significantly different. You can reach me at 1-855-GET-IFMX, or mark (AT) markscranton (DOT) com.

Thanks!
Mark Scranton
The Mark Scranton Group, LLC
www.markscranton.com
www.marksinformix.com
1-855-GET-IFMX

Reply With Quote
  #4  
Old   
loc
 
Posts: n/a

Default Re: Moving from Informix SE to Innovator-C - 05-19-2011 , 11:38 AM



On May 19, 11:04*am, Jon Ritson <JonRit... (AT) Sky (DOT) Com> wrote:
Quote:
1. You need different "DBSERVERNAME / DBSERVERALIASES" for a different .... DBSERVER.

2. You need to modify your active sqlhosts file (default $INFORMIXDIR/etc/sqlhosts) or $INFORMIXSQLHOSTS

So, for instance one you get your environment variables set (generally just "." in a file like :

File Name linux_host.env
export INFORMIXSERVER=linux_host
export INFORMIXDIR=/opt/IBM/informix
export PATH=$INFORMIXDIR/bin:$PATH
export ONCONFIG=onconfig.db1

File Name linux_host1.env
export INFORMIXSERVER=linux_host1
export INFORMIXDIR=/opt/IBM/informix
export PATH=$INFORMIXDIR/bin:$PATH
export ONCONFIG=onconfig.db2

and in your sqlhosts file you will have something like :

# Entries for *db1 dbserver
linux_host * * onpicshm linux_host linux_host_shm
dr_linux_host *onsoctcp linux_host 9799
# Entries for db2 dbserver (suggest using something other than DB2 :O )
linux_host1 * *onpicshm linux_host linux_host1_shm
dr_linux_host1 onsoctcp linux_host 9800

To get at linux_host :
. ./linux_host1.env

To get at linux_host1 :
. ./linux_host1.env

etc. etc. etc.

Hopefully makes some sense :/
I made the changes you suggested and it works, but in order to access
each database server I need to stop and start the db server for
example:

To get at linux_host :
.. ./linux_host1.env
I can create a database using this host but to access and create a
database on the second host I first need to stop the db server with
oninit -k then...
To get at linux_host1 :
.. ./linux_host1.env
and then to oninit to startup the engine again.

If I don't stop and start the server when switching environment
variables I can't connect in dbaccess and it gives error 761:
INFORMIXSERVER does not match either DBSERVERNAME or DBSERVERALIASES.

Reply With Quote
  #5  
Old   
Jon Ritson
 
Posts: n/a

Default Re: Moving from Informix SE to Innovator-C - 05-19-2011 , 11:47 AM



)

If you want more help post your :

linux_host.env
linux_host1.env
and
$INFORMIXDIR/etc/sqlhosts

"oninit -k" is not a valid command, I assume you mean "onmode -k".

Also the message should give you a pretty good clue :/

Reply With Quote
  #6  
Old   
loc
 
Posts: n/a

Default Re: Moving from Informix SE to Innovator-C - 05-19-2011 , 12:08 PM



On May 19, 12:47*pm, Jon Ritson <JonRit... (AT) Sky (DOT) Com> wrote:
Quote:
)

If you want more help post your :

linux_host.env
linux_host1.env
and
$INFORMIXDIR/etc/sqlhosts

"oninit -k" is not a valid command, I assume you mean "onmode -k".

Also the message should give you a pretty good clue :/
Yes I meant onmode -k

#linux_host.env
INFORMIXDIR=/opt/IBM/informix
INFORMIXSERVER=linux_host
ONCONFIG=onconfig.db1
INFORMIXSQLHOSTS=/opt/IBM/informix/etc/sqlhosts.linux_host
PATH=${INFORMIXDIR}/bin:${INFORMIXDIR}/extend/krakatoa/jre/bin:$
{PATH}
export INFORMIXDIR INFORMIXSERVER ONCONFIG INFORMIXSQLHOSTS PATH

#linux_host1.env
INFORMIXDIR=/opt/IBM/informix
INFORMIXSERVER=linux_host1
ONCONFIG=onconfig.db2
INFORMIXSQLHOSTS=/opt/IBM/informix/etc/sqlhosts.linux_host1
PATH=${INFORMIXDIR}/bin:${INFORMIXDIR}/extend/krakatoa/jre/bin:$
{PATH}
export INFORMIXDIR INFORMIXSERVER ONCONFIG INFORMIXSQLHOSTS PATH

#sqlhosts.linux_host
linux_host onsoctcp linux_host linux_host
dr_linux_host drsoctcp linux_host dr_linux_host

#sqlhosts.linux_host1
linux_host1 onsoctcp linux_host linux_host1
dr_linux_host1 drsoctcp linux_host dr_linux_host1

#/etc/services
linux_host 9088/tcp
dr_linux_host 9089/tcp
linux_host1 9188/tcp
dr_linux_host1 9189/tcp

Reply With Quote
  #7  
Old   
loc
 
Posts: n/a

Default Re: Moving from Informix SE to Innovator-C - 05-19-2011 , 05:38 PM



On May 19, 1:08*pm, loc <c320... (AT) gmail (DOT) com> wrote:
Quote:
On May 19, 12:47*pm, Jon Ritson <JonRit... (AT) Sky (DOT) Com> wrote:

)

If you want more help post your :

linux_host.env
linux_host1.env
and
$INFORMIXDIR/etc/sqlhosts

"oninit -k" is not a valid command, I assume you mean "onmode -k".

Also the message should give you a pretty good clue :/

Yes I meant onmode -k

#linux_host.env
*INFORMIXDIR=/opt/IBM/informix
*INFORMIXSERVER=linux_host
*ONCONFIG=onconfig.db1
*INFORMIXSQLHOSTS=/opt/IBM/informix/etc/sqlhosts.linux_host
*PATH=${INFORMIXDIR}/bin:${INFORMIXDIR}/extend/krakatoa/jre/bin:$
{PATH}
export INFORMIXDIR INFORMIXSERVER ONCONFIG INFORMIXSQLHOSTS PATH

#linux_host1.env
*INFORMIXDIR=/opt/IBM/informix
*INFORMIXSERVER=linux_host1
*ONCONFIG=onconfig.db2
*INFORMIXSQLHOSTS=/opt/IBM/informix/etc/sqlhosts.linux_host1
*PATH=${INFORMIXDIR}/bin:${INFORMIXDIR}/extend/krakatoa/jre/bin:$
{PATH}
export INFORMIXDIR INFORMIXSERVER ONCONFIG INFORMIXSQLHOSTS PATH

#sqlhosts.linux_host
linux_host onsoctcp linux_host linux_host
dr_linux_host drsoctcp linux_host dr_linux_host

#sqlhosts.linux_host1
linux_host1 onsoctcp linux_host linux_host1
dr_linux_host1 drsoctcp linux_host dr_linux_host1

#/etc/services
linux_host * * * * * * 9088/tcp
dr_linux_host * * * *9089/tcp
linux_host1 * * * * * 9188/tcp
dr_linux_host1 * * *9189/tcp
I got it working. Thanks for the help. I missed the obvious thing and
that was that I needed to do another `oninit -i' after switching
environments with `. ./linux_host1.env' :-)

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.