 |
The rise of 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
Categories
: [ sales ]
Aug 02 2006, 07:20:13 PM EDT
Permalink
|
Important security fixes announced
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.
Categories
: [ security ]
Jul 31 2006, 06:58:21 PM EDT
Permalink
|
Bay Area - Informix Tech Fair - Free!
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
September 14, 2006
Topics:
- IDS 10.00 Features
- Application Development
- High Availability Data Replication (HDR)
- SQL Optimizer
- Much more..
IBM Informix Advanced Support & Development Speakers:
Ajay Gupta, Guy Bowerman, Joaquim Zuzarte, Santosh Sajip, Suma Vinod,
Vijay Lolabattu
Technology Demos
Come and see demos integrating several application technologies.
Free Consulting
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
WHERE:
Directions
COST: FREE
RSVP: sumam@us.ibm.com
Categories
: [ conference ]
Jul 28 2006, 08:16:09 PM EDT
Permalink
|
Plug for IDUG EU 2006
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.
Categories
: [ conference | idug ]
Jul 18 2006, 06:07:33 PM EDT
Permalink
|
Solano is Documented!
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:
jdbc:informix-direct:/stores_demo:user=user;password=passwd;
If you use a Solano-style connection string, a Java UDR can run in the data server and communicate with both the
database server and its own client connections (for example by listening on a port and communicating with web
browsers). This can lead to performance benefits and greatly extends the functionality of Dynamic Server.
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.
Categories
: [ java | krakatoa | solano ]
Jul 12 2006, 07:40:18 PM EDT
Permalink
|
Unofficial oninit blog
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!
Categories
: [ blog ]
Jul 10 2006, 07:28:36 PM EDT
Permalink
|
ESQL/C script for Cygwin GCC - final
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.
#!/usr/bin/sh
CC=gcc
OTHERARGS=
CFILES=
ECFILES=
USAGE="Usage: esql script for gcc on Windows, use this like esql.exe.."
if [ $# -lt 2 ] ; then
echo "$USAGE"
exit 1
fi
if [ -z $INFORMIXDIR ] ; then
echo INFORMIXDIR not set
exit 1
fi
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
esac
done
# pre-process .ec files
eval esql -p $ECFILES || exit 1
# pass processed files to compiler
eval $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
Categories
: [ cygwin | esql | gcc | windows ]
Jul 10 2006, 07:10:52 PM EDT
Permalink
|
Review of recent Informix developerWorks articles
There have been a few new Informix developworks and support articles in the last month or three. Here are my favourites:
Web development
Other application development
IDS engine/migration
Categories
: [ apache | java | linux | php | xa ]
Jul 05 2006, 06:14:43 PM EDT
Permalink
|
Improved Windows ESQL/C script for GCC
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.
#!/usr/bin/sh
CC=gcc
for i in $@ ; do
# handle '-ansi' argument
if [ $i = "-ansi" ] ; then
ECFILES="$ECFILES $i"
# '-thread' multi-threading support
elif [ $i = "-thread" ] ; then
ECFILES="$ECFILES $i"
# '-n' suppress logo display
elif [ $i = "-n" ] ; then
ECFILES="$ECFILES $i"
# handle '-nowarn' argument
elif [ $i = "-nowarn" ] ; then
ECFILES="$ECFILES $i"
# other arguments starting with '-' will go to CC
elif [ ${i:0:1} = "-" ] ; then
OTHERARGS="$OTHERARGS $i"
# select .ec file arguments for pre-processing
else BASE="`basename $i .ec`"
if [ $BASE != $i ] ; then
CFILES="$CFILES $BASE.c"
ECFILES="$ECFILES $i"
if [ $i = $1 ] ; then
EXEFLAG="-o $BASE.exe"
fi
else OTHERARGS="$OTHERARGS $i"
fi
fi
done
# pre-process .ec files
esql -p $ECFILES
# pass processed files to compiler
$CC $EXEFLAG -I$INFORMIXDIR/incl/esql $CFILES $OTHERARGS \
$INFORMIXDIR/lib/isqlt09a.lib $INFORMIXDIR/lib/igl4n304.lib \
$INFORMIXDIR/lib/iglxn304.lib $INFORMIXDIR/lib/igo4n304.lib -mno-cygwin
Categories
: [ esql | windows ]
Jun 28 2006, 02:52:49 PM EDT
Permalink
|
Compiling ESQL/C programs on Windows using GCC
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..
1. Pre-process the .ec file using esql.exe with the -p option to pre-process only.
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.ec
gcc -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.ec
gcc -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.
Categories
: [ esql | windows ]
Jun 20 2006, 11:13:32 PM EDT
Permalink
|
Connecting with an invalid username can be slow on Windows
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
Categories
: [ windows ]
Jun 20 2006, 07:52:56 PM EDT
Permalink
|
Notes from Shibuya
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.
Jun 19 2006, 11:42:27 AM EDT
Permalink
|
Informix JDBC Connection Pool - a minimalist tutorial
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 = -1
IFMX_CPM_INIT_POOLSIZE = 0
IFMX_CPM_MIN_POOLSIZE = 8
IFMX_CPM_MAX_POOLSIZE = 80
IFMX_CPM_SERVICE_INTERVAL = 100
IFMX_CPM_AGELIMIT = 7200
IFMX_CPM_MIN_AGELIMIT = 3600
INFORMIXSERVER = myserver
USER = informix
PASSWORD = mypasswd
DATABASE = stores_demo
IFXHOST= mymachine
PORTNO = 1526
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.*;
public class regcp {
public static void main(String[] args)
{
try {
// Initialize context for datasource registry
System.setProperty(Context.INITIAL_CONTEXT_FACTORY,
"com.sun.jndi.fscontext.RefFSContextFactory");
System.setProperty(Context.PROVIDER_URL, "file:c:/temp");
Context registry = new InitialContext();
// create a new connection pool data source, read the properties file
// and bind it to a name
IfxConnectionPoolDataSource cpds = new IfxConnectionPoolDataSource();
FileInputStream cpdsPropFile = new FileInputStream("myCPDS.prop");
cpds.readProperties(cpdsPropFile);
registry.rebind("myCPDS", cpds);
System.out.println("Connection Pool Data Source myCPDS registered.");
// create a new datasource and set the name to the connection pool
// datasource name
IfxDataSource ds = new IfxDataSource();
ds.setDataSourceName("myCPDS");
// bind a name to the datasource and it is ready to use
registry.rebind("myDS", ds);
System.out.println("Data Source myDS registered.");
}
catch(Exception e)
{
System.out.println("Exception: " + e.getMessage());
}
}
}
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.*;
public class doconnect {
public static void main(String[] args)
{
try {
// initialize context and look up datasource
System.setProperty(Context.INITIAL_CONTEXT_FACTORY,
"com.sun.jndi.fscontext.RefFSContextFactory");
System.setProperty(Context.PROVIDER_URL, "file:c:/temp");
Context initCtx = new InitialContext();
DataSource ds = (DataSource) initCtx.lookup("myDS");
// now start getting connections from the connection pool
Connection con = ds.getConnection();
if (con != null) System.out.println("Connection established");
// do work here...
// "closing" a connection sends it back to the pool
con.close();
}
catch(Exception e)
{
System.out.println("Exception: " + e.getMessage());
}
}
}
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.
Categories
: [ java ]
Jun 14 2006, 07:42:47 PM EDT
Permalink
|
Scripting Dbaccess
The dbaccess user interface might not have changed much since the invention of the abacus
but 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:
If you wish to enter SQL statements interactively without the menu, enter
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 method
we'd use to create a self-contained bug reproduction. An engineer can then reproduce the problem by
executing the shell script.
Here's a UNIX shell script that creates a database, inserts data, queries a table, and drops the
database:
#!/bin/sh
dbaccess - <<EOF
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;
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 mentioning
Marco Greco's Structured Query Scripting Language (SQSL). An open source project that provides a method of integrating SQL statements with
reporting and formatting commands.
Categories
: [ dbaccess | unix | windows ]
Jun 09 2006, 06:03:47 PM EDT
Permalink
|
|
 |
|