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]
Administrating and Developing with Informix
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]
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]
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]
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]
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:
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]
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.
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]
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]
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...
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]
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]
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]