Friday, October 5, 2007

Second Install

So my notes from the first install are not complete, b/c I was trial and erroring so much. This install I'm going to document more completely.

Edit /etc/profile
Add this:

PATH=$PATH:/opt/IBM/informix11:/opt/IBM/informix11/bin/
export PATH
INFORMIXDIR=/opt/IBM/informix11
export INFORMIXDIR

INFORMIXSERVER=rhinformixrd1tcp
export INFORMIXSERVER


ONCONFIG=onconfig.std
export ONCONFIG

Thursday, September 27, 2007

Onmonitor

I used 'onmode -kuy' to bring down the engine after adding the chunks. For no good reason at all I'm going to run 'oninit -i' once again. Well, the double plus ungood reason is that I want to verify once again that I don't get any errors bringing up the engine.

OK... I'm up and error free.

I have gone into onmonitor and set up my chunks again.

/data/informix/chunk1 size was set by onconfig.std (I think)
/data/informix/chunk2 10GB
/data/informix/chunk3 10GB
/data/informix/chunk4 10GB

Chunks and Onmonitor

A little summary before I go on. Yesterday I added all my data chunks, but filled my hard disk space in the process. So I have removed all my chunks. Since this blog is really a letter to my future self, I'm going to review what I've done with chunks and 'onmonitor'.

cd to /data/informix/ to create the chunk files. I figured out that it is quicker to 'su' to 'informix' before I 'touch chunkx' so that I don't have to add the step changing the user and group. So I
# touch chunk1
and repeat on through chunk4, since that's all I have room for.

Once the chunks have been created, I 'chmod 660 chunk*' so I have the right permissions.

Once again I oninit -i so that I can get the engine up. Once I finish this blunder-through process finished, I'm going to create a walkthrough so that you only have to oninit -i once.

Assuming that the db engine started correctly, I then proceed to run 'onmonitor'. BTW, Colin told me that 'scoansi' works well for the TERM in onmonitor. And he's right!

So start 'onmonitor' Go to 'Info' and display the information for 'rootdbs'. Most likely chunk1 is already there. The size for chunk is set in the 'onconfig.std' so I need to set up chunks2-4. Exit 'Info' and enter 'Add_chunk'. Set the pathname to '/data/informix/chunk2' and make the size 10GB. Press Esc and it will verify the size on the disk and add the chunk to dbspace. Repeat as many times as necessary. Go to 'Info' to verify the existence of the chunks.

Exit 'onmonitor'.

Wednesday, September 26, 2007

Setting up the Chunks

In the last post, I set up /data/informix/chunk1/ through chunk7/ as directories. They are not directories, they are files. Deleting all those chunk directories and touching them as files.

# touch chunk1


Doing an 'onmonitor' to set up the chunks. However, onmonitor doesn't like my termtype.

I'll try this one first

# TERM=vt100
# export TERM
# echo $TERM
vt100

OK it doesn't like vt100.

Found a reference to altos2 on this page.

Exported TERM=altos2.

This at least brought up a menu when I run 'onmonitor'. Apparently vt100 is a good termtype to use, but I seem to have something set wrong in my PuTTY.

I'll have to get my TERM isues fixed before I can use 'onmonitor'.

Onconfid.std Changes

Here are the changes I made to onconfig.std so that it matches our production server.

ROOTPATH /data/informix/chunk1 # Path for device containing root dbspace

*** I'll need to go create that directory structure next.

PHYSDBS physdbs # Location (dbspace) of physical log

*** Not sure if I need to do something else.


LOGFILES 10 # Number of logical log files
LOGSIZE 3000 # Logical log size (Kbytes)

DBCREATE_PERMISSION informix

DBSERVERNAME rhinformixrd1 # Name of default database server
DBSERVERALIASES rhinformixrd1tcp # List of alternate dbservernames

Created the following directories:
/data/informix/chunk1/
/data/informix/chunk2/
/data/informix/chunk3/
/data/informix/chunk4/
/data/informix/chunk5/
/data/informix/chunk6/
/data/informix/chunk7/

After committing these changes, I'm running 'onconfig -i' again to see what else erors.

And here it is! INFORMIXSERVER does not match DBSERVERNAME or any of the DBSERVERALIASES.
FAILED

# INFORMIXSERVER=rhinformixrd1
# export INFORMIXSERVER
# echo $INFORMIXSERVER
rhinformixrd1

One more try at oninit -i

oninit: DBSERVERNAME 'rhinformixrd1tcp' not in sqlhosts file or sqlhosts file contents
are damaged.

Added this to sqlhosts. What I did earlier was crap. This probably is too.
rhinformixrd1 onsoctcp 10.0.0.162 online
rhinformixrd1 onsoctcp 10.0.0.162 online

09:20:49 listener-thread: err = -931: oserr = 0: errstr = online: Cannot locate online service/tcp service in /etc/services.

Added this to /etc/services:
online 1536/tcp # Informix

Running oninit -i again.

Crap! This one looks serious.

09:27:40 listener-thread: err = -25572: oserr = 98: errstr = : Network driver cannot bind a name to the port.
System error = 98.

Ran 'finderr 25572'. Got this:

A system call has failed. The sqlexecd daemon or database server cannot
access the network port that is specified by the servicename in the
sqlhosts file. This situation might occur because the network port is
already in use by another sqlexecd, database server, or other
application. Use a different servicename on the command line (prior to
Version 6.0) or in the sqlhosts file (beginning with Version 6.0).
Contact your system administrator for assistance.


Ahh... I think this was caused by putting the same thing in sqlhosts twice.

Figured it out. This is what should be in /etc/profile:

INFORMIXSERVER=rhinformixrd1tcp
export INFORMIXSERVER


Somehow when I printed the production sqlhosts the first line was cut off. So I added this to sqlhosts:
rhinformixrd1 onipcshm 10.0.0.162 rhinformixrd1

Now when I run oninit -i, I crash on the chunks. I'll write about that in the next post.

Tuesday, September 25, 2007

Sqlhosts File

Invalid value of DUMPDIR '/usr/informix/tmp' in onconfig file. Setting it to default value '/opt/IBM/informix/tmp'...08:48:24


I changed DUMPDIR in onconfig.std to '/opt/IBM/informix/tmp'.

IBM Informix Dynamic Server Started.
oninit: DBSERVERNAME 'rootdb' not in sqlhosts file or sqlhosts file contents
are damaged.


Sqlhosts file is located at '$INFORMIXDIR/etc/sqlhosts'.

I added this, but I'm 99% sure it is wrong:
rootdb onipshm on_hostname on_servername

Initializing the DB and Editing 'onconfig.std'

This morning I'm going to get the database engine initialized, and make the necessary changes to onconfig.std. My goal is to document all these changes so that in the future I don't have to do it onesy-twosy.

To initialize the engine:
# oninit -i

The first error message is: INFORMIXSERVER does not match DBSERVERNAME or any of the DBSERVERALIASES. Apparently, I have neither a $INFORMIXSERVER set as a global variable nor a DBSERVERNAME set in the onconfig.std.

Set the environment variable
# INFORMIXSERVER=rootdb
# export INFORMIXSERVER
# echo $INFORMIXSERVER
rootdb

Edit the onconfig.std
DBSERVERNAME rootdb # Name of default database server