IDS license revenue grew by double digits in the first half of 2006
Administrating and Developing with Informix
The Q2 numbers are in and Informix Dynamic Server experienced another large increase in revenue to build on the growth of Q1. As usual the details are not released publicly but I am officially allowed to say, and I quote..
IDS license revenue grew by double digits in the first half of 2006
Please note the new Flash Alert on the IDS Support website reporting security vulnerabilities addressed in the recent interim releases of Informix Dynamic Server.
The end results of an investigation by Next Generation Security Software (NGSS), who provided IDS Tech Support and Development sufficient time to fix all the issues they found before making any announcements, are tested and toughened interim releases of IDS across all current code branches (7.31, 9.40, 10.0). Upgrading to the latest interim is, needless to say, recommended.[Read More]
Back in May I mentioned there may be a tech fair in Menlo Park later this year. I was a few miles out but if you're based in the California Bay Area mark your calenders for September 14th - the Bay Area Informix Tech Fair is going ahead in San Jose. This is an opportunity to spend a day learning about Informix topics from Advanced Support and Development engineers and meet other Informix users in the area. If you'd like to attend or have questions please RSVP..
FREE Informix Tech Fair
IBM Informix Advanced Support & Development Speakers:
Ajay Gupta, Guy Bowerman, Joaquim Zuzarte, Santosh Sajip, Suma Vinod,Vijay Lolabattu
Come and see demos integrating several application technologies.
Having a problem or question about Informix? Talk to an engineer and get free advice about your specific issue. Time is limited.
WHEN: September 14, 2006 9:15am - 4:30pm
4400 N 1st St, Suite 100
San Jose, CA 95134
A while back I briefly discussed how to set up High-Availability Data Replication (HDR) on a single Windows machine for testing purposes. One of my compadres has just written a much more in-depth guide to doing this which was published today - see: Setting up HIGH AVAILABILITY DATE REPLICATION (HDR) on a single installation of IBM Informix Dynamic Server on Windows.
If you prefer to do your HDR testing on UNIX try this older article instead: Setting up HIGH AVAILABILITY DATA REPLICATION (HDR) and ENTERPRISE REPLICATION (ER) on a single installation of IDS 9.40 for testing purposes.[Read More]
Received a speaker marketing kit for the IDUG 2006 Conference in Vienna today so now might be a good time to post a flyer for it. Note there is a chance to win a free registration on the website.
There's a diverse range of sessions listed. I'm signed up to deliver five presentations - IDS Internals for Windows, Application Performance, and three talks on Informix and Java - JDBC, JSP and J/Foundation - what was I thinking?
Conference aside, it's always a pleasure to take in some Austro-Hungarian architecture and a litre or two of Gold Fassl.[Read More]
A few months ago I logged a bug requesting that Solano be documented.
Solano has been in Informix Dynamic Server since around 9.30 and is the best IDS feature that no-one has heard of. (Ok there may be lots of better features no-one has heard of but lets not get bogged down in epistemology.) I wasn't holding my breath since I didn't provide a business case or customer request, just the argument that it's a potentially useful feature people should know about.
When a new interim version of IDS is released I'm sure the first thing you do is check the Documentation Notes for the J/Foundation Developer's Guide right? but for some reason I only just noticed that a reference to Solano makes an appearance in the 10.00.xC5 docnotes...
Dynamic Server has the ability to host a JAVA application server, such as an EJB container or custom HTTP server,within the database server by using a Solano-style database server connection string. For example:
So what does that mean?
It means that you can use Krakatoa (aka J/Foundation) to run a Java application that doesn't return, such as a webserver or application server, inside IDS. For example if you define a Java method that launches your app server and map it to a user defined routine, you can execute that routine to start the server and the application can listen on its own port, running in the IDS address space, and make internal database connections to the database of its choice. Another method (or the same one with a different argument) can be mapped to shut the server down.
This may not appeal to application developers used to the 3 tier client - app server - db server model but in some circumstances it can be useful. For one thing network overhead between the application server and data server is eliminated. Deployment can be simplified; you can write a self-contained application that can be installed by running an SQL script, rather than relying on installing and maintaining a third party application server. Security can be improved, for example you could reduce possible attack vectors by disabling socket connections into the data server and having all database access go via the Solano application which makes internal database connections. The most obvious disadvantages to this kind of application would be that you may not want to write your own application server, and having all your client network connections going to the data server may not fit your performance model, scalability is untested as far as I know.
At this point I should probably come up with some example code to show how this works, and contribute to the official documentation to make it more expansive. Will endeavour to do both of these in the near future.[Read More]
Was pleased to find another Informix blog, the Unofficial oninit blog.
You might want to learn some Japanese before reading it though. Being somewhat linguistically challenged I didn't understand much, but I understand a gargoyle saying "GA-HA-HA!!" when I see one. Or is that an Onigawara..
Update 7/20/06: I get it now, it's a Shisha![Read More]
Here's a 3rd revision of an ESQL/C script for Cygwin GCC on Windows. It's a bit neater with a case statement and some basic error checking thanks to some feedback from Jonathan Leffler. His feedback went much further in error checking, including calling an ESCAPE routine, for which he provided the source. For now I've left it as a standalone script with limited error checking but accept that a more production-ready version should have better error checking. If you're curious about the ESCAPE code, Jonathan will shortly be uploading it to IIUG.
This version adds support for some more ESQL/C arguments, and makes it easier to add new ones as required.
if [ $# -lt 2 ] ; then echo "$USAGE" exit 1fi
if [ -z $INFORMIXDIR ] ; then echo INFORMIXDIR not set exit 1fi
for i in "$@"do case "$i" in -ansi|-thread|-n|-nowarn) # pass some flags to pre-processor ECFILES="$ECFILES $i";; *\.ec) # select .ec file arguments for pre-processing BASE="$(basename "$i" .ec)" CFILES="$CFILES $BASE.c" ECFILES="$ECFILES $i";; *) OTHERARGS="$OTHERARGS $i";; # other arguments go to compiler esacdone
# pre-process .ec fileseval esql -p $ECFILES || exit 1
# pass processed files to compilereval $CC -I$INFORMIXDIR/incl/esql $CFILES $OTHERARGS \ $INFORMIXDIR/lib/isqlt09a.lib $INFORMIXDIR/lib/igl4n304.lib \ $INFORMIXDIR/lib/iglxn304.lib $INFORMIXDIR/lib/igo4n304.lib -mno-cygwin
There have been a few new Informix developworks and support articles in the last month or three. Here are my favourites:
Update (7/10/06): Latest version here.
Here's an improved script to compile ESQL/C programs in a Windows Cygwin environment using GCC. This one takes multiple arguments such as .ec, .c, .lib files, and handles the -ansi, -n, -nowarn, -o and -thread options. It doesn't handle all ESQL/C specific arguments, though it would be easy to adapt it to handle most of them. If no -o option is specified the output executable name will be the basename of the first argument if it is an ec file or otherwise it will be a.exe.
Q. How do you build an esql/c program on Windows without using the Microsoft Visual Studio compiler?
Jonathan Leffler recently posed this challenge, and here's one possible solution using Cygwin GCC..
2. Compile the .c file using gcc, specifying the Client SDK link libraries.
Here's an example Cygwin shell script that takes a .ec filename (without the extension) as an argument and creates an executable:
esql -p $1.ecgcc -o $1.exe -I$INFORMIXDIR/incl/esql $1.c $INFORMIXDIR/lib/isqlt09a.lib \ $INFORMIXDIR/lib/igl4n304.lib $INFORMIXDIR/lib/iglxn304.lib \ $INFORMIXDIR/lib/igo4n304.lib
It generates some syntax warnings for sqlproto.h but the resulting executable appears to work fine. The executable will have a dynamic dependancy on the cygwin1.dll file. This dependancy can be avoided by statically linking the cygwin library using the -mno-cygwin switch, e.g.:
esql -p $1.ecgcc -o $1.exe -I$INFORMIXDIR/incl/esql $1.c $INFORMIXDIR/lib/isqlt09a.lib \ $INFORMIXDIR/lib/igl4n304.lib $INFORMIXDIR/lib/iglxn304.lib \ $INFORMIXDIR/lib/igo4n304.lib -mno-cygwin
This example has plenty of room for improvement. Is anyone already doing this? Any suggestions for a better version of the above script?
Update (7/10/06): Latest version here.
If you have a Windows domain installation of Informix Dynamic Server, and there are a large number of trusted domains in your network, connecting to IDS with a non-existant user it can take a long before the expected -951 error is returned. This happens because the Windows API function to lookup the account name can check all trusted domains if a domain name is not specified. The larger the domain forest, the longer the failed connection can take.
This problem has been logged as APAR 34657782 and it should be fixed very shortly. A workaround is to always fully qualify the user name by specifying domain\username at connection time.
Random grainy cellphone snap of the day:
Roppongi at night[Read More]
gbowerman 100000B5T0 2,418 Views
Spending a week in Tokyo assisting with a competitive migration along with a colleague from Development. Being in a new place makes me snap-happy so expect some poor photography..
Random grainy cellphone snap of the day:
A view from the IBM office in the Shibuya district, with the high rise Shinjuku district in the distance.
The first post to this blog was a minimalist tutorial on setting up a JDBC connection pool with Tomcat, but until now I hadn't looked into implementing a connection pool for a standalone JDBC application.
The Informix JDBC driver comes with a connection pool demo that compares connection times for a series of pooled and non-pooled connections. In order to get it to work I had to get hold of the following JNDI jar files and include them in my CLASSPATH: jndi.jar, providerutil.jar, fscontext.jar.
The Informix connection pool demo is a good way to see the benefits of connection pools, but I find the code, which involves three separate data source properties files, a little difficult to follow. Having the attention span of a drunk hoverfly means I need tutorials and examples to show me the minimum information necessary, then I might just comprehend before I lose interest.
Here is a minimalist guide to implementing and using a standalone JDBC connection pool for Informix Dynamic Server (IDS). It makes the assumption that you already have IDS and JDBC installed and working together.
1. Create a connection pool data source properties file.
Here is an example file called myCPDS.prop - change properties as needed:
IFMX_CPM_MAX_CONNECTIONS = -1IFMX_CPM_INIT_POOLSIZE = 0IFMX_CPM_MIN_POOLSIZE = 8IFMX_CPM_MAX_POOLSIZE = 80IFMX_CPM_SERVICE_INTERVAL = 100IFMX_CPM_AGELIMIT = 7200IFMX_CPM_MIN_AGELIMIT = 3600
2. Create and register a data source and a connection pool data source
This example, regcp.java, creates and registers a data source called myDS.
import java.io.*;import javax.naming.*;import com.informix.jdbcx.*;Note that Context.PROVIDER_URL was set to a Windows style directory - on UNIX you'd set this to a UNIX-friendly path.
3. Write code that uses the connection pool
This program gets one connection from the (pooled) data source and then disconnects.
import java.sql.*;import javax.sql.*;import javax.naming.*;
Once this is working, connections can be opened and closed at will, which causes connections to be taken from and added to the pool. See the IBM Informix JDBC Programmer's Guide for further information.
One word of caution, make sure your PROVIDER_URL directory is secure as binding information is stored there. If you don't want your password in this file, don't put your username and password in the .prop properties file, but specify them at connection time by calling ds.getConnection() with user and password arguments.[Read More]
The dbaccess user interface might not have changed much since the invention of the abacusbut it's very flexible when it comes to running scripts. For example to execute a file containing SQL commands against a database called mydb:
dbaccess mydb sql_file.sql
Or if the SQL commands already include a database connection statement:
dbaccess - sql_file.sql
If you wish to enter SQL statements interactively without the menu, enter
dbaccess - -
Suppose you want to integrate a series of SQL statements within a UNIX shell script or Windows batch file. A simple method would be to pipe commands one at a time into dbaccess, e.g.:
echo select col1 from tab1 | dbaccess mydb
Or you could chain a series of SQL statements together to send to dbaccess. This is a typical methodwe'd use to create a self-contained bug reproduction. An engineer can then reproduce the problem byexecuting the shell script.
Here's a UNIX shell script that creates a database, inserts data, queries a table, and drops thedatabase:
#!/bin/shdbaccess - <<EOFcreate database test;create table t1(col1 serial, col2 char(20));insert into t1 values(0, "hello");select * from t1;close database;drop database test;EOF
Can this be done with a Windows batch file? Yes.
Here's the equivalent batch file:
echo create database test; ^create table t1(col1 serial, col2 char(20)); ^insert into t1 values(0, "hello"); ^select * from t1; ^close database; ^drop database test | dbaccess -Although it lacks the power of UNIX shells I can't help enjoying the simplicity of the Windows command language - 10 commands are easy to remember.
While I'm on the subject of integrating shell scripts with SQL, it's worth mentioningMarco Greco's Structured Query Scripting Language (SQSL). An open source project that provides a method of integrating SQL statements withreporting and formatting commands.[Read More]