text:
Today marks the entrance of a new developerWorks blog - IDS Experts.
IDS Experts is a team blog with contributing engineers from various worldwide Tech Support and R&D teams. There is no particular agenda though I anticipate articles will be mostly technical, given that engineers are involved. The blog is currently sporting a photo of a spotty cat - I wonder why that could be.
This is the first Informix specific team blog, so I'm interested to see where this goes. Set your browsers to http://www.ibm.com/developerworks/blogs/page/idsteam and keep an eye on it. Also take the opportunity to post comments, your feedback goes straight to Development and tech support.[Read More]
Administrating and Developing with Informix
Welcome IDS Experts blog
gbowerman 100000B5T0 2,529 Views
Using Perl with the Informix Dynamic Server - new article
Perl DBI support for IDS has been around for a while, but not too many articles about it, so it's a refreshing change to see the new developerWorks tutorial by Daniel Herbert called Using Perl with the Informix Dynamic Server, which covers setting up the Perl Database Interface (DBI) to work with IDS, CPAN module installation, driver installation, script automation, data structures, pitfalls, Perl interaction with IDS (including using BLOBs and CLOBs).
You need to sign-in to developerWorks to access the tutorial which is in the form of a PDF file.[Read More]
IDSAdmin unveiled
Today's Chat with the Labs - Improving IDS Administration Free Zone presented by John Miller III - went through the feature enhancements in IDS 11.10 to assist with administration such as the Scheduler, the Sysadmin database, SQL statement history and other new statistics, the new Admin UDRs task() and admin(), non-blocking checkpoints and more. In case you missed it the slides are here. The Informix Zone summary is here.
Cheetah - DB Scheduler and Root Dbspace
The DB Scheduler is a key new feature in IDS 11.10 which allows tasks to be scheduled and monitored. A potential problem is the default Sensors have a fairly aggressive monitoring rate in the current Beta which can cause the root dbspace to fill up on a busy system. It is likely that the default sensor settings will be tuned before Cheetah is GA.
This problem was the subject of a recent Cheetah Test Run Support Forum discussion. A few suggestions on how to avoid this problem were made..
Stopping the DB Scheduler
Shutting down the DB Scheduler means missing out on some very useful features but it is a reasonable temporary diagnostic strategy if you suspect it may be causing problems or if oncheck -pe shows the sysadmin database is filling up the root dbspace.
The recommended way to shut down the Scheduler is to use the task() routine..
database sysadmin;execute function task("scheduler shutdown");close database;Another method mentioned in the forum discussion was to create an empty file $INFORMIXDIR/etc/sysadmin/stop before starting IDS, which will prevent the Scheduler from starting. This method is not documented and not guaranteed to work in future versions.
Modifying the Scheduler to limit space consumption
Better than disabling the Scheduler altogether is to update the ph_task table of the sysadmin database to limit the amount of data that is collected. This example tells the Scheduler to delete data older than 4 times the collection frequency:
database sysadmin;update ph_task set tk_delete = (4*tk_frequency) where tk_type ='SENSOR';
Mirav's response to the forum question pointed out the relevant section of the 11.10 Admin Guide: Setting up Tasks which discusses setting up and monitoring Scheduler tasks.
On the subject of the sysadmin database - John Miller's Chat with the Labs is at 9am Pacific (5pm GMT) tomorrow (Wednesday Feb 28 2007) entitled Cheetah - Expanding the Administration Free Zone. Having had a sneak preview I can say it's definitely not to be missed.[Read More]
Japanese Informix blogs - now in English
gbowerman 100000B5T0 2,364 Views
I like reading Japanese Informix blogs as much as anyone, it's just too bad my browser displays them as question marks. Fortunately machine-translation is continuously improving. The following automatic translations from Japanese to English via Google Language Tools are quite readable:
Unofficial oninit blog - founded 2005/08 - the oldest Informix blog of any language?
Setnet32 - the antenna of setnet32
in4mix blog - the newest
Something I didn't know before but may be self-evident to Japanese people and polyglots is that Japanese days of the week are auto-translated to:
Sunday - Day Monday - MonthTuesday - FireWednesday - WaterThursday - WoodFriday - GoldSaturday - Earth
Looking into these translations a little further shows they have the same astronomical origins as most Indo-European languages including English, the weekdays of which we inherit from the Norse and Roman pantheons, and have a presumably much older common astro-theological origin. There is an interesting Astronomy FAQ which details the connections for some European languages and it corresponds nicely with this website: Japanese Days of the Week: the 'Seven Luminaries' which explains the links between the elemental forces of the Japanese day names to the same solar bodies as the Indo-European days, namely:
Sunday - SunMonday - MoonTuesday - MarsWednesday - MercuryThursday - JupiterFriday - VenusSaturday - SaturnWhere was I? Oh yes, Informix blogs. If anyone has links to other non-English Informix blogs please let me know so I can add them to the list.[Read More]
IDS Infocenter outage this weekend
gbowerman 100000B5T0 2,035 Views
Please note the server hosting the IDS Infocenter, which receives 10,000-14,000 hits per day, is scheduled to be down for a 12 hour maintenance window this weekend. The planned downtime will be some time between Saturday, February 24, 2007 at 17:00 Pacific (01:00 GMT) and Sunday, February 25, 2007 at 17:00 Pacific (01:00 GMT).
If you have Informix plans this weekend you might want to download the information you need in advance..[Read More]
AJAX Code Camp
Too bad this has already started, but it looks like a useful resource nonetheless: Ajax Code Camp - a free online class that describes itself as an 18 week training course, but in fact appears to be a 22 week course.
The class is written by San Shing, a technology architect at Sun, who puts the class material online in various formats as he writes. I read through Ajax Basics slides from week 1, a 65 slide PDF file with speaker notes which does a thorough job at explaining the fundamentals of AJAX.
It's good to see this much information presented in a class format made available for free. Note he is also asking for volunteers:
Jakarta Commons Fileupload 1.2 released
gbowerman 100000B5T0 Tags:  java tomcat apache 9 Comments 8,069 Views
My only criticism of the Apache Software Foundation is that they have so many projects going on it's hard to keep up, and every time I look at the website there are more. Apache software I have managed to get to grips with and like includes: HTTP Server, James Mail Server (useful for running the same mail server on Linux and Windows), SpamAssassin, Tomcat Servlet container, Derby (formerly known as Informix Cloudscape), Jakarta HTTP Components HttpCore (great for writing mini-servers) and Jakarta Commons FileUpload..
Announcing its presence in my inbox today was the news that Jakarta Commons Fileupload 1.2 has been released.
FileUpload is a useful component for uploading files via a Java web application into a database. For example if you're uploading a media file via a simple HTML form like this:
<form action="fileupload.jsp" method="post" enctype="multipart/form-data"> <input type="file" name="docfile"/> <input type="submit" value="Upload"/></form>
The form will upload the file as a binary stream.
The following JSP code shows an example of using FileUpload to read this stream into a form that can be inserted into an IDS BYTE column. All this sparsely commented code does is get the uploaded file as a FileInputStream object and then use the JDBC SetBinaryStream() method to bind it to the SQL insert statement...
Update 2/22/07: This example has been updated to use ServletFileUpload and DiskFileItemFactory (see lines in bold) instead of DiskFileUpload which was being used before thanks to a comment from Stephen Brand who pointed out that DiskFileUpload is now deprecated due to a memory leak. Thanks Stephen.
<%@ page import="java.sql.*,java.util.*,java.io.*" %> <%@ page import ="org.apache.commons.io.output.*" %> <%@ page import ="org.apache.commons.fileupload.*" %> <%@ page import ="org.apache.commons.fileupload.servlet.*" %> <%@ page import ="org.apache.commons.fileupload.disk.*" %>
Update 3/19/07: See the comments section for a complete working FileUpload example from Kane - thanks Kane.
The new features in FileUpload version 1.2 include a Streaming API which offers improved performance for dynamically processing streams.[Read More]
Memory leak in IDS 10.00.xC6 with workaround
gbowerman 100000B5T0 Tags:  troubleshooting 1 Comment 5,550 Views
If you have installed IDS 10.00.xC6 you need to be aware of this potential memory leak connected with the Virtual Processor Memory Caches feature. I first learnt about this problem via a very informative comp.databases.informix post by Alexey Sonkin which I'll quote some of:
It turned out, the problem was introduced by the new functionality:'Private Memory Caches for Virtual Processors'.This functionality is targeted for Cheetah, but is introducedin 10.0xC5... By mistake, the new functionality is turned 'on' by default.This functionality allows IDS to allocate large blocks of memoryto private VP caches...
To disable this functionality, one can set the new$ONCONFIG parameter VP_MEMORY_CACHE_KB to 0 and restart IDSor do it online with 'onmode -wf VP_MEMORY_CACHE_KB=0'
Most probably, IBM will fix this very shortly.
To reproduce the problem, one can do the following:------------- CREATE ANSI-MODE DATABASE and connect-----
set isolation to dirty read;set lock mode to wait 5;
create function str2list(str lvarchar,separator char default ',')returning list(lvarchar not null);define lst list(lvarchar not null);define dummy lvarchar;if separator = ',' thenlet dummy = 'list{'||str||'}';elselet dummy = 'list{'||replace(str,separator,',')||'}';end if;let lst = dummy;return lst;end function;commit;
create procedure test_spl();define i int;define lst list(lvarchar not null);for i in (1 to 1000000)let lst = str2list('1,2,3,4,5,6,7,8,9');end for;end procedure;commit;
execute procedure test_spl();commit;------------------------------------------
This block would cause a 200-MB memory leak...Actually, the problem might also exist in 10.00.xC5
As far as I remember the VP Memory Cache feature was undocumented in xC5 and switched off by default. If anyone has tested this in xC5 please comment. If you'd like to discuss this problem with Tech Support you can quote defect CQ132429 (I'll update this post with the APAR number when it is published). Not surprisingly the defect has been tagged with a "fix immediately" priority. In the meantime use the workaround of setting VP_MEMORY_CACHE_KB to 0 to switch it off - or set it to a sensible value to take advantage of the feature.
Update 2/20/07: See the comment JC has added to this post for a detailed explanation of how the VP Memory Cache feature works, and a description of the scope of the problem (which does not occur on Windows) - the main point is that this is only a problem when VP_MEMORY_CACHE_KB is not set.[Read More]
Cheetah als Beta erhältlich
The Cheetah open beta has been picked up by some of the German news tickers. Notably
Heise Online - Informix 11 als Beta-Version erhältlich, and
Linux Enterprise - 'Cheetah' - integrierte Lösung für IBMs Informix Dynamic Server.
Thanks Alexander and Eric for mentioning these. Now I wish I'd paid more attention in German lessons at school. Sorry Miss Jarvis.
The English language press release has been picked up by around 20 news sites at the time of writing.[Read More]
Highlights from the Cheetah Open Beta Workshop in Munich
Alexander Koener reports from the Cheetah Open Beta workshop in Munich today...
The agenda started at 10 am and ended around 5:30 pm. Most of the attendees stayeduntil the end of the event. Only a handful people dropped out due some business appointments.
All (!) of the attendees returned the provided feedback forms and although we haven't done anyformal review of the feedback forms yet, an initial scan of the results have been very positive!!! :-)
During the workshop we distributed custom made CDs, thanks to Michael Koester with either the Windows or the Linux 32-bit version of the official Cheetah open beta plus additional IDS related material like Redbooks, white papers, case studies etc. We run out of the prepared 40 CDs in a few minutes...
Throughout the workshop the participants had the chance to put their hands on prepared VMWare SLES 10 images which had the official open beta installed plus a few simple exercises to get to know some of the new features.
Due to the great success of that first workshop we are planning to deliver additional workshops in Q2in different locations of Germany.
Thanks for the report Alexander, and I like the CD's.[Read More]
Cheetah Beta / Download / Forum sites are LIVE
Thanks for your patience...
The Cheetah Beta site is now working: http://www-306.ibm.com/software/info/ids/cheetah/ - and so are the beta downloads: https://www14.software.ibm.com/webapp/iwm/web/preLogin.do?lang=en_US&source=swerpsw-idscob3.
Go on, try it. Also a new forum has been set up for Cheetah test run support: http://www-128.ibm.com/developerworks/forums/dw_forum.jsp?forum=1071&cat=19.
Check out Fernando Nunes' blog for a comprehensive summary of the many new features: http://informix-technology.blogspot.com/2007/02/cheetah-in-wild.html.[Read More]
Announcing Informix Magazine
gbowerman 100000B5T0 2,154 Views
Today is turning into a good day for announcements...
Brought to you from Hagenau, France a new Web magazine has arrived: Informix Magazine. A Joomla! based creation, powered by IDS Cheetah, Hibernate and Java, Informix Mag describes itself as
..focusing on Informix Technology on products like IDS (Informix Dynamic Server), Informix 4GL (I-4GL)..
Looking at today's page it has some news items, as well as a conglomeration of other Informix news feeds, a DBA Zone and a Developer Corner for job postings.
JGP, looks good, when you read this please comment and tell us more about the site...
Update: 2/14/07
Here are Jean Georges Perrin's comments, which I'll add directly to this post, thanks JGP...
InformixMag aims to be the central place for Informix information, offering news, etc. It is purely a news site, it won't have much unique and exclusive content, but I wish it to become the "Google for Informix information". We have a real web-based forum, where we hope to see people discuss the news in a more efficient manner, etc. You have plenty of different partners already providing banners, Alfatec from Croatia, MoreData from Portugal, famous Kazer. We don't want to "own" or steal content, just provide a convenient aggregation. We keep all copyright notices, and we are (soon) shortening long feeds, like yours :-). The project has been quite secret for a few months, released in a very early stage a few weeks ago, finding some partners has started last week. On the purely technical side, we have developed some technologies to aggregate the data from various places (including but not only RSS) and we are polishing the product and applying it in InformixMag. I'll talk about the product later. It's still alpha. We use a derived (or very extended) of Joomla, as you said, but the core of the data, is using Cheetah, Hibernate and Java…[Read More]
Cheetah Beta Documentation Online
The IDS Cheetah Beta documentation is now online at this location: http://publib.boulder.ibm.com/infocenter/idshelp/v111/- enjoy![Read More]
Cheetah Open Beta Begins
Yes, the cat is out of the bag...
Today IBM announced the Cheetah Open Beta. See this press release on MarketWire... IBM, AMD and Novell Team on Linux Offering for Informix Dynamic Server - Next Generation IDS "Cheetah" Enters Open Beta Testing..
ARMONK, NY -- (MARKET WIRE) -- February 14, 2007 -- IBM (NYSE: IBM) today announced that it is teaming with AMD and Novell to create an integrated Linux offering built around IBM's next generation Informix Dynamic Server (IDS) data server, code-named "Cheetah." IBM also revealed that Cheetah has now entered an open beta testing for customers and business partners.The new IBM Cheetah site referenced by the press release is here.. http://www.ibm.com/software/data/informix/ids/new Update: the site is now working!
I'd not heard of the Linux/Novell deal before, sounds interesting...
"IDS Cheetah's support for open source applications development combined with SUSE Linux Enterprise Server's high performance and reliability will allow us to deliver to customers a solution to maximize their application investments and to benefit from the vast application resources available," said Roger Levy, Novell vice president and general manager of Open Platform Solutions....The new IDS Cheetah Linux bundle is expected to be available through the ValueNet business partner program beginning in 2007. Specific terms on the program are being worked out and will be announced at product launch.Now the open Beta has begun, I'll be adding more posts during the day with download and forum links..
This is the IBM Media Relations site link to the press release.[Read More]
Cheetah - Expanding the Administration Free Zone
The latest Chat with the Labs has been announced on the Informix Webcasts site. This one, entitled Cheetah - Expanding the Administration Free Zone will take place at 5PM GMT (9am Pacific) on Wednesday February 28 and will include a detailed presentation of the enhanced administration features and interfaces in Cheetah.
Hear John Miller discuss the new features of the next release of IDS that lower the total cost ofownership by providing easy, scalable administration. Features such as SQL Tracing for detailedperformance monitoring, the open Admin API for custom administration and a built in database scheduler allow for an industrial strength, highly reliable environment. John is an IBM SeniorTechnical Staff Member who will be joined on the call by Jerry Keesee, Director of the Informix Lab.[Read More]
Unwinding the stack in 64-bit Windows
gbowerman 100000B5T0 Tags:  windows 2 Comments 5,523 Views
How do you use the Microsoft Win32 RtlVirtualUnwind() and RtlLookupFunctionEntry() functions to unwind a stack in a 64 bit Windows program?
These functions require different arguments between 32 and 64 bit Windows, and usage examples/documentation seem a bit thin on the ground. Another potential pitfall is that there appear to be some changes in exception handling documentation between Windows Server 2003 SP1 and R2. Here's an example WalkStack() function for AMD64 (also known as x86_64) shown in the context of a C program which walks its stack and prints frame information. Comments welcome.
[Read More]
IDUG North America Looms
gbowerman 100000B5T0 Tags:  conference idug iiug 1 Comment 4,816 Views
Yesterday was the last day to upload draft presentations for IDUG 2007 - North America (May 6-10), taking place in San Jose, home of the Museum of Quilts and Textiles, not to mention the largest collection of Egyptian artifacts in Western North America, allegedly. So far I have uploaded 1 out of 3 drafts, and in the spirit of prevarication am now writing about it rather than finishing the job.
Browsing the conference grid I see there are 4 separate Informix tracks and plenty of new material. It's reasonable to expect we'll be learning a lot more about Cheetah (IDS 11.10). There is an early bird discount available until March 23rd.
The IBM Information Management Technical Conference 21-25 May 2007 in Düsseldorf, birthplace of Altbier and Kraftwerk, in that order, is currently gathering papers. Early bird discount lasts until February 28.[Read More]
Informix versus DB2
gbowerman 100000B5T0 Tags:  db2 3 Comments 8,650 Views
Ever wondered how DB2 and Informix Dynamic Server architectures compare? Which major features they have in common and what separates them? What are the major editions and platform support between the two? These questions and more are answered in a new developerWorks article by Suma C Shastry, Mohan Kumar, Prasad Srinivasachar entitled How to go hand-in-hand with DB2 and Informix.
It looks like this article has been well-researched. Particularly interesting to me are the architecture diagrams, which include Architecture overview, Process Model, Memory model, Instance Architecture, Backup mechanisms, Security architecture, administration tools.[Read More]
Index Self-Join Explained
gbowerman 100000B5T0 Tags:  performance 3,423 Views
Fernando Nunes has added a detailed review of IDS 10.00.xC6 New Features to his Informix Technology blog over the weekend. The article includes an explanation of the new Index Self Join feature with an example of how to use it.
Index self Join is also described in the Informix Dynamic Server Performance Guide Documentation Notes.
The IDS 10.00.xC6 new features in summary are:
Links to the 10.00.xC6 Release notes: (UNIX),(Windows).[Read More]
Microsoft Virtual Server 2005 R2 first impressions
Microsoft Virtual Server is a useful way to create virtual Windows machines for testing and development and we use it in Support along with Vmware and CoLinux as the need arises. I use a Blade Server in the lab running Windows Server 2003 64-bit edition with some 32-bit guest operating systems on it, enabling both 64 and 32 bit support/development.
Recently I had to set up a virtual Windows Server 2003 R2 32-bit OS virtual machine on my XP laptop so downloaded Windows Virtual Server 2005 R2 from MSDN and tried installing it. As virtualization solutions go I'm fairly new to Virtual Server, having more familiarity with CoLinux, so this is very much a first impressions review.
Once configured and working, the Virtual Server guest operating systems that I have used have proven to be reliable. The installation and configuration parts however were less than pleasant. Since I'm willing to believe I made various mistakes (like not reading the documentation) I'll be happy to provide space to any Microsoft engineer who'd care to respond to this litany of misinformed rambling and correct errors. I've not tried setting up Vmware and would also be interested in comments on how that compares.
The Virtual Server installation proceeded smoothly until it warned me that Internet Information Services (IIS) was not present on the machine and hence it wouldn't be able to install the web administration component. I didn't really want to install IIS since Apache was running so continued with the installation. Once installed I couldn't find any way to administer Virtual Server without the web interface. I tried connecting from another Virtual Server machine which did have IIS installed but to no avail - possibly due to firewall or default IE security issues.
After this failure I uninstalled Virtual Server and installed IIS. Ever since this first installation my laptop starts an msiexec process and displays these Virtual Server install messages when I log in:
The startup messages continued after uninstalling Virtual Server, and reinstalling, and appear after booting to this day, whether I follow the instructions in the messages, cancel or just kill msiexec. I haven't been able to find where it is launched in the usual registry "Run" locations or Startup group as yet so for now I'm stuck with it.
Trying to ignore the annoying pop-up, I installed Virtual Server complete with web interface.
I hoped adding a guest operating system would be intuitive but had to resort to the Help screens. I needed to:
Not too bad once you get the hang of it, but there are some frustrating aspects to the process and the subsequent remote control of guest operating systems..
1. IE is the only browser which can access the administration interface. If the machine's default browser is not IE, the Virtual Server Administration Website link in the Startup menu will fail and you have to copy the URL into IE.
2. If the IE browser is running via a Remote Desktop, the mouse cursor mysteriously disappears during OS installation, making installation more challenging. Having got as far as creating and installing a virtual machine successfully the mouse behaviour continued to be erratic via Remote Desktop.
3. If you've downloaded operating system install images from MSDN, it makes sense to choose an ISO image as the virtual CD drive for the new machine. I tried installing Windows Vista, which requires 5 CD's, by defining the first CD ISO file as the CD drive. When it asked for the second CD, there was no browse button to get to the next ISO file, and the first file was open so couldn't be overwritten. Installation abandoned, I'll try the Vista DVD next time.
4. Perhaps due to the security restrictions in IE, there was no browse option when defining an ISO image as a CD drive, not even copy/paste worked (at least not via Remote Desktop), I had to type the path of the ISO in manually.
5. Toggling between remotely controlling a guest operating system in the browser and the rest of the machine is done by hitting the right ALT key. Determining this required searching the help pages. It would be good if there was a button or menu option for switching (preferably one which works via Remote Desktop as well) or perhaps it should just switch when the mouse is moved away from the remote control screen like VNC and Remote Desktop do.
6. By default there is no networking enabled when a new virtual machine is created and installed. With some searching I found some fairly brief instructions on setting up a Loopback adapter which explains the host OS part of the set-up but not the Virtual Server DHCP set-up. A bit of trial and error got the networking operational. It would be nice if there was a checkbox that could set up this basic level of host-guest interoperability, but I assume security restrictions in the IE interface would prevent the browser from being able to learn too much about the host operating system, let alone make changes to it.
7. Without networking, the only way to share information between the host and guest OS appears to be via the CD drive. I was unable to find any way to set up a shared disk drive.
8. When remotely controlling a Virtual Machine in the browser, it sometimes times out. Strangely this has happened while actively using the connection.
9. Deleting a virtual machine and its resources is hard work. There is no remove option to go with the Create/Add/Configure options for machines, networks, disks. I found a remove option under Configure if I switch the virtual machine off, but even then it tells me it will not remove the resources associated with it. How does one delete a virtual hard disk? Go and find the file and manually remove it?
Virtual Server has some powerful features and requires little maintenance once operational, but in its current version it appears to be hampered by its dependency on IIS/IE administration. Browser based administration does offer some distinct advantages, perhaps this concept would have worked better before all the security fixes in IE prevented it from being able to take too much control of a machine. It would also be nice to see it work with other browsers and web servers. An optional alternative administration method, such as a dedicated control program which could access the host's networking and hardware configuration and use it to make virtual machine configuration easier would be very welcome. Being able to create a virtual machine and have say a virtual network and Remote Desktop from the host working out of the box if you check the appropriate options would also be a nice to have.[Read More]
Informix 2006 Results
2006 was undoubtedly a good year for Informix with double digit revenue growth in the first 3 quarters of 2006. This trend continued in Q4 with another quarter, and hence year of double digit growth. To quote Cindy Fung, Worldwide IDS Product Manager: "We hit way out of the park in Q4".
IBM's official quarterly earnings report (which reports Information Management as a whole) is published here: http://www.ibm.com/investor/4q06/4q06earnings.phtml.[Read More]
Writing a SameTime bot
A chatbot (or chatterbot) can be a very useful way to interface with a database. You can program it to respond to human-like queries and return the data to the user's instant message client in a concise and friendly way.
IBM, not surprisingly, uses Lotus Sametime as its main internal instant message system. There is an easy to follow developerWorks article by John Rooney called Building your own Sametime bots, Part 1 which describes a simple Magic Eight Ball bot. After reading this last night I was inspired to download the latest Sametime Software Development Kit (SDK) and get to work.
The EightBallBot code makes use of a component of the Sametime SDK called (in its current version) the Sametime 7.5 Java Toolkit. To make the sample code work within our network required setting the correct login type, changing the server to our community server and the user/password to my id. To build the code simply add the Sametime Java Toolkit JAR files to the CLASSPATH and run javac.
Adding Database Connectivity
Once you have a working Java bot, the hard part is done. Adding Informix database connectivity is trivial. In my example I want to query a product defect by number. For example the user types an instant message like d 141592 and bot replies with a bug description. This is a prelude to a more fully featured bot which includes text search capability.
1. Import JDBC library
2. Implement the textReceived() method
The EightBallBot sample code implements the following method to read the query and send a reply:
public void textReceived(ImEvent e) { String botReply = "bot test: unrecognized command (please email if you were expecting a human)";Note the friendly unrecognized command default message at the beginning. Originally my test bot said "whatever" if it didn't recognize a command. Since it was logging into the SameTime network as myself, this turned out to be a bad idea. While testing I noticed a marketing manager was trying to reach me. Here's an anonymized version of the log:
Data ReceivedMessage: 'Hi Guy.' received from email@example.com - xxx xxxxxxx/Raleigh/IBMReply: whateverData ReceivedMessage: 'I assume that was meant for another window. ' received from firstname.lastname@example.com - xxx xxxxxx/Raleigh/IBMReply: whatever
Lesson: If you write your own bot make it talk nice, or create a new ID for it.
3. Implementing the query processing method
My prototype query processing method selects a defect abstract from the database. Additional syntax checking code has been removed for brevity..
public String processDefect(Connection conn, String defectNum) throws Exception { String reply = ""; String sqlStr = "select abstract from defect where defectid = '" + defectNum + "'"; System.err.println("SQL: " + sqlStr);That's all there is to it.
From a simple example like this the query parsing and JDBC code can get as complex as required. Most instant message networks support bot development. A while ago one of my colleagues wrote an Informix error message lookup bot for the AIM network which had plenty of usage. Adding database connectivity is simple as long as some kind of database API exists in the bot programming language.[Read More]
Ajax for Websphere Early program
If you do Websphere now might be a good time to get involved in the Ajax for IBM WebSphere Platform Early Program..
The early program release includes:
The package is available to download for the usual platforms, along with a getting started guide and information center.
If anyone tries integrating this with Informix I'll be interested to hear how it went.[Read More]
How to get Informix Dynamic Server, Client SDK, JDBC for free
The free download of IDS available from IIUG has been mentioned before, but based on some recent comp.databases.informix discussions three facts about this and other Informix downloads should be emphasized...
IDS Setup program not working on Windows
If you download and unzip the Windows platform version of IDS you'll see a directory structure like this:
binstallclusteritiifJRELAPLIThe binstall directory should be ignored, the setup program in there does not work with IDS-only bundles. Its presence in the bundle is a bug. The correct way to install IDS is to run iif/setup.exe.
Where to download the Informix Client Software Development Kit
The Informix CSDK is not included with the IIUG bundle but is free to download from IBM. You can find it from the IBM website by searching for:
informix client software development kit downloadAt the time of writing the download link is: http://www14.software.ibm.com/webapp/download/product.jsp?id=MCOS-5KCLJH&s=z&cat=&S_TACT=TrialsAndBetas&S_CMP - if this link doesn't work at some time in the future please let me know.
Where to download Informix JDBC drivers
Informix JDBC drivers are free to download from here: http://www14.software.ibm.com/webapp/download/product.jsp?id=MCOS-5MKKAB&s=z&cat=&S_TACT=%26amp%3BS_CMP%3D&S_CMP=
Use the latest where possible.
Thanks Bill64Bits for reminding me about these issues.[Read More]
Migrating Oracle PL/SQL to Informix SPL
gbowerman 100000B5T0 Tags:  migration 2 Comments 8,161 Views
The latest IBM Migration Toolkit (MTK), version 1.4.9 has some enhancements for migrating applications from Oracle to Informix. New features include support for migrating:
For an introduction to using MTK to migrate to Informix, see an earlier article by the same authors which covered MTK 1.4: Migrating to IBM database servers gets easier with the latest MTK release.[Read More]
Tbsupport scripts for UNIX and Windows
gbowerman 100000B5T0 Tags:  troubleshooting 3,224 Views
A script to gather information in the unlikely event that Informix Dynamic Server is hung has been available on UNIX for some time. The tbsupport.ksh script can be downloaded here: What to collect if Informix Dynamic Server gets hung.
Not long ago an equivalent Windows version called tbsupport.bat was published. The Windows version was updated at the end of 2006 to incorporate some additional Windows diagnostic commands such as msinfo32. The new Windows version can be found here: What to collect if Informix Dynamic Server gets hung on the Windows platform. Comments and suggestions for these scripts are always welcome.[Read More]
IDS Locking part II - developerWorks article
gbowerman 100000B5T0 Tags:  performance 3,066 Views
Back in September Eric Herber published a developerWorks article Informix Dynamic Server locking, Part 1: Understand locking behavior and analyze locking conflicts in IDS. Now I'm pleased to see part II is available.
The second part delves into dynamic lock allocation, lock wait time, deadlocks, and ways to analyze locking conflicts.
The lockwt utility
Bundled with the article is the ESQL/C source for a diagnostic program lockwt which reports each user session holding a lock and the session(s) waiting for this lock to be released. The article concludes with a description of the open cursor problem and how to solve it.[Read More]
Washington Area Informix Users Group Forum follow up
gbowerman 100000B5T0 Tags:  conference iiug 2,212 Views
Why post a follow-up to a conference I didn't attend? Because the Washington Area Informix Users Group Forum organizers always have the decency to make PDF files of the presentations available. 2006 presentations packed with useful technical information are downloadable here: http://www.iiug.org/waiug/present/Forum2006/Forum2006.html.
Having read the presentations you'll no doubt want to see who delivered them. Meticulously documented for the historical record are keynote and party photos, along with conference speakers/sponsors: 1, 2, 3, 4.
But what was it like to actually be there? For that we have Jean Georges Perrin's conference blog, which begins "I am enjoying a glass of Chateauneuf du Pape in the Air France VIP lounge at Dulles". Hmm, I wonder where he's from, I'm guessing England.
[Read More]
RFID Information Center - powered by Informix
IBM's WebSphere RFID Information Center - middleware for multi-company RFID supply chain applications - was announced recently. I first saw this technology demonstrated at the IOD conference last year and it looked impressive. Using Informix Dynamic Server as a data server it conforms to the Electronic Product Code Information Service (EPCIS) specification to guarantee secure and reliable data sharing, providing "a scalable, secure, and standards-based repository for data that the sensor network generates in the supply chain".
ComputerWorld has the following report: IBM pushing RFID data repository.
RFID Information Center can be downloaded Here.[Read More]
Catching up..
Thanks to the wonders of jet lag I'm in the office bright and early and catching up with some of the Informix content over the last two weeks...
Real-time Database Monitoring with PHP
Marty and Aron Lurie have published an intriguing developerWorks article DB2/Informix and open source: Database defense against the dark political arts - Real-time monitoring of your database for career enhancement. It includes PHP code which uses ODBC to monitor system tables to provide real-time database information. I see they managed to include a reference to the quasi-mythical Informix race-car..
Ruby/Informix 0.5.0 released
Gerardo Santana's Ruby extension for IDS continues its rapid development with the release of version 0.5.0. Download it from http://rubyforge.org/projects/ruby-informix/
0.5.0 12/27/2006------------------New features: * Easier to install * BigDecimal accepted for input parameters * BigDecimal used for instantiating DECIMAL and MONEY values * Cursor, Statement, Slob and Database accept an optional block that automatically frees resources after execution. Based on ideas and pseudo-code by Edwin Fine
Ruby on Rails/AJAX developerWorks Article
Continuing the Ruby theme Jack Herrington has written a database generic developerWorks article entitled Build Ajax into your Web apps with Rails Practical examples of how to use Ajax with Ruby on Rails. Worth a look.
Python Corner
Informix Zone has a new Python corner which kicks off with a tutorial from Carsten Haese on using a number generator to create a Fibonacci sequence. Part 2 promises a how-to on incorporating number generators with InformixDB.
Happy New Year![Read More]
Informix Driver for Ruby 0.4.0
A new version of Gerardo Santana's Ruby Driver for Informix is available.
From the release notes:
0.4.0 12/13/2006------------------New features: * Support for multiple connections to databases * Support for scroll cursors. Methods available: - [], slice - prev, next, first, last, current - prev_hash, next_hash, first_hash, last_hash, current_hash - slice!, prev!, next!, first!, last!, current! - slice_hash, prev_hash, next_hash, first_hash, last_hash, current_hash! - slice_hash!, prev_hash!, next_hash!, first_hash!, last_hash!, current_hash! * New Cursor#id method that returns the cursor name for use in update cursors
I'm off on my Christmas holidays, see you in the new year. Have a good one![Read More]
Informix on Playstation 3
gbowerman 100000B5T0 Tags:  performance 3 Comments 4,932 Views
What do you do with a $600 1/4 teraflop supercomputer?
Run Informix Dynamic Server on it of course...
One of our kernel performance engineers installed this IDS 10.00.FC1 for Power 5 (ppc64) instance directly on a PS3 to see what would happen, and it works just fine.
A nice project for a rainy day might be a PS3 specific IDS port to take advantage of the Linux programming model. Too bad the PS3 only has 256Mb RAM - but for applications with small data sets and large CPU requirements...[Read More]
File access rights on Windows
gbowerman 100000B5T0 Tags:  security windows 4 Comments 7,550 Views
Suppose you have some server code which needs to check whether a user has read or write access to a file...
A UNIX programmer might say: "Use stat() to get the file permissions and check them against the user and group id. I'm going to lunch. Don't wait up".
A Windows programmer on the other hand had better skip lunch and start coding.
Here are four possible ways to check whether a user has the requested access to a file on Windows. The first three use GetFileSecurity() to get a file security descriptor and varying methods toobtain the user's security credentials.
1. Use LogonUser to get a Token handle, and validate with AccessCheck()
If you have a Token representing a logged on user you can call the AccessCheck() functionto validate the user access rights against a file security descriptor. If your server code has the user's password and other credentials (not defined in the example code), you could get the Tokenusing LogonUser() (error checking removed for brevity). Assuming the desired access is encoded in the flags variable:
// desired access flags can be set to whatever you defineint flags = O_WRONLY;DWORD sdLen, dwAccessDesired = 0, dwPrivSetSize, dwAccessGranted;PSECURITY_DESCRIPTOR fileSD;GENERIC_MAPPING GenericMapping;PRIVILEGE_SET PrivilegeSet;BOOL fAccessGranted = FALSE;HANDLE hToken;I have found this to be the most reliable method of checking a user's file access rights, with thedisadvantage that your server needs to have the user logon details.
2. Use OpenProcessToken() to get a Token handle and validate with AccessCheck()
If you have the process ID, pid, of the user's front-end process you can avoid logging on by getting a handle to the token using OpenProcessToken() as follows (the rest of the code would be the same):
HANDLE hProcess, hMyToken;LUID luid;
One problem I've experienced with this method is that OpenProcessToken() can fail with Access Denied on some machines and not others. I have yet to identify the root cause.
3. Use GetEffectiveRightsFromAcl() with a user SID
One way to verify a user's access rights without a token is to get hold of the user SID using LookupAccountName() and call GetEffectiveRightsFromAcl(). Once the file security descriptor has beenobtained as above the rest of the code would do this:
BOOL daclThere = FALSE, daclDefault = FALSE;PACL fileDacl;DWORD sidSize, domainSize = 128;BYTE pSid[sizeof(SID)+(SID_MAX_SUB_AUTHORITIES * sizeof(DWORD))];SID_NAME_USE sidType;char domain[128];TRUSTEE trustee;ACCESS_MASK mask;
A potential problem with this is that LookupAccountName() can take a long time to execute if you have a remote user from a trusted domain in a network infrastructure with many domains.
Another problem I've seen with this is GetEffectiveRightsFromAcl() failing with return code 5. I have an open support call with Microsoft concerning this problem.
Update 2/13/07: Thanks to some help from a Microsoft Escalation Engineer the specific problem has been identified as when any local user (i.e. not a domain user) calls GetEffectiveRightsFromAcl() and passes it the ACL of an unprivileged local user, the file ACLs include those for groups which contain domain groups, and at a domain level the Network access: Allow anonymous SID/Name translation setting is disabled (default setting) the function will return "Access Denied". Because of this reason using GetEffectiveRightsFromAcl() is not the recommended method to determine whether a user has access rights to a file.
4. Launch a process as the user and test access
If you don't want to mess with all the access functions, you could could simply create a process as the user using LogonUser() and CreateProcessAsUser()and try opening a file with the required permissions. This isn't a very efficient method, and executing a command leaves your code open to malicious command injection, but it works.
The file access rights implementation on Windows, and its programming interface, is in my opinion a pile of pants. It probably seemed like a good idea at the time to create an access model with so much flexibility, but a flexible security system is often a misconfigured security system. Suggestionswith simpler alternatives to the above are welcome.
Check User's Permissions On A File or Folder- ASP article By Softomatix.
How To Program a Secure Server on Microsoft Windows NT - Microsoft KB article
[Read More]
State of the 4GL
I've just finished reading Development Tools in 2006: any Room for a 4GL-style Language? - a 32 page PDF report based on an in-depth 4GL usage survey Jean Georges Perrin conducted earlier this year.
As well as providing insight into how people are currently using 4GL and variant languages, the report delivers a useful comparison of features between the main products (Aubit4GL, BDS, Genero, Informix I-4GL, Rational EGL, Hydra4GL) including pros, cons and recommendations for switching (or staying put).
Also illuminating are the features people would like to see in 4GL. Some might be expected like greater web development support, but a few surprises too.
The report is well researched and presented. If you have any interest in 4GL this study is definitely worth a look.[Read More]
Informix partners to the Rescue
gbowerman 100000B5T0 2 Comments 3,464 Views
So this is what was missing from Informix marketing..
At last... Informix partners to the Rescue[Read More]
Cheetah Roadmap Highlights
Tuesday's Chat with the labs with Jerry Keesee was full of new information about next year's Informix Dynamic Server Cheetah release. In case you missed it the slides are available on the Informix product family webcasts site. See the Informix Zone write-up for a summary of the talk.
Rather than repeat Informix Zone which did a great job at summarizing the key points, I'll just mention what I found particularly interesting...
Open Beta
The open Cheetah Beta begins in February. Expect to see Cheetah test drive CDs made available at conferences.
Investment and planning is already in place for the next two major IDS releases beyond Cheetah, through 2011.
An increase in the number of nightly QA tests and R&D engineers has led to a significant reduction in defects and hence an increase in stability for recent new IDS releases.
A new web based administration tool for IDS is announced. IDSAdmin has generated a lot of interest when we've shown it at tech fairs and Conferences over the last year so it's nice to see it in the official road map. Written in PHP, It builds on three major new Cheetah features:
New APIs
Expect to see official support for Ruby and other drivers in mid-2007 - thankfully open source developers have not been waiting for this and have already made Ruby and many other drivers for IDS available.
Java Common Client
Support for JDBC 4.0 is on its way. The Common Client is a single JDBC interface to support IDS and DB2. This should make life easier for application developers supporting multiple data servers as well as enabling R&D to concentrate resources and not re-invent the wheel. I'd be happy to see more streamlining of application development support, while the data servers continue to specialize in what they do best.
Uptime Survey Results
We learnt some interesting facts like 25% of IDS sites require no DBA time at all, and the average Informix DBA expends 7 minutes per user per week. Several responders reported not having an Informix related outage in the last 5 years.
If you attended this talk and have any additional comments let me know.[Read More]
Congratulations Misys Healthcare
IBM has awarded the first ever "Most Distinguished Achievement" award for North America to Misys Healthcare Systems - an OEM partner integrating Informix into its applications - for closing $1.7 million of IDS revenue, and generating 400 new customers for IBM in the last year. See the full press release here: Misys Healthcare Systems Wins "Most Distinguished Achievement" Award From IBM. Congratulations![Read More]
IDS Client and Partner Sucess Stories
Just watched the IDS Flash video: IBM CLient and Partner Sucess Stories: Informix Dynamic Server.
IBM's director of Data Server Marketing Bernie Spang introduces three IDS case studies covering migration to IDS 10.0.
Annoyingly I wasn't able to view it with Firefox 2.0, but thanks to the IE Tab Firefox plugin, playing the video in a Firefox tab rendered by IE was only a click away.
In the first case study RealPlus, a Manhattan based residential real estate company, describe how Ron Flannery at OnePoint helped them upgrade to IDS 10.0 running on Linux, improving performance and enabling them to and use their Blackberries, Palms and Treos in the field with IDS running reliably in the background. Next Online Computing describe integrating IDS into their enterprise resource management application, and finally gearing solutions company Stober Drives describe their long and successful association with Informix Dynamic Server.
Don't forget: The Cheetah Roadmap Chat with the Labs is tomorrow at 8am Pacific time. Register here.[Read More]
IIUG Elections
The IIUG Board of Directors elections are underway (from midnight US Eastern Standard Time on 01 December thru 15 December). Nominations for candidates closed on November 15th and a total of 16 candidates are standing - 9 returning board members and 7 new candidates. I couldn't work out from the election information how many positions are open, but the current board has 11 members. If who represents Informix users at the IIUG matters to you, read the candidate statements and vote here.
Leafing through the candidates, a certain Mr Perrin is setting the pace with his own campaign video!
Any other publicity stunts gratefully received.[Read More]
Informix Dynamic Server V10 RedBook Draft published
The free technical books site, aka Redbooks has published a draft version of the long awaited Informix Dynamic Server V10 . . . . Extended Functionality for Modern Business red book. As well as the basics about server administration, SQL backup & restore, extensibility, there are sections on development tools, encryption, XML and service oriented architecture.
Since it's a draft now would be a great time to review it and provide feedback. Final publishing is scheduled for December 31st 2006. Hard copy versions will be available shortly thereafter.[Read More]
Slow onchecks in 9.40 and 10.0
gbowerman 100000B5T0 Tags:  troubleshooting performance 3,862 Views
If you've noticed oncheck taking a long time to complete in IDS 9.40 and 10.0 you could be running into a known problem with missing read aheads. The defect, which has yet to be assigned an external APAR number, has the following description:
This problem is fixed in IDS 9.40.xC8W3 and 10.00.xC5W1 or later. Use defect reference CQ 3377 if you'd like to discuss this problem with tech support.
Note: A 'W' release represents a Post Interim Drop or PID containing bug fixes checked into the code line since the last interim release. There are typically 5 PIDs between two interim releases like (for example) UC8 and UC9.[Read More]
Informix on Rails
gbowerman 100000B5T0 Tags:  ruby 2 Comments 7,623 Views
The last time I tried a Ruby on Rails tutorial I gave up half way through, having trouble accepting the convention over configuration ethos, where database tables and columns need to follow a naming conventionto work with Rails' automatically generated controllers and models. Maybe it's the database engineer in me that feels the application development environment should adapt to my data model rather than the other way round, or maybe I'mjust not open to new ideas.
This week Gerardo Santana has announced the first release of Rails/Informix, an Informix adapter for Ruby on Rails, and a new version 0.3.0of the Informix driver for Ruby. So nowseems like a good time to take them for a test drive.
Trying to let go of preconceptions, I resolved to followCurt Hibbs' Rolling with Ruby on Railstutorial to the bitter end to make a simple recipe application.
Documented here are mainly the Informix specific deviations from the tutorial. Note I used IDS 10.0 - the recommended version for Rails/Informix. My test platform was Windows to match the tutorial, so for any operating system specific paths and commands assume the equivalent for your OS.
Since the onlamp tutorial also includes instructions on installing MySQL, refer to Jean Georges Perrin's Installing IDS on XP article for an equivalent tutorial on installing IDS.
1. Install Ruby, and Ruby on Rails
The "One-Click" Ruby installer for Windows was downloaded from http://rubyforge.org/frs/?group_id=167. Installation is as simple as running the GUI and accepting the defaults. Once installed, add c:\ruby\bin to the path and Ruby on Rails can beinstalled by running:
C:\ruby>gem install rails --include-dependencies
2. Build and Install Ruby-Informix
Download the Windows or the UNIX package from http://rubyforge.org/projects/ruby-informix/ and unzip. On Windows (with the Informix Client SDK 2.90.x installed) set the Microsoft Visual Studio environment (vcvars32.bat), then build and install the driver:
ruby extconf.rb --with-informix-include=%INFORMIXDIR%\incl\esql --with-informix-lib=%INFORMIXDIR%\libnmakenmake installNote: on Windows only Visual Studio 6.0 is supported for building the 0.3.0 Ruby driver. The Informix CSDK version I used was 2.90.TC6.
3. Install the Rails adapter for Informix
Download the Informix adapter for Rails from http://rubyforge.org/projects/rails-informix/, unzip and (following the instructions in the INSTALL file) copy informix_adapter.rb to c:\ruby\lib\ruby\gems\1.8\gems\activerecord-*\lib\active_record\connection_adapters\.
Then "informix" needs to be added to the RAILS_CONNECTION_ADAPTERS line of c:\ruby\lib\ruby\gems\1.8\gems\activerecord-*\lib\active_record.rb.
Now Ruby on Rails is ready to use with IDS.
4. Following the Onlamp tutorial
The Rolling with Ruby on Railstutorial explains how to create a cookbook database in MySQL using MySQL-Front. An equivalent IDS database can be created in the data dbspace via dbaccess with the following Windows batch file:
echo create database cookbook in %INFORMIXSERVER% with log; ^create table recipes(id serial, title varchar(255), description varchar(255), ^ date date, instructions text, category_id int); ^create sequence recipes_seq; ^create table categories(id serial, name varchar(50)); ^create sequence categories_seq; ^ | dbaccess -Note: the database needs to be created with logging and for every table a sequence named after the table also needs to be created.
Because the "informix" string was added to active_record.rb as part of the Informix Rails adapter installation, the config\database.yml file for any new Rails application can now be populated with Informix specific connection details. My cookbook\config\database.yml looks like this:
development: adapter: informix database: cookbook@mydbserver username: myuser password: mypasswd
Where mydbserver corresponds to an SQLHOSTS entry on this machine. If a username and password, or the dbserver were not specified, a local database connection would be attempted with the credentials and environment of the user running the Ruby on Rails server.
With the exception of these data server specific parts the rest of the tutorial, including Part II can be followed verbatim.
The Informix adapter for Rails is working well with the latest Informix driver for Ruby. Give it a try, and remember the following points:
Once the basic Recipe application screens were working I was impressed with how Ruby on Rails can build a database enabled web application with just a few lines of code. Am I converted by convention over configuration into using plurals to name my tables from now on? Er, still not convinced. Comments explaining how wrong I am are welcome.[Read More]
Locales, Ruby, and other matters
Trouble with Locales follow-up
Nobody likes it when they upgrade and their application stops working, which is probably why the Trouble with locales post from May generated more feedback than any other. Removing support for implicit locale conversion when DB_LOCALE settings were mismatched, thus introducing a potential backward incompatibility, was a regrettably unavoidable step to prevent the possibility of data corruption. A recent IIUG Forums mail highlighted the fact that some of the documentation covering Code-Set conversion is no longer correct (at the time of writing), like this example from the JDBC Programmer's Guide: Unicode to Database Code Set...
Ruby update
Gerardo Santana's Ruby driver for Informix has been updated to version 0.2.1. The new update is to fix some problems with free() calls which were causing crashes on Windows XP SP1. See the freshmeat page for details.
On the subject of Ruby, Informix Zone has added an article Talking with Perl, PHP, Python, Ruby to IDS showing Informix Dynamic Server programming examples for each of these free programming languages, including an overview of the "database abstraction layer" architecture they use.[Read More]
OnBar Performance article on developerworks
gbowerman 100000B5T0 Tags:  onbar performance 3,779 Views
Are you getting the best performance from your backup? Shweta Sinha has written a new developerWorks article called Optimize your BAR Performance using parallel backups with Informix Dynamic Server, which covers ON-Bar architecture, configuration parameters like BAR_MAX_BACKUP, BAR_NB_XPORT_COUNT, BAR_RETRY, and how dbspace sizing affects parallel backups.[Read More]
Simple AJAX to-do list application in ZK
gbowerman 100000B5T0 Tags:  zk java ajax 7 Comments 9,252 Views
If you feel like you're drowning in work, consider writing a to-do list. It can be more fun than actually doing the work, and provides for an ephemeral moment of satisfaction when you check something off. Personally I'd have trouble getting out of bed without a to do list.
A minimal to-do list application
My design goals for the minimal to-do list are:
An item should disappear from the list but remain in the database when thecheck box is clicked. The list box is simply a view of unfinished items.
I chose to write this with the ZK framework as it enables me to define the graphical components I need with a concise markup language and then implement the relationships between them using Java.
The SQL for the todo_list database consists of a single table called tdl:
Note that if embedded Java code is enclosed in a <![CDATA[ ... ]]> tag then HTML characters like '<' do not need to be escaped.
The code has two main graphical components: A listbox containing the list of to-do items with checkboxes, and a groupbox containing text boxes with a button to add a new item.
The ItemRender class is to support manipulating a listbox with multiple columns and is inspired by a ZK forums example by Henri Chen.
Four Java methods are defined, retrieveItems() to display the list, markDone() to remove an item from the view, addItem() to add a new to-do item, and doSQL() to send SQL update statements to the data server for markDone() and addItem().
<window title="To do list" width="640px" border="normal"><zscript> // initialize DataSource import java.sql.*; import javax.naming.*; import javax.sql.*; Context initContext = new InitialContext(); Context envContext = (Context) initContext.lookup("java:/comp/env"); DataSource ds = (DataSource) envContext.lookup("jdbc/todo");</zscript>
Is using a data server with the performance and availability of Informix Dynamic Server for a personal to-do list overkill? Since IDS is available free for non-commercial use, and considering its small footprint, why not? The free Java Derby database would also be a goodfit for this type of application.
What next?
Because I wanted to embed this on a home page I set rows="4" for the listbox. A full page view would want rows set to a higher value. Some useful enhancements might be:
I'm posting this now, and crossing two things off my to do list.[Read More]
Messing with the JVM Heap
Today I'm testing the Informix Zone Operate your Own Blog feature and for this reason today's post is hosted from the place where technology meets marketing.. Germany.
So without further preamble here is Informix Zone blogger #6's tale of doing inadvisable things with graphs: Increasing the JVM Heap Size.
The Informix Zone blogging system has a nice interface (powered by Drupal). Once you create an account, you get a my blog link. From there you can add entries, with a preview option to see how the posts look before submitting. Recent blog posts appear on the Zone front page.[Read More]
Dostats Updated
gbowerman 100000B5T0 Tags:  performance sql 4,404 Views
Dostats users, and there are many, should take note that Art Kagel has uploaded a new version of utils2_ak to the IIUG Software Repository. The importance of having a good UPDATE STATISTICS strategy is one of the first lessons developers/DBAs who are new to Informix learn. Utilities like Dostats can save a lot of time.
Look for the new version with a Readme dated October 16, 2006 to be available for download in the next day or two.
From Art's release announcement:
Informix Zone blogs
gbowerman 100000B5T0 Tags:  linux blog 2 Comments 4,980 Views
If you've looked at Informix Zone you may have seen it has the facility for anyone to create an account, start an Informix blog and post articles. Christian Winterhager has done just that... his first article: Raw Devices on Suse Linux is an excellent introduction to setting up raw devices on Linux, and includes a Python program for automating dbspace and raw device creation.
I like the concept of a commons where Informix users can contribute articles, opinions, etc.. My suggestion would be to consider opening it up so anyone with an account can start a blog without the approval step and see what happens.
Update 11/13/06: See Eric's response in the comments. Thanks Eric.[Read More]
Extended daylight savings time - should Informix DBAs care?
gbowerman 100000B5T0 Tags:  troubleshooting 2 Comments 6,301 Views
Daylight Saving Time (DST), the reason your gadgets show the wrong time for half the year, is being extended in the US and Canada next year to start on the second Sunday in March and end on the first Sunday in November. The US tried this before in 1974 as a response to the energy crisis and it was alleged to have saved 10,000 barrels of oil a day and prevented 50 traffic fatalities.
Some software has the daylight saving dates hard-coded and will require an upgrade. For most Informix DBAs this should not be a problem since IDS gets its time from the operating system. As long as your operating system changes its time on the right date the transition should be no different to usual. (Remember to restart IDS after installing relevant OS patches.) Java has some hard-coded dates though, so if you use Java applications which perform date calculations you need to think about upgrading JRE to the latest versions (Australians had a similar problem in 2006).
If you have Java UDRs which call"get time of day" functions then you may need to upgrade IDS in order to get a fixed JRE. This IBM Alert describes which versions are affected and what you need to do: Action Required: Changes to daylight saving time (DST) in the U.S. and Canada affect IBM Informix Dynamic Server. The IIUG also has a page dedicated to this topic with additional information: March 2007 Daylight Savings Time Change Information. If your JRE is an IBM one and has JTZU you can fix the problem without updating, see the IBM Time Zone Update Utility for Java (JTZU).
The central IBM website for DST changes is Daylight Saving Time alert - this includes a FAQ and will change as new updates are added.
If you use other IBM software you may need to care more. Here are some of the relevant links..
Application Servers: Possible implications if one does not apply the Daylight Saving Time fixes
DB2: Actions required: Changes to daylight saving time (DST) in the U.S. and Canada affect IBM® DB2® products
Lotus Notes and Domino: Daylight Saving Time (DST) 2007 information for Lotus Notes and Domino
Lotus Sametime: Daylight Saving Time (DST) 2007 information for Lotus Sametime
Websphere: URGENT Actions Required: Changes to Daylight Saving Time will affect IBM WebSphere Application Server and its associated Operating Systems.
Websphere Everyplace Connection Manager: Daylight Saving Time (DST) 2007 information for WebSphere Everyplace Connection Manager
Websphere MQ: US Daylight Saving - How changes to daylight saving time affect WebSphere MQ, WebSphere MQ Express and WebSphere MQ Everyplace
Update: Bobby Woolf added a comment pointing out his Websphere blog entry Daylight Saving Time and Java which has some useful information on this topic, including a link to the Sun Developer Network article about extended DST.
Update #2: Windows users and developers should refer to these Microsoft documents: Preparing for daylight saving time changes in 2007, FIX: Windows-based applications that use the TZ environment variable may not work as expected because of changes to DST, FIX: Visual C++ .NET 2003 C runtime daylight saving time 2007 update for the TZ environment variable problem.[Read More]
About the Informix Install Script Vulnerability
IBM announced a security vulnerability involving insecure use of the /tmp directory by the IDS and CSDK UNIX install scripts recently. The text of the announcement is here: Possible security vulnerabilities with Informix Dynamic Server, CSDK, and I-Connect product installers.
Reports of this vulnerability have been around since the beginning of October when someone called Larry Cashdollar sent an announcement directly to Bugtraq. As far as I can tell, in contrast to other security advisories we receive, IBM were not given any advance notice of this so had to start working on a response from that point. Since the announcement the usual security sites have picked it up, generally giving it a rating of less critical:
FrSIRT Security Advisories: IBM Informix Insecure Permissions and Temporary File Creation Vulnerabilities
Secunia Advisory #1: IBM Informix Dynamic Server Insecure Temporary File Creation
Secunia Advisory #2: IBM Informix Products Insecure Permissions and Temporary File Creation
Security Tracker: Informix Dynamic Server Uses Unsafe Installation Scripts and Directory Permissions That May Let Local Users Gain Elevated Privileges
I've been waiting for the dust to settle before writing about this given the less than critical impact, the straightforward workaround, the difficulty of exploiting and the IIUG coverage, but now the official IBM announcement is out it's worth at least highlighting the workaround:
Use the -log option when performing your product installation to redirect the temporary files created to a secure directory.
The following example from Jonathan Leffler illustrates using the -log workaround:
umask 077mkdir /tmp/informix./installserver -log /tmp/informixThis creates a directory with no public (or group) access, and then directs the install logs to that directory.
It is also worth mentioning that Informix products running on Windows do not have this vulnerability.[Read More]
Attention Foreigners - Attend WAIUG Forum 2006 for Free
gbowerman 100000B5T0 Tags:  conference 3,252 Views
The Washington Area Informix Users Group has announced free registration for Forum 2006 to anyone providing proof of a round-trip ticket from outside the United States. The regular registration price is $120. See the Forum Website for more details, including discount hotel rates.
Kudos to the conference organizers for encouraging international participation.[Read More]
Zend Core for IBM adds support for Informix Dynamic Server
The 2nd annual Zend/PHP Conference is currently taking place in San Jose. Yesterday saw the official announcement of support for IDS and DB2 V9 in the latest Zend Core for IBM. Other new features include pureXMLTM support and an optional connection pooling feature.
The Zend announcement can be found here: Zend and IBM Combine Performance, Scalability and Rich Content Support in New Version of Zend Core for IBM. Or view the eWeek story: Zend Moves to Boost PHP Usage.[Read More]
ZK - AJAX without the JavaScript
gbowerman 100000B5T0 Tags:  zk java ajax 2 Comments 11,424 Views
From time to time I take a look at SourceForge.net projects to see what's active. This speculative browsing has resulted in the discovery of gems such as FileZilla, GAIM, and most recently ZK.
Java code can be directly integrated into an application by means of <ZSCRIPT></ZSCRIPT> tags, with one caveat that HTML characters in Java code like '<' need to be escaped. E.g. "if (a < 10)" should be written as "if (a < 10)".
ZK runs in any servlet container like Tomcat. Installation is a matter of copying the required JAR files into the shared library directory. A Quick start guide goes through the basics.
Database applications
The LiveDemo has a Database Connection section which includes commented out JDBC and Hibernate connection examples. At first glance database integration looks straightforward, let's try it with some real data.
Annual rainfall example
I wanted to try the 3-d pie chart widget (one of many chart options available via integration with JFreeChart) so chose to display monthly rainfall over England and Wales (care of the UK Met Office). Here is the un-normalized table used to load the data:
create table rain_stats(year int, month char(3), rainfall decimal(4,1));
The example application will have a drop down list box to choose the year, and will dynamically display the rainfall for that year as a pie chart which can toggle between 2d and 3d (though for 12 segments I think 2d looks better). For a real application I'd use a connection pool, but here's my code using a direct JDBC connection:
<window title="England & Wales Annual Rainfall Demo" width="500px" border="normal">Select Year: <listbox id="yr" rows="1" mold="select" onSelect="processYear(self.selectedItem.label)"> <listitem label="2005" selected="true"/> <listitem label="2004"/> <listitem label="2003"/></listbox>
Below are screen shots of the resulting web application. Choosing a new year results in a re-drawn pie chart without refreshing the page. Moving the mouse over a segment shows the rainfall in millimeters for that month.
It's very easy to get started with ZK, thanks in part to the LiveDemo. I'm still learning the finer points of event listeners and synchronizing actions between different components, but first impressions are very favourable. ZK looks like a powerful way to rapidly build AJAX applications with very little coding.[Read More]
Log Buffer #16: a Carnival of the Vanities for DBAs
This week it is an honour to host Log Buffer
#16, a weekly sampling of morsels from the database blogosphere. As often happens I sign up for these
things without thinking about the work involved until it's too late.
The loudest topic of the week is
OpenWorld 2006, or OOW2K6 as insiders like to call it, where 42,000 people descend on San
Francisco to talk Oracle. Check out OraBlogs for an
aggregate and the Flickr group for photos.
Andrew Clarke at Radio Free Tooting and
many others report the big announcement from
href="http://radiofreetooting.blogspot.com/2006/10/oow2k6-larrys-keynote.html">Larry's keynote
that Oracle plan to offer RedHat Linux support for less than RedHat (see
release). Interestingly Dave Dargo's Ingres
blog analysis of the announcement is entitled
href="http://blogs.ingres.com/davedargo/content/2006-10-25.html"> Bull*%! Raven Zachary
reports on RedHat's response in the 451 CAOS
Theory post
href="http://blogs.the451group.com/opensource/2006/10/26/unfakeable-linux/">Unfakeable Linux and
wonders what existing RedHat and Oracle customers are thinking about it.
On Tuesday night the OOW conference bloggers met up for a brew at the Thirsty Bear in San Francisco,
and then forked into two groups to either see Elton John or go for a curry. Mark Rittman's blog
has a write-up and
photos. Sounds like fun (the curry, not the Elton). Mark's
>11g performance and scalability features post is also worth a read for those wishing to catch up
with Oracle's plans for 11g.
I'll leave it to Andrew Clarke to sum up the conference spirit with his
href="http://radiofreetooting.blogspot.com/2006/10/oow2k6-manic-monday-pt-2.html">Manic Monday
of an unathletic disposition into a big room and play really loud dance music at them.
What makes a good DBA? Chris Foot's
href="http://www.dbazine.com/blogs/blog-cf/chrisfoot/">Oracle10g Blog has been running a series on The Non-Technical Art of Being a Successful DBA and this week covers
href="http://www.dbazine.com/blogs/blog-cf/chrisfoot/blogentry.2006-10-20.6229555671">Excelling at
Verbal and Written Communcations. This article is well worth a read for anyone wishing to improve
their communication skills. Chris offers this tip on presenting.. When you attend
presentations from others, pay attention to both the material they are presenting and how they present
it - though anyone who's seen me try to present will know to just pay attention to the material.
At Database Underground Sean McCown
takes on the technical side and asks what are the
Skills for DBAs?I think every DBA should have web programming skills. This is without a doubt one
of the more useful outside skills to have because almost anything you do as a DBA would be done better
if you posted it to the web - couldn't agree more. Sean also offers an elegant
href="http://weblog.infoworld.com/dbunderground/archives/2006/10/sql_server_2005_2.html">solution to
SQL Server 2005's schema problem.
The most recent addition to the Informix blogosphere Informix
Zone is rapidly establishing itself as a can't miss site. This week Eric Herber provides a
detailed account of the recent Executive Roundtable
complete with the slides from the presentation for those who missed it. Lots of development plans,
more details on Cheetah, and the big news that Informix licence revenue has been growing by double
digits every quarter this year.At Informix Technology Fernando Nunes
covers the free Informix Dynamic Server 10.0 downloads from IIUG and reminds us we're only 130 Mb away from
learning about IDS.
Craig Mullins's DB2 Portal points out a
collection of IBM
href="http://www.db2portal.com/2006/10/check-out-new-ibm-information.html">Information on Demand
blogs where IBM product managers, technical architects, marketing managers and strategists talk about
key information management issues and market trends. IBM's six-in-one IOD conference was last week,
and Craig has a good summary of some of the
blogs in his DBAZine blog.
In An Expert's Guide to DB2 Technology
Chris Eaton
values-clause-12496">works some magic with the VALUES clause showing how to create multiple rows
and select them out of thin air.
MySQL bloggers are in anticipation mode over MySQL Campwhich runs from Nov 10-12 in Mountain View. Jay Pipes has an update
on the
schedule, he also announces a
Video Contest with a $1000 prize.
The new MySQL Enterprise Edition gets Bob Field's attention on
href="http://bobfield.blogspot.com/">Bob's World. Bob is looking forward to a
href="http://bobfield.blogspot.com/2006/10/fork-in-code.html">Fork in the Code, seeing it as
win-win for paying customers and the open source community.
Thanks for the opportunity to host Log Buffer, it's been educational and entertaining to read around the wider database community. Normal service will be resumed next week.[Read More]
Informix Q3 Results
gbowerman 100000B5T0 Tags:  sales 2 Comments 3,699 Views
Thanks Informix Zone for making the Executive Roundtable slides available for download. Buried within this presentation is the fact that Informix licence revenue grew by double digits in all three quarters this year. The rise of Informix continues.[Read More]
Solano Tutorial on developerWorks
gbowerman 100000B5T0 Tags:  java solano 2 Comments 4,678 Views
Back in July I reported that Solano - the Informix Dynamic Server feature that supports hosting a Java server from within IDS - was documented in the 10.00.xC5 Documentation notes, and made a vague commitment to come up with some example code to show how to use it.
Today I'm pleased to make good on that promise in the form of a developerWorks tutorial describing how to set up an RSS server running inside IDS: Cut out the Middle-Man: Use Informix Dynamic Server with J/Foundation to host a Java application service.
The key to understanding how to use Solano is in this sentence from around the middle of the article:
I'm interested to know what anyone thinks of this technology and where you see it being useful. Does this article provide an understanding of what the feature is or would you like a better explanation?
The next Solano project I'd like to try is to implement a Secure Sockets Layer (SSL) server as a Solano application to enable browser-to-database public key encryption with very little configuration overhead. If other network ports into the data server and machine are disabled this could result in a highly secure database application.[Read More]
Using the new Fragmentation features in IDS 10.0
gbowerman 100000B5T0 Tags:  fragmentation 2,482 Views
A useful feature in Informix Dynamic Server 10.0 is support for multiple fragments in a single dbspace.
How do you use this feature and why would you want to?
Ajaykumar Gupte answers these questions in a new developerWorks article entitled Flexible fragmentation strategy in Informix Dynamic Server 10.0. He describes how IDS 10.0 overcomes the following limitations in earlier releases:
The article follows an example which includes a look at the sysfragments sysmaster table, sqexplain analysis and fragmentation strategy guidelines.[Read More]
IOD Conference, closing thoughts
gbowerman 100000B5T0 Tags:  iod conference 3,782 Views
The IOD conference ended on Friday. I missed some sessions owing to conferenceduties, but below are some personal highlights..
For a view of the conference from Jean-Georges Perrin's inimitable Gallic perspective, and better photos, check out Postcards from Anaheim: Information On Demand 2006.
Mike Eisner's keynote
I sometimes skip keynotes but was glad to attend this one. Mike Eisner is obviously an art lover, drawing on the world of fine art in many of his points. One analogy he used was that of Pointillism. Using "Sunday on the Island of La Grand Jatte" by Georges Seurat to illustrate micro-management - the dots representing the minute aspects of the organization, which in his viewshould be controlled by management - while at the same time encouraging mistakes, a few bad dots do not ruin the overall picture.
At the Q&A at the end, which sadly avoided anything controversial, he wandered off-topic to repeat something taught to him at a young age - how to tell good art from bad. If you look at a paintingand it is nice, pleasant and comforting, it is probably bad art. If it is repellent and does nothing for you it is probably also bad art. If it is confusing, challenging, makes you think for a while and want to look at it again, it's probably good art.
IDS and Web Services
In the developer den Alexander Koerner had in interesting talk about using IDSas a web service consumer and provider. I'm keen to see whether he forsees anypotential in using the IDS Solano feature as a web service provider. The developerden also had free copies of a recent Red Book "Developing PHP Applications for IBM Data Servers" which covers Cloudscape, DB2 and Informix.
IDS Performance
There were several good IDS performance presentations, as well a Birds of a Feathersession. One talk I managed to attend on Friday morning was Jeff Filippi's "Informix SQL Performance tuning tips" which had some effective real-world tuning examples.
I enjoyed Christoph Jaeger's "Informix IDS and Blackberry Mobile Applications"session. At one point he threw his Blackberry on the floor, which prompted a member of the audience to throw his Palm into the aisle. I was about to smashmy cellphone and shout "DESTROY THE MACHINES" when I realised they were justextolling the relative durability of their personal communication devices.
An important customer meeting took place here.
New website - informix-zone.com
gbowerman 100000B5T0 2 Comments 3,198 Views
Eric Herber has a new website The Informix Zone, to "further promote Informix by keeping people informed about the progress that Informix makes and giving newcomers an understanding of the outstanding technology of IDS (Informix Dynamic Server)". It kicks off with a reminder about the Informix Executive Roundtable next week. The site lets you create a user-id, I'm guessing it means you can submit your own stories??
Check out the website at http://informix-zone.com/.
The Anaheim Convention Center
IDS 10.0 available for download from IIUG
As of last night Informix Dynamic Server 10.0 is available for free download from the IIUG members area. The following versions are available:
AIX 64 bit - IDS.10.00.FC5I1HP 64 Bit Itanium - IDS.10.00.FC5I1Sun Solaris 64 Bit - IDS.10.00.FC5I14Windows 32 bit - IDS.10.00.TC5I1Linux 32 bit - IDS.10.00.UC5I1
These versions are available with no time limits for non-commercial use. In these special editions the only restriction is on the number of users which is limited to 5.
This has been requested by the Informix user community for a long time. Thanks to everyone in IIUG and IBM who made it happen.[Read More]
More Cheetah details emerge
gbowerman 100000B5T0 Tags:  conference cheetah iod 3,447 Views
Arvind Krishna's Data Servers keynote at IOD today added some detail about Cheetah. Starting with some reasons why 8 of the top 10 retailers and 20 or the top 25 supermarkets use Informix Dynamic Server, he went on to outline some of the new Cheetah features, including enhanced performance, reliability and availability, enhanced spatial geodetic support for location based services, advanced security features such as LBAC, Common Criteria Security Certification, encryption across replicated nodes, encryption for backups and key management.
A new press release also coincided with the start of IOD: IBM Previews IDS "Cheetah" Data Server.
In the morning I attended an interesting talk by Christian Holzer (former midfielder for 1860 Munich) entitled The German Premier Soccer League: Powered By Informix, WebSphere and EGL, describing how data on every action in German and Austrian football league games are recorded into an IDS database and used by media companies for real-time graphics and by team coaches for researching players and selecting teams. Successful tests with RFID chips on players and in the ball are leading to massively increased real-time data gathering in future seasons. There was speculation in the audience about whether RFID chips would lead to an end to offside disputes. Christian's view is that the offside rules need to be changed before that can happen since they don't currently specify whether it's just a foot, or any part of the body which triggers offside - this could affect placement of RFID chips.[Read More]
Reporting from Anaheim
gbowerman 100000B5T0 Tags:  conference iod 3,385 Views
The IOD conference officially starts this morning, and various pre-conference events took place over the weekend. A large numbers of IBM business partners showed up for Business Development Day. DB2 and IDS problem determination classes took place, the Informix Customer Advisory Council had a two day meeting to exchange views and learn more about marketing and development plans for IDS. I was there for the second day in time to learn more about planned HDR, security, location based services, XML, EGL, high availability, administration and competitive features for Cheetah and beyond.
The 2007 Informix marketing budget is spent on a t-shirt, and the hotel want their cat back
DLL dependency update
gbowerman 100000B5T0 Tags:  esql iod windows conference 3,676 Views
Today I updated an earlier post about Visual Studio 2005 run-time DLL dependencies to discuss an additional option - embedding the manifest file in an executable.
Next week this blog will be broadcasting from the IOD conference in Anaheim, where I'll be kept busy with a JSP talk, making up the numbers in an IDS performance panel, representing Windows in Meet the Experts and volunteering in the daily news team. So if you see a bright and cheerful engineer delivering your news at 6:30am, it won't be me as I'm not good at mornings.
The scale of the conference and number of technical topics to choose from borders on overwhelming. From the planning emails I've seen the organizers have been working very hard to get this ready. Hope to see you there.[Read More]
Vienna conference wrap-up
gbowerman 100000B5T0 Tags:  conference iiug idug 3,165 Views
The main part of the IDUG/IIUG conference in Vienna ended on Thursday, with talks on Advanced Memory Management for datablade developers, IDS security and encryption, 4GL & Java, and Java UDRs. Sadly the keynote by Heinz Wolff, former head of the European Manned Space Commission, was called off as he was unable to make it out of Heathrow.
Congratulations to Carlton Doe who won the best IIUG speaker prize at the conference wrap-up for his IDS Extensibility talk.
Random Vienna-cam cellphone snap..
It's hard to do justice to St. Stephen's Cathedral, or any Viennese architecture with a cellphone, but that's never stopped me before.[Read More]
New Java UDR developerWorks article
Hal Maner and John-Georges Perrin have a new developerWorks article called Push the limits of Java UDRs in Informix Dynamic Server V10. You'll need to get a developerWorks user id if you don't have one in order to download the PDF file.
I'm looking forward to following this tutorial as I keep meaning to learn more about Eclipse.[Read More]
Vienna day 3
gbowerman 100000B5T0 Tags:  idug conference 3,161 Views
Day three of the IDUG/IIUG conference, a short walk from St Stephen's Cathedral - an imposing gothic edifice if ever there was.
The Informix side had lots about Java, extensibility, PHP, ER/HDR, Onstat, archecker, and a thought provoking demo of Jan Musil's XML blade, which uses the Virtual Table Interface (VTI) to serve XML files as IDS tables.
Cindy fung shared some details from the IDS product roadmap for the next few years.Summary: there is a large ongoing R&D investment in IDS, and some very cool features lined up for Cheetah and beyond.
For another view from the conference floor check out JGP'sPostcards From Vienna.[Read More]
Washington Area Informix Users Group Forum 2006
gbowerman 100000B5T0 Tags:  conference 1,910 Views
The Washington Area Informix Users Group has an $80 early bird offer for their two day technical conference on December 8-9: Forum 2006.
The forum includes:
To get a feel for the content take a look at the downloadable sessions from Forum 2005.[Read More]
IDUG/IIUG Vienna - Tuesday
gbowerman 100000B5T0 Tags:  conference idug 2,874 Views
Day 2 of the IDUG 2006 conference in Vienna... technical talk of the day for me was Jordan Bruce reporting on a Major Canadian Retail Drugstore's experience migrating 100+ Informix Dynamic Server IDS 9.30 instances on SCO to IDS 10.0 on Suse Linux. He explained he was hoping to report on lessons learned, but there weren't any. The entire migration proceeded with no errors. All instances are still running after a year with zero down-time and greatly improved performance. The session also included details on an in-house inventory utility built using ADOdb and IDS - a good demonstration of how the dependability of IDS combined with open source development and operating system technology can result in significant cost savings without compromising reliability or performance.
Exhibitions in the Klimt ballroom
InformixDB Python API version 2.3 released
InformixDB Python API 2.3 was released on October 1.
From Carsten Haese's announcement:
Changes since version 2.2:[Read More]
Reporting from Vienna
gbowerman 100000B5T0 Tags:  idug conference 1 Comment 4,760 Views
Greetings from the IDUG/IIUG conference in Vienna where I'll be sending inaccurate reports from the conference floor (or the Kunsthistorisches Museum if I manage to sneak out). See http://idugeurope.blogspot.com/ for the official conference blog.
Attendees, with their shiny new IIUG Internet phones and laptop bags, began filling the key-note room at 9:30 for a welcome and introduction from Jeremy Dodd of the conference planning committe. This was followed by a key-note entitled "Information as a Service...A New Era in Databases" by Bob Picciano, IBM Information Management VP of database servers. As he reviewed the Information Management products DB2 Viper with XML support was a major theme, and equally prominent was IDS with its cost of ownership message, a review of the Cheetah announcement, a new and surprisingly artistic marketing video with some telling customer quotes.
After the day's technical tracks the exhibition hall opened, with Gösser on tap, snacks on trays and some interesting exhibits from Informix and DB2 partners. IBM's Informix booth has IDSAdmin for PHP, IDS 10.0 features and replication demo's.
Meeting so many people known only by email has been a real bonus. Instant messaging is all very well, but some things get sorted out a lot quicker face to face.
Jean-Georges Perrin gets to grips with 4GL to EGL migration..
Rational Application Developer and Java UDRs
There is a new article available on developerWorks called Deploy Java UDRs through Web services on Informix using Rational Application Developer. It shows how to expose a Java UDR as a web service and serves as a useful introduction to Rational Application Developer.
Where it says to "install Informix Internet Foundation 2000" they mean "Informix Dynamic Server". (IIF 2000 was the IDS name around the time of version 9.21 if memory serves correctly, which it probably doesn't.)[Read More]
DLL Hell part 2 - Visual Studio Run-time DLL Dependancy
Following an earlier rant about DLL load addresses, another aspect of Windows Dynamic Load Libraries that can cause a headache is run-time DLL dependancy.
If you build an ESQL/C application on Windows you can expect it to depend on the certain Informix DLLs at runtime, which is why the Informix Connect runtime component needs to be installed as part of deployment. What you may not expect is for it to depend on certain Microsoft Visual Studio run-time DLLs aswell..
Suppose I want to compile the following ESLQ/C test program with Visual Studio 2005:
void Usage(char *progname){ printf("\nUsage %s user password\n", progname); exit(1);}Compiling it with the /dcmdl esql command line argument to show how it calls the C compiler:
IBM Informix CSDK Version 2.90, IBM Informix-ESQL Version 2.90.TC6c:\inf1000\lib\esqlc test.ecc:\inf1000\lib\esqlmf test.ccl.exe -c -I"c:\inf1000\incl\esql" /D_X86_ /D_CONSOLE /MD /DWIN32 test.cMicrosoft (R) 32-bit C/C++ Optimizing Compiler Version 14.00.50727.42 for 80x86Copyright (C) Microsoft Corporation. All rights reserved.When it builds the application Visual Studio 2005 creates a manifest file test.exe.manifest in same directory by default. This file contains the following XML:
<?xml version='1.0' encoding='UTF-8' standalone='yes'?><assembly xmlns='urn:schemas-microsoft-com:asm.v1' manifestVersion='1.0'> <dependency> <dependentAssembly> <assemblyIdentity type='win32' name='Microsoft.VC80.CRT' version='8.0.50608.0' processorArchitecture='x86' publicKeyToken='1fc8b3b9a1e18e3b' /> </dependentAssembly> </dependency></assembly>This shows a dependancy on Microsoft.VC80.CRT. What this means becomes clearer if I run the Dependancy Walker utility:
depends.exe is a GUI Visual Studio compiler tool (analogous to the UNIX ldd command) which shows the DLL dependancies and sub-dependancies an executable depends on (as well as other information such as exported DLL functions). Here is what it shows for my test application..
One way to fix the problem is to override the /MD compiler flag with /MT which forces the C compiler to link with the static library LIBCMT.LIB rather than MSVCRT.LIB (which is a stub for the Visual Studio runtime DLL). The command line then becomes:
IBM Informix CSDK Version 2.90, IBM Informix-ESQL Version 2.90.TC6c:\inf1110\lib\esqlc test.ecc:\inf1110\lib\esqlmf test.ccl.exe -c -I"c:\inf1110\incl\esql" /D_X86_ /D_CONSOLE /MD /DWIN32 /MT test.cMicrosoft (R) 32-bit C/C++ Optimizing Compiler Version 14.00.50727.42 for 80x86Copyright (C) Microsoft Corporation. All rights reserved.Now no manifest file is created, and running the dependancy walker shows the Visual Studio runtime DLL dependancy has gone..
Option 2: Embed the manifest in the executable file
The purpose of the manifest dependantAssembly tag is to tell the operating system where to look for a dependant DLL when it executes a file. The manifest file can be embedded in the executable file using the mt.exe command. If the manifest is embedded and msvcr80.dll exists in %WINDIR%\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.42_x-ww_0de06acd on the target machine, the operating system will be able to find it and execute the program. I looked at the Windows 2000, XP and Windows Server 2003 machines that happened to be lying around and msvcr80.dll was in this path on every machine. There is no guarantee it will be there, only if another application happened to install it there (see http://msdn2.microsoft.com/en-us/library/ms235317.aspx). The next round Informix Client SDK and I-Connect products will install the DLL and other dependencies as merge module files during installation, so embedding the manifest in your executable will be all that is needed to deploy it without a static link.
The syntax to embed the manifest in this example is:
mt -manifest test.exe.manifest -outputresource:test.exe;1
Now test.exe contains its manifest and will execute correctly on a target machine which has had the DLL installled in the WinSxS directory.
Update 11/2/06: If you run into this problem when trying to run a program, you can download the redistributable package for VS2005 here: http://www.microsoft.com/downloads/details.aspx?FamilyId=32BC1BEE-A3F9-4C13-9C99-220B62A191EE&displaylang=en[Read More]
Informix Technology Blog
Just noticed a new Informix related blog, Fernando Nune's Informix Technology Blog based in Portugal. This blog started two days ago, and begins with an interesting article about Cheetah. It's good to see the Informix blogosphere get a little bigger..[Read More]
Label Based Access Control
The recent Cheetah announcement covering the next major version of Informix Dynamic Server had a reference to a new feature called "record-level locking". This resulted in some speculation since "row-level locking" has been part of IDS for many years.
This was meant to be Label-Based Access Control. LBAC supports access to database objects based on labels, leading to highly configurable security policies, providing significantly increased control over who can access data. As mentioned in the press release, LBAC is already supported in DB2.[Read More]
Cheetah Announced
Cheetah, the next major release of Informix Dynamic Server, has been announced. Here's a CRN article covering the news: IBM To Unleash Cheetah, The Next Informix IDS Release.
Total cost of ownership, where IDS has a clear lead, is prominent in the news reports, which include this quote from Arvind Krishna, VP of database servers:
One unnamed customer runs 4,000 physical locations and more than 10,000 instances of the current IDS release with just eight DBAs, he claimed. "If you can show me an Oracle installation [doing that], I'll buy you the bottle of wine of your choice," he said.There are some other good quotes in this article which go toward explaing why IDS is not only still around, but experiencing dramatic growth in licence revenue and significant R&D investment.
Expect to see more about Cheetah at the Information OnDemand (IOD) Conference in Anaheim, California. The Cheetah beta is expected in the next few months - talk to your sales representative if you are interested in signing up for it.[Read More]
Informix Data Privacy Webinar - September 27
Princeton Softech and the IIUG are hosting a joint webinar entitled Data Privacy... Protecting Your Informix Database on Wednesday September 27, 2006 at 3-4pm EDT. After reading the press release I had some questions about the agenda and requested more details. Eric Offenberg, product marketing manager at Princeton Softech, advises attendees can expect the following:
The registration page can be found here.[Read More]
Undocumented performance feature in IDS : Virtual Processor Memory Cache
gbowerman 100000B5T0 Tags:  performance 5,274 Views
If you're using Informix Dynamic Server 10.00.xC5 or later you can make use ofan undocumented performance feature known as Virtual Processor Memory Cache.
The VP memory cache holds a configurable amount of memory in a location thatallows userthreads to retrieve memory blocks without obtaining the sh_lockmemory latch.In some situations (mainly when there are many CPU VPs) the memory latch canbecome a bottleneck (use onstat -g spi to monitor usage of this latch).The VP cache can also reduce the search time for large memory blocks used insorts and other operations.
This feature can improve performance on busy systems with a large number ofCPU VPs and spare memory capacity. By default the VP memory cache is set to 0(switched off). Youcan set the size in kilobytes with the onconfig parameterVP_MEMORY_CACHE_KB or set it dynamically with onmode -wm.For example to set VP cache to 800 Kb per CPU VP:
Note: Apart from 0, the minimum allowed setting is 800. The total size of the VPmemory cache (VP_MEMORY_CACHE_KB * number of CPU VPs) should be no greaterthan 10 to 20% of shared memory size. 10% should be ample in mostcircumstances. In tests 800 was a good value and gave 97% cache hit rate.
A system may benefit from a higher cache setting if it has a large numberof userthreads, or many sorts (or other operations which involve large memoryblock allocations). The VP memory cache does increase consumption of memorysince some memory is not shared between CPU VPs. If SHMTOTAL is set and mostof the available memory is being used consider increasing SHMTOTAL accordingly.
To monitor performance of the VP memory cache use the undocumented onstatoption onstat -g vpcache.
Note that blogged does not equal documented or supported. This feature will besupported in a later release, so for now use at your own risk. Internaltests have shown good results and R&D are interested in external feedback.If anyone tries it pleasesend me an email whichI will forward, or comment via the blog.[Read More]
Finite field arithmetic in SQL
gbowerman 100000B5T0 Tags:  mathematics sql 3,670 Views
Finite fields, also known as commutative division rings, consist of finite sets of numbers, while number systems we use in daily life such as rational numbers contain an infinite number of elements. Finite fields have various applications, including cryptography algorithms such as Rijndael used in AES (Advanced Encryption Standard).
An arithmetic operation performed in a finite field will result in an element within that field. For example, if you have a field of 5 numbers (cardinality p=5)..
Here are example arithmetic tables for a finite field with a cardinality of 5..
Expressions such as 1 / 2 = 3 make more sense if you consider the number 6 wraps around to 1 in this field. In the general case, in a finite field of cardinality p, any number n is equivalent to mod(n,p);
Finite field operations in SQL
One way to build finite field arithmetic support into SQL would be to write functions for each arithmetic operator which can handle arbitrary cardinalityby having an integer argument for each operand a and b, and one for the cardinality p. E.g.:
CREATE FUNCTION plus(a int, b int, p int) RETURNING int;RETURN mod(a + b, p);END FUNCTION;This approach allows the flexibility of being able to choose the cardinality when the function is executed, for example if I was generating a polyalphabetic cipher and wanted to evaluate 7 + 20 in a 26 element field, I could call:
execute function plus(7, 20, 26)...(expression) 1This lacks support for the built-in '+','-','*','/' operators though. A way to fix this would be to sacrifice flexibility and create a DISTINCT type for a member of a finite field of specific cardinality.
Example: the following SQL will create a new data type called finite5 representing a member of a finite field of cardinality 5, add operator support and test itself by generating arithmetic tables.
CREATE DISTINCT TYPE finite5 AS int;I also considered defining arithmetic functions for a ROW type of the form:
San Jose Informix Tech Fair Report
gbowerman 100000B5T0 Tags:  conference 1 Comment 4,933 Views
The San Jose Informix tech fair attracted a mixture of customers (from as far away as North Carolina) and IBM engineers, including some old Menlo Park colleagues who have recently come back to Informix development and QA groups from other projects, and some new hires in the IDS development teams who came along for the day to get some training.
The day started with an introduction to IDS 10.0 new features, followed by an HDR overview.
Two demo's accompanied lunchtime pizza, an HDR set-up and operation overview to show it really was as easy as promised in the preceding talk, and IDSAdmin for PHP (formerly known as phpIDSAdmin). IDSAdmin is an administration tool which utilizes some of the features due in the next major release of IDS.
The afternoon sessions were "IDS and the Websphere MQ Datablade", "Application Optimization Techniques", and a detailed look into the IDS Optimizer, including some of the new features.
IIUG kindly supplied some gizmos to give away, and attendees who made it through to the bitter end were treated to pristine condition vintage Informix mugs recently unearthed by archaeologists from a time capsule.
I enjoyed spending a week in the Bay Area revisiting some old haunts. Not much has changed. Suraj still has spicy tea, Shoreline still has night herons, and the 101 still needs repairing.
Bay Area Souvenier Photo
Black Crowned Night heron at Shoreline
[Read More]
Further thoughts on CoLinux
gbowerman 100000B5T0 Tags:  windows unix linux 2 Comments 5,579 Views
Since I last wrote about CoLinux it has become a useful tool within our team. In addition to the advantages of having a concurrent virtualized Linux server running natively on a machine that would otherwise be limited to Windows, a key factor for me is that the Linuxfilesystem is a simple Windows file. After configuring an instance (say installing IDS, CSDK, gcc, g++, make, Apache, php, Informix_PDO, Zend etc...) the filesystem can be saved as a zip file and shared with others.
If I do something reckless (like overwrite an OS threading library with a bad version) and trash the system, as long as I saved the filesystem prior to the misdeed, recovery is as simple as copying a file and restarting coLinux.
Setting up X-Windows is straightforward, the easiest way seems to be to install and start the CygWin X-Server on Windows and use the xhost command to allow access to the desktop. Set the DISPLAY environment variable in Linux to point to the Windows IP address, and x applications (once they're installed) should then display on Windows.
Networking issues - Basic network setup is straightforward and covered in the Wiki. This ONLamp blog post also has some useful suggestions for unplugged machines. I have yet to find a good wireless network solution though.
Update: This Wiki entry suggests specifying the MAC address of your wireless card to get wireless working with WinPCAP.
Typical usage scenario
Problem: We have a conference demo which uses the LAIP stack (Linux, Apache, Informix, PHP) - and the conference organizers only provide a Windows PC and a demo setup window of a few hours.
Solution: Set up the demo in CoLinux and when it's ready zip the filesystem and take it along on a flash drive. Set-up time is as long as it takes to install CoLinux and WinPCap, unzip the filesystem and start CoLinux on the demo machine. Alternative options would be to convert the demo to Windows (WAIP) and install and configure all the software, or maybe create a customized Linux live cd, but the CoLinux solution seems the simplest, and the same zipped archive can be used by anyone wishing to give this demo in the future.
As with other virtualization solutions it is also possible to run multiple CoLinux instances on one machine capable of communicating with each other, which would make for a useful self-contained high availability (e.g. HDR or ER) test/demo between two virtual servers.[Read More]
IDS Locks - new developerWorks article
gbowerman 100000B5T0 Tags:  sql performance 4,083 Views
There's a new developerWorks article by Eric Herber (of Informix Marketing Request List fame) entitled: Informix Dynamic Server locking, Part 1: Understand locking behavior and analyze locking conflicts in IDS which, among other things, includes some important differences between Informix and Ansi SQL isolation levels. Looking forward to part 2 which will cover Lock wait time, Dynamic lock allocation, Deadlocks, Lock wait situations.[Read More]
IDS - safe bet
Bookmaker Ladbrokes have extended their IDS support contract to include the OpenBet online betting application and are upgrading to IDS 9 for their sports books and gaming sites according to a report in today's Computing which includes this quote from Ladbrokes CIO Steve Maxwell:
The nature of our business means we require a strategic data server that virtually eliminates downtime and automates many of the tasks associated with deploying mission-critical enterprise systems.
Ardenta will be working with IBM and Ladbrokes to implement the upgrade.[Read More]
Bay Area Informix Tech Fair Reminder
gbowerman 100000B5T0 Tags:  conference 2,821 Views
The free Bay Area Informix tech fair is Thursday September 14th in San Jose. Send your RSVPs (or questions) to email@example.com if you can attend.
Here is a final list of planned talks and demos:
Bring your problems - engineers from Advanced Support and Development will be on-hand to discuss problems and answer questions. Hope to see you there.[Read More]
Informix Data Server Uptime Survey
gbowerman 100000B5T0 2,051 Views
Oninit is hosting an Informix Data Server Uptime Survey sponsored by Open PSL, aimed at gathering current data on how Informix software is being used. Responses will be put into a draw for an expenses paid trip to the European IDUG Conference in Vienna in October 2006. The survey closing data is September 14th 2006.[Read More]
Virtualization and CoLinux
Until fairly recently, a new Intel/AMD machine in the lab meant choosing which operating system to install on it. Nowadays semi-ubiquitous virtualization and free offerings from the likes of Vmware and Microsoft make it easier to run multiple concurrent operating systems.
For a personal computer, I can't be bothered with fully fledged virtualization software; if I want to run Windows and Linux concurrently Cooperative Linux fits the bill. CoLinux is a Linux daemon that runs natively on Windows. I recently gave the latest version a test drive. The installation and setup process was pretty simple..
cofs0:/ /mnt/cdrive cofs user,noexec,dmask=0777,fmask=0666 0 0
At this point CoLinux is pretty much configured. The Wiki has more detailed setup and configuration instructions (such as enabling swap space etc) and a FAQ. One thing lacking from the Debian image I tried was vi, but fixing that was as simple as running:
apt-get updateapt-get install vim
This also had the benefit of updating glibc as a pre-requisite. On Fedora it's a good idea to run yum update to get the basic software up to date.
Next I tried installing Informix Dynamic Server - ok probably not a supported configuration but it works. So far only installed IDS version 7.31.UD10 as it was the smallest tar file that was lying around. The fedora 2GB filesystem image had 1GB of free space and additional filesystems can be added so plenty of room for any version plus dbspaces (not looked into to whether there's a way to implement raw devices for dbspaces).
IDS installation was standard, created an informix user and group with:
groupadd informixuseradd informix -d /informix -g informix -m
Copied the IDS tar file to c:\temp, and then untarred it directly into the chosen INFORMIXDIR with:
tar xvf /cdrive/temp/ids.7.31.UD10.LINUX-I32.tartar xvf IDS.tar
The rest of the installation was identical to installing IDS on any Linux machine - set INFORMIXDIR, run installserver as root, create an environment file to set INFORMIXDIR, INFORMIXSERVER, PATH, ONCONFIG, create and edit an onconfig file, add an sqlhosts file onipcshm entry, create an empty root dbpsace file. Here's the oninit -ivy output...
It's good to have Linux on Windows this accessible, and there are plenty of possibilities for making it easier.. such as running Samba to access the Linux filesystem from Windows, setting up sshd, sftpd. Should make for some interesting configuration tests, like running Enterprise Replication between IDS on Windows and IDS on Linux on the same machine..
Update 9/5/06: Tried installing the latest IDS 10.0 (10.00.UC5W3) on CoLinux with the Fedora 2.6 filesystem - the only gotcha is that IDS 10.0 has a dependancy on libstdc++.so.5 and the gcc version I'd installed had a later version, so to get IDS working I borrowed libstdc++.so.5 from another Linux machine - after that IDS installed and ran fine (and fast). This IIUG post by Andreas Breitfeld tells you what you need to know to get IDS 10+ working with Debian.[Read More]
Oracle to Informix Dynamic Server Porting Guide
Having seen various iterations of this guide over the years, it's good to see the latest version available on developerWorks: Oracle to IBM Informix Dynamic Server porting guide. The guide draws on the experiences of consultants doing real migrations, development engineers, with collaboration and feedback from various other teams. This version runs to 90 pages and is up to date with Oracle 10g release 2, IDS 10.0 and recent Migration Toolkit enhancements.
The porting guide is continuously refined by feedback and experience and as noted in the introduction:
This document is intended to be a living document. Missing items, better ways of implementing Oraclefunctionality in Informix other than what is documented here, examples to better illustrate a point, andother suggestions should be sent to Sam Marino so they may be included with future revisions.If your attention span/available time doesn't run to 90 pages there's a good developerWorks introductory article to new MTK features here: Migrating to IBM database servers gets easier with the latest MTK release.[Read More]
Deadline looms for IDUG 2007 - North America
gbowerman 100000B5T0 Tags:  conference idug 3,019 Views
Got something to say? Say it at IDUG North American Conference 2007 and get free admission. The deadline for abstracts is September 1st 2006, so if you were thinking about submitting a presentation now is the time to visit the website. The 2007 conference is on May 6-10 in San Jose California, home of the San Jose Sharks and the safest big city in America. Here are the links:
Conference Website
Presentation Guidelines
Online Submission Form
And of course the conference already has its own blog.[Read More]
Mandelbrot stored procedure test drive
gbowerman 100000B5T0 Tags:  sql mathematics 2,429 Views
Just for fun (and QA) I ran some complex plane coordinates through my mandelbrot() stored procedure and displayed the output using the java.awt.Graphics package. Here's the result..
To save coding I took an example program from the Java Developer's Alamanac 1.4 and replaced the code inside the loop that generates a pixel in the Mandelbrot set image with:
String sqlstr = "execute function mandelbrot(ROW(" + p[c] + "," + q + ")::complex)";rs = stmt.executeQuery(sqlstr);rs.next();pixels[pIx++] = (byte)(rs.getInt(1) % 16);
Perversely I implemented the most inefficient method possible - generating and selecting each pixel individually over the network, which if nothing else provided ample time to monitor the stored procedure stack with onstat -g ses.
To utilize the power of IDS in a practical scenario the coordinate and generated data would be stored in a table. For a real example of an Informix powered scientific project, check out Barrodale Computing Services R&D - the Grid Slicer Demo is fun (here's a PDF write-up: http://www.barrodale.com/docs/ibm_grid_writeup.pdf).[Read More]
Circles of DLL Hell
gbowerman 100000B5T0 Tags:  windows 4 Comments 7,595 Views
The term DLL hell is usually invoked with reference to conflicts between DLL versions, missing DLLs and multiple copies of DLLs. In the 14th century the poet Dante portrayed metaphysical hell as having multiple layers or circles, and in my opinion the analogy readily extends to DLL hell.
What concerns me lately I'll call the fifth circle - the swamp-like water of process address space, where wrathful DLLs fight over load addresses and slothful DLLs lie gurgling beneath the surface, fragmenting contiguous space.
A process running on 32-bit Windows has 2GB of address space by default. Into this space it needs to fit any operating system and application DLLs it loads, as well as any shared memory segments it attaches to. A DLL can have a default load address set at link time, and the operating system DLLs are usually set to load in the top 256 Mb of process address space, above 0x70000000. Incidently, a great tool to view DLL load addresses and process address space on Windows is Process Explorer from sysinternals.com.
Applications which attach to IDS shared memory segments, such as oninit, onstat, onbar need a contiguous free block of address space as large as the segment they are attaching to. So if onstat connects to the Resident segment and onstat -g seg shows it to be 1GB in size (due to the number of buffers configured for example), the onstat address space will need a 1GB contiguous gap where no DLLs are loaded. The first place it will try and attach the resident segment is the value of the onconfig parameter SHMBASE which is where oninit attaches it. The default SHMBASE value on Windows is 0xC000000.
The problem starts when when a DLL has a base address somewhere in the middle of the process address space. This fragments the address space and reduces the maximum size of shared memory segment that could be attached. If base address is not set at link time, DLLs have a default address of 0x10000000. A DLL loaded there would certainly cause a problem as it's only 64 Mb higher than default SHMBASE. If a process loads multiple DLLs which have a default load address of 0x10000000, one will be loaded there and the rest will be dynamically rebased to wherever the OS sees fit.
There are currently two defects for XBSA DLLs loaded by onbar which are set to the default load address and hence onbar returns errors in larger IDS shared memory configurations:
IC50204 TDPI CAUSING ONBAR ERROR CODE -43399 WITH RESIDENT SHARED MEMORY SEGMENT BEYOND CERTAIN SIZE ON WINDOWS - this one only relates to the XBSA DLLs supplied with Tivoli Storage Manager
CA Storage Manager XBSA DLLs also have this problem - in the past we've had to rebase their DLLs to make them play nicely with onbar.
These defects are currently open, though Technical Support can work around the problem for you by rebasing the DLLs manually using the Windows Platform SDK rebase tool.
What can be more frustrating is when an operating system DLL has a load address outside of the recommended system DLL range of 0x70000000 to 0x7FFFFFFF. Windows currently has several bad DLLs which can cause problems for IDS:
873453 The base memory address setting of the Samlib.dll file in Windows Server 2003 may interfere with programs that require a large shared memory setting
894472 Third-party programs that require lots of memory do not run in Windows XP Service Pack 2
912570 Programs that require lots of memory may not run after you install Windows Server 2003 Service Pack 1
913409 A program that allocates a large block of contiguous memory may not start or may intermittently fail in Windows Server 2003
924054 Programs that request lots of contiguous memory may fail after you install security update 921883 (MS06-040) on a Windows Server 2003 Service Pack 1-based computer or a Windows XP Professional x64 Edition-based computer
If you are experiencing problems with onbar or other IDS utilities on Windows which go away when the number of buffers is reduced you may be in this particular circle of DLL hell. Depending on the problem the solution could be to request a patch from Microsoft, or seek help rebasing XBSA DLLs from tech support. Now would be a good time to familiarize yourself with Process Explorer to assist with the troubleshooting. A good way to determine the base address of a DLL is to use the Windows Platform SDK utility dumpbin.exe. E.g. to see the base address of xpsp2res.dll type:
Some additional process address space can be opened up by setting the /3GB boot.ini switch - this will provide an extra 1GB of address space above 0x80000000 for any process which is built with the IMAGE_FILE_LARGE_ADDRESS_AWARE in the process header (and IDS binaries are built with this).
One glimmer of light on the horizon is that when x86_64 IDS is available for for Windows 64-bit, this problem should largely be a thing of the past. Shared memory segments larger than 2GB will be available, and we can start ascending the terraces of DLL Purgatory - ok I probably took the analogy too far that time.
Before anyone asks when the x86_64 Windows port of IDS will be ready, that has not been finalized yet; all I can say is that it is in progress.[Read More]
SQL and the Complex Plane
gbowerman 100000B5T0 Tags:  sql mathematics 4,150 Views
The IDS User-Defined Routines and Data Types Developer's Guide hasa Complex Number example data type which creates acomplex number row type and defines overloaded plus and divide operators for them to support adding two complex numbers and dividing a complex number by an int:
CREATE ROW TYPE complex(r FLOAT, i FLOAT);
Once these operators are supported functions like sum() and avg()start working for complex numbers. This made me wonder about building a more complete treatment of complex numbers into the server, and how much can be donewithout resorting to external functions. How about the product of two complexnumbers which is defined as:
Following the same logic as the documented example, these, along with the modulus could be defined as:
CREATE FUNCTION times(c1 complex, c2 complex) RETURNING complex; RETURN row((c1.r * c2.r) - (c1.i * c2.i), (c2.r * c1.i) + (c1.r * c2.i))::complex;END FUNCTION;
Let's put it to the test. Multiplying i*i should result in -1.
CREATE TABLE t1(col1 complex);insert into t1 values(ROW(0,1)::complex);select col1*col1 from t1;...(expression) ROW(-1.00000000000,0.00)1 row(s) retrieved.
So far so good.
Now let's see if these functions can be used as the basis for more advanced operations such as transformations in Wessel's complex plane. I'll pick theparticularly scenic subset of the complex plane known as the Mandelbrot set, which is built by repeated iterations of the transformation
Here's a function written in Stored Procedure Language that takes a point on thecomplex plane as an argument and returns 0 if it is a member of the Mandelbrotset, or the number of iterations used to determine that it is not a member ofthe set, which could then be charted as a colour by a client application.
CREATE FUNCTION mandelbrot(c complex) RETURNING int;DEFINE iter, max_iter, result int;DEFINE z complex;LET max_iter = 999;LET z = ROW(0,0)::complex;FOR iter = 1 TO max_iter LET z = (z*z) + c; IF modulus(z) > 2 THEN EXIT FOR; END IF;END FOR;IF iter > max_iter THEN LET result = 0;ELSE LET result = iter;END IF;RETURN result;END FUNCTION;
Let's test a couple of coordinates:
execute function mandelbrot(ROW(0,1)::complex);execute function mandelbrot(ROW(1,1)::complex);...(expression) 01 row(s) retrieved.There you have it, the Mandelbrot set constructed entirely from SQL & SPL! I'm not sure ifI'll ever get around to writing a client to call this function and display the results for a set of coordinates.
Update 8/25/06: I got around to it here.
In case you're wondering what possible use there could ever possibly be for constructing a Mandelbrot set using SQL.. well, probably none, it's just a thought experiment to push the IDS built-in mathematics capabilities and see where they go...[Read More]
New PHP and IDS tutorial
The latest DB2 magazine has a PHP and IDS tutorial that makes a great introduction to using PHP with Informix. Compare this with the earlier developerWorks articles: A step-by-step how-to guide to install, configure, and test a Linux, Apache, Informix, and PHP server and A step-by-step how-to guide to install, configure, and test a Windows, Apache, Informix, and PHP server.
On the subject of new IDS articles developerWorks recently added a guide to making use of the powerful Archecker utility: Perform point-in-time table-level restore in Informix Dynamic Server.[Read More]
Thoughts about Handler's Diary
Following IBM's Informix security announcement on July 31st and David Litchfield's corresponding Informix vulnerability disclosures at the Black Hat conference, news reports have been slowly popping up. Some, like this: searchsecurity.techtarget.com have been fairly accurate. Others have reported the vulnerabilities but omitted to mention that IBM has actually fixed them all, like this one: upi.com - I tried submitting a comment to that page pointing this out last week, but the page still says "No Comments Exist".
Yesterday the SANS Institute Internet Storm Center blog Handler's Diary covered the story. The article concludes with:
So given the facts above, are you asking the right questions of your vendors? How certain are you thatyour favorite software vendor is writing secure code? Do you have the ability to change software packages if you find that a product has been found to have basic programming errors? And can your organization afford to let known holes live unpatched for 1.5 years?
These are all good questions to ask, but give a misleading impression of how IBM handled the situation. Here's how IBM worked with NGSS from an inside perspective...
In 2004 David Litchfield at NGSS contacted IBM to advise that he was planning to look at Informix Dynamic Server and asked if we could provide him with some software. This enquiry was welcomed by IBM as it was known that NGSS is responsible in giving vendors time to fix problems discovered before announcing them, and gave us the opportunity to discover and resolve problems in a controlled manner, the end result being a much more secure product, so a recent copy of IDS was sent to NGSS for testing.
We were aware of press reports about Oracle having yet to address hundreds of security problems discoverd by NGSS so set about putting together an international team of advanced support, development engineers and IDS architects to address any reported problems as quickly as possible as well as look for unreported problems in these areas of the code. Beginning in January 2005 problem reports started coming in and around 20 individual problems were reported to us in total and each one was immediately assigned an owner to reproduce the problem, log a defect and start fixing it. Each fix was peer reviewed, development reviewed and put through QA. Some problems were determined to be duplicates of known problems which were already fixed, others were determined to be test case errors, some fixes resolved multiple problems. For the purposes of IBM's announcement these problems were categorized into 14 individual fixes, which started appearing in IDS fix-packs around May 2005. Throughout this process NGSS and IBM actively co-operated in understanding and reproducing the problems.
So if the problems were fixed and in IDS fix packs a year ago why did IBM only recently announce them? From the beginning the announcement was planned to coincide with David Litchfield's announcement to make sure as many customers as possible already had the fixes in place before they were published (this is particularly important for older code branches like 7.31 which has an annual fix-pack release cycle). David informed us a few weeks ago that he would be publicising them at Black Hat 2006 so the IBM announcement was made the day before. The main goal for IBM throughout was to learn from the mistakes of other database companies and make sure that the fix for every problem was in generally available versions of IDS before it was made public. This goal was achieved.[Read More]
Same team different name
gbowerman 100000B5T0 2,221 Views
The Resolution Team is dead, long live the Resolution Engineering and Development (or RED) Team. Apparantly there was another completely different team with a similar name somewhere in the IBMosphere, so to avoid confusion we underwent nomenclature metamorphosis. The new name is slightly more descriptive of what RT, I mean the RED team, actually does.[Read More]
What to collect in a hang situation..
gbowerman 100000B5T0 Tags:  troubleshooting unix 1 Comment 5,247 Views
Suppose you find your IDS instance hung? There are users waiting and you need to run some diagnostics quickly.. what information do you collect? Hopefully you'll never be in that situation thanks to IDS's legendary uptime but it's good to be prepared..
A new Technote is available which includes a (UNIX) script to gather information that will be useful to Technical Support: What to collect if a IBM Informix IDS server gets hung. Give it a try and see what you think. You can enter feedback directly, or put it here and I'll forward it to the author.[Read More]
IDS 10.0 supports multiple MSC VPs
gbowerman 100000B5T0 Tags:  performance 2 Comments 5,224 Views
Until Informix Dynamic Server 10.0 the number of MSC (or Miscellaneous) Virtual Processors was limited to one. With IDS 10.0 multiple MSC VPs can be configured using the VPCLASS onconfig parameter (e.g. VPCLASS msc,num=2), or added dynamically using onmode -p 1 msc.
What does that mean and why would I want to use it?
The MSC VP is a type of AIO VP, executing operating system calls on behalf of other threads. While the AIO VP mainly takes care of filesystem I/O calls the MSC VP executes some network and authentication calls like getpwnam(), gethostbyname(), gethostbyaddr() etc. (It also maintains some statistics like VP CPU usage.) The MSC VP gets used at client connection time for the operating system part of user validation, and in most cases one is sufficient.
Get to the point
In some cases, for example when a connection pool creates a large number of client connections at once, and/or when a PAM (Pluggable Authentication Module) implementation causes the operating system part of user authentication to take longer, the MSC VP can either be very busy serving the new connections or waiting for the OS to respond. When this happens new client connections can take longer to service and users will see a longer delay when connecting for the first time. Situations like this might benefit from having an extra MSC VP. Running onstats like onstat -g iov, onstat -g glo and onstat -g stk <tid> can help show what the MSC VP is doing but keep in mind there are other possible causes when new connections experience delays (such as operating system and network problems) so some troubleshooting (and tech support assistance) would generally be required, but at least dynamically adding a VP is an easy test to make if you suspect this might help.[Read More]
IOD Conference, Anaheim, Oct 15-20 2006
gbowerman 100000B5T0 Tags:  iod conference 3,103 Views
The classes and presentations are being finalised for the IBM Information on Demand conference at Anaheim on October 15-20. Here's the flash:
The main Informix related topics can be viewed here: Data Servers - Informix, also scheduled are some pre-conference technical education courses on Sunday 14th, including a one day Informix Dynamic Server Problem Determination Class. I'm scheduled to talk about "Rapid Development using Java Server Pages (JSP) and IDS" on the Wednesday, though I hope I get to attend the rest of the conference. Entertainment will be provided by Wayne Brady and Gladys Knight! among others.
Here's a link to the conference blogs.[Read More]
IDS on Windows Series at jgp.net
There are some useful "getting started" articles about installing IDS on Windows at Jean Georges Perrin's website: IDS on Windows Series. Every step of the installation includes a picture so it's worth a look for anyone wanting a little more graphic detail than the IDS Installation Guide for Windows. Note these articles have been linked from IIUG website since June.[Read More]
Update on IDS Security Fixes
Following the recent IBM disclosure concerning the IDS security fixes, David Litchfield of NGSS announced the vulnerabilities at Black Hat 2006 this week.
At the risk of sounding biased, here are a couple of quotes from the SearchSecurity.com write-up that to me illustrate the differences in the approach of IBM and certain other database companies when it comes to fixing security vulnerabilities:
"The good news, Litchfield said, is that IBM has already addressed the flaws in versions 7.31.xD9, 9.40.xC8, or 10.00.xC4. Unlike his often strained exchanges with Oracle, Litchfield said IBM has been responsive."
"While the Informix problems have been addressed, Litchfield said they point to a larger issue: Database flaws are pervasive throughout the industry. He again used Oracle as an example, noting how the database giant has fixed more than 100 serious flaws but has yet to address another 400-plus vulnerabilities, which is the estimated number of unpatched flaws according to his work and that of other researchers."
A key lesson that NGSS often repeats is to make use of the existing security features available in your data server and operating system to restrict unauthorized access and hence minimize the opportunity for malicious use. For IDS look out for Jonathan Leffler's Paranoid DBA presentation and note the new Security chapter in the IDS 10.0 Administrators Guide.[Read More]
The rise of Informix
gbowerman 100000B5T0 Tags:  sales 4 Comments 4,564 Views
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