Setting Up Your Account for the Informix Server


We will assume that you are using the C-shell. If you are using another shell, then this may have to be appropriately modified.

Add to your .cshrc file the following:

setenv INFORMIXSERVER  onlinix
setenv INFORMIXDIR  /local/apps/informix
setenv INFORMIXSQLHOSTS /local/apps/informix/etc/sqlhosts.cs
setenv ONCONFIG onconfig.cs
setenv  LD_LIBRARY_PATH $INFORMIXDIR/lib:$INFORMIXDIR/lib/esql
setenv PATH ${PATH}:$INFORMIXDIR/bin
The last line extends your PATH environment variable to include $INFORMIXDIR/bin (where the DB engine is located). Thus, this should be placed after any line that initializes the PATH variable.

In addition, as we will be writing servlets, you will need to add or extend some Java related environment variables. The following has worked recently:

setenv CLASSPATH /local/apps/Java/InformixJDBC-2.1/lib/ifxjdbc.jar:.
setenv CLASSPATH ${CLASSPATH}:/local/apps/Java/jdk-1.2
setenv CLASSPATH ${CLASSPATH}:/local/apps/Java/jsdk-2.0/lib/jsdk.jar
setenv JAVA_HOME /local/apps/java
setenv PATH /local/apps/Java/j2sdk-1.4.0/bin:$PATH
It's possible that not all of this is necessary. It is also possible that this will soon change. Note that the jsdk is the java servlet development kit

New settings The following settings are probably better (when these are fully verified, they will replace the ones above).

setenv INFORMIXSERVER  onlinix
setenv INFORMIXDIR  /local/apps/informix
setenv INFORMIXSQLHOSTS /local/apps/informix/etc/sqlhosts.cs
setenv ONCONFIG onconfig.cs
setenv PATH ${PATH}:$INFORMIXDIR/bin
setenv CLASSPATH /local/apps/Java/InformixJDBC-2.1/lib/ifxjdbc.jar:.
setenv CLASSPATH ${CLASSPATH}:/local/apps/Java/jdk-1.2
setenv CLASSPATH ${CLASSPATH}:/local/apps/Java/jsdk-2.1/server.jar
setenv CLASSPATH ${CLASSPATH}:/local/apps/Java/jsdk-2.1/servlet.jar
setenv JAVA_HOME /local/apps/java
setenv PATH /local/apps/Java/j2sdk-1.4.0/bin:$PATH


Direct Access to the Engine with SQL


Easy access to a database is obtained by using the DBaccess utility. You need not be on an X-windows display (but see warning below), so this is something that can be done while dialing in from home.

To invoke it, simply type dbaccess. Its use is slightly self-explanatory. You can choose a command by moving to it using a left or right arrow key and then hitting return or by typing the capital letter in the command name (usually the first letter). Moving up menu trees can be done by typing e(xit), ESC, or control-C, depending on the context.

DBaccess allows you to create your own database, create tables in that database, and populate your tables with values. There is some redundancy in that certain actions can be done several ways. For example, creating a table can be performed by the Create command under the Table menu in DBaccess, or it could be done by running the CREATE TABLE command in SQL.

SQL can be run under the Query-language command. A primitive editor is invoked. Commands can also be written in a file and then read in by DBaccess. SQL commands must end with semi-colons.

When you create your own databases, be sure to include your login name (or some obvious modification) in the database name. We will drop any databases we find which do not seem connected to the class. Also, you will be asked which dataspace your database should belong to. (For Informix, a dataspace is a collection of disk locations for table storage.) Do not create your database in the rootdbs dataspace. Put yours in the cis451dbs. Non-system oriented databases in rootdbs may be dropped.

Warning: DBaccess does not recognize certain terminal types, such as dtterm. To determine your type, execute echo $TERM. You can change it manually by setenv TERM vt100 or setenv TERM xterm



Documentation Web Links


The documentation is available on the web. Particularly useful are the DB-Access User Manual, the Informix Guide to SQL: Tutorial, and the Informix Error Messages



Monitoring the Informix Server


The best way to monitor the system is via the onstat utility. The simplest version, onstat -, gives you a banner indicating its state: On-Line, Quiescent, Shutting Down, or Off-Line. The first is the only good state for you. If it's Quiescent, we've probably taken it down for maintanance. If Off-Line, we may not know it has gone down. The message log (onstat -m) may say whether it's crashed.

There are many onstat flags. Try onstat -- to see all possible flag options. Alone, onstat is equivalent to onstat -up. See the Quick Reference Guide for commonly used flags, or chapter 33 of the Administrator's Guide in the documentation for more details.

The utility onmonitor can also be used to monitor the system. It provides a simple DBAccess-style menu interface.

Monitoring can (so far) be done only while on ix.