With XP and Windows Server 2003 having Remote Desktop functionality built-in it's become a standard way to maintain lab machines and to work remotely. I tend to use a combination of VNC for Windows 2000 and Remote Desktop (which I'll refer to as Terminal Services from now on) for W2K3 and 64-bit windows.
To support multiple sessions, applications running on terminal services clients need to specify Global namespaces when connecting to server objects (such as shared memory). When the APIs changed, a few fixes were required to Informix Dynamic Server to fully support terminal services.
Some people may run into problems using terminal services on XP as there are various trialware copies of IDS 9.40.TC2 for Windows floating about, including one downloadable from IIUG. The last terminal services bug was ironed out in IDS 7.31.TD9 and 9.40.TC5. (IDS 10 fully supports terminal services.)
For the completist, here are the bug fixes (with links to technotes where relevant):
151637 'ONSTAT -' IN 'TERMINAL SERVICES' SESSION REPORTS 'SHARED MEMORY NOT INITIALIZED ...' - fixed in 7.31.TD5 and 9.30.TC6 and higher
161355 SERVER INSTALL ON A FRESH XP MACHINE REPORTS THAT THE SERVER WAS NOT INITIALIZED CORRECTLY EVEN THOUGH THE SERVER INITIALIZED SUCCESSFULLY - fixed in 7.31.TD9 and 9.30.TC6 and higher
162925 SERVER INSTALLED ON .NET MACHINE REPORTS THAT THE SERVER WAS NOT INITIALIZED CORRECTLY EVEN THOUGH THE SERVER INITIALIZED SUCCESSFULLY - fixed in 7.31.TD9 and 9.40.TC4 and higher.
165897 ONBAR CAN FAIL WITH 'NO RESPONSE WAS RECEIVED FROM THE DATABASE SERVER' ON WINDOWS WITH TERMINAL SERVICES - fixed in 7.31.TD9 and 9.40.TC5 and higher.
Administrating and Developing with Informix
gbowerman 100000B5T0 2,230 Views
Though IDS interim releases are usually regarded as bug-fix releases, every interim release since 10.00.xC1 has included a set of new features.
I plan to look at some of the upcoming 10.00.xC5 features later this month, but should first mention the xC3 and xC4 features (note 10.00.xC2 was not a general release). The following list is mainly borrowed from one of ScottishPoet's recent comp.databases.informix newsgroup posts:
New Features in Version 10.00.xC3
- to this I should add support for multi-threaded multiple listener threads on Windows (catching up with the UNIX 10.00.UC1 feature), and Tivoli TDP for Informix support on Windows.
New features in IDS 10.00.xC4
Some of these, particularly TRUNCATE TABLE can have a huge performance impact. There are more performance improvements on the way in xC5 too, along with security and Windows-specific features.[Read More]
The Informix tech fair took place today here in a pleasantly cool and sunny Beaverton. The main events were:
Informix Application Development Overview - my survey of the available Informix drivers and code examples in various languages. I was surprised to learn how much Informix open source activity there is out there when researching this talk, and thank Jonathan Leffler for providing some very useful material.
A surprise demo of a phpIDSAdmin - an IDS admin tool we've been putting together which demonstrates some of the new server administrative features coming up in IDS 10.5.
Sun Technology Talk. Greg Kriekenbeck from Sun spoke about IDS 10 on Solaris 10 and shared some results from recent benchmarks they've been running. He highlighted some of the performance and tracing features in the open source Solaris 10 OS. The Sun team reminded us of the competition to Win a free $20K Sun AMD Opteron 64bit Server.
Free pizza and a chat with some of the local IDS developers.
Ian Ilsley's Introduction to IDS Extensibility - covering UDRs, datatypes, blades and some of the newer extensibility features in IDS 10.
Rekha Nair from the Migration Team showed us a demo of the latest IBM Migration Toolkit (MTK) which now includes tools to migrate from Oracle and Sybase SQL Anywhere to IDS, with more features coming soon.
Hyun-Ju Vega's IDS Fragmentation (Table Partitioning) talk - including defining fragmented tables, altering, attach/detach, monitoring and new fragmentation features in IDS 10.
The day ended with a quiz to win a glamorous IBM laptop briefcase thing. Overall it went well, there are even rumours there might be a tech fair in Menlo Park later in the year.[Read More]
gbowerman 100000B5T0 2,664 Views
Informix marketing can be a contentious topic amongst Informix aficionados, the feeling in some quarters being that there should be more of it and it should be better, or to paraphrase Stuart Litel: "if Informix sold sushi they'd have called it raw dead fish".
I saw some interesting sales numbers this morning. The exact numbers are not public information but I can say with my clear technical support conscience that IDS sales and revenue experienced impressive growth in the last quarter, and that marketing is being stepped up.
All I've heard officially on the Q1 revenue is (and I quote):
"IBM is investing to grow the IDS business into the future. It is now a strategic server in the Information Management Portfolio. We have embarked on several initiatives including ISV revitalization and business partners enablement. Along with renewed customer confidence in IDS' future, we have seen very positive Q1 results in our efforts to grow the IDS business."
I've also seen the number of IDS development engineers grow (including many senior engineers coming back to IDS) recently, several of them here in Beaverton which is great for us, so right now I'm experiencing mildly elevated serotonin levels on the subject of where IDS is going, though that could be the cup of tea I just had.[Read More]
Currently trying (without much success) to ignore all distractions and work on my presentation for the Informix Tech Fair next week.
Question of the hour
Q. Is there an easy way to see which users have been granted dba privileges for a database?
A. Connect to the database and run the following query:
select username from sysusers where usertype = 'D' and username != 'informix';[Read More]
There isn't much to starting IDS on UNIX - set your environment (INFORMIXSERVER, INFORMIXDIR, ONCONFIG, PATH) and run oninit as user informix or root.
Making IDS start automatically when the machine is started can be a little more challenging as you need to edit the /etc/rc.d files to set the environment and launch oninit.
On Windows IDS is designed to run as a Windows service and there are more ways to start it. At least making IDS start automatically is easier, just locate the IDS service in Control Panel->Administrative Tools->Services and modify the Properties to set Startup Type to Automatic. Another good thing is that for most startup methods, there is no need to set the environment.
Here's a look at the methods of manually starting IDS on Windows and their relative merits:
The GUI method - fine for starting manually with GUI access to the machine.
net start %INFORMIXSERVER%
The standard command line method for starting a Windows service. Disadvantage: doesn't let you pass command line arguments to oninit.
Does what net start does but allows oninit command line arguments. For example to bring an IDS instance to quiscent mode:
starts %INFORMIXSERVER% -s
Run oninit from the command line.
The oninit.exe process can be launched in foreground by setting the IDS environment and running oninit directly. Unlike on UNIX where it will fork and return you to the command prompt, it will run in foreground and not return the DOS prompt to the command line. Generally this is not recommended but can be useful when:
1. Troubleshooting a problem with the IDS service - sometimes if the IDS service won't start, launching oninit in foreground can help eliminate possible causes - for example if the IDS Service informix user password is set incorrectly.
2. Launching IDS in a relative directory to run HDR between two instances on the same machine (see an earlier post).
Update June 9 '06:Run oninit.exe from a command shell in background.
I hadn't thought about this method until I saw a comp.databases.informixthread that mentioned it. If you start a command shell as informix (or use runas) and run start /b oninitthe oninit.exe process will be launched in a background command window. This is a way to see verbose output from oninit, but still keep the process running in background. Because it's not running as a Windows service, oninit will not get its environment from the HKEY_LOCAL_MACHINE/Software/Informix/Online/%INFORMIXSERVER%/Environment registry key but from the user's environment. This is not necessarily a disadvantage as long as it is understood - in fact sometimes it can be an advantage. The only inconvenience is the need to be the informix user when you run it. You could work around this by wrapping it in a runas script like this:
runas /env /user:informix "start /b oninit"
I typically use the starts method. For example the following batch file shuts down and re-starts IDS (assumes you have a gnu, Cygwin or equivalent tool like sleep installed), and takes command line arguments:
onmode -yksleep 4starts %INFORMIXSERVER% %*[Read More]
Back from vacation to find a nice brew of problems awaiting... meanwhile here's the flyer for the next Informix Tech Fair here in Beaverton:
Informix Tech Fair
FREE Informix Tech Fair
Talks include the following topics:
IBM Informix Advanced Support & Development Speakers:
Guy Bowerman, Ian Ilsley, Hyun-Ju Vega, John Miller
Come and see demos integrating several application technologies.
Free ConsultingHaving a problem or question about Informix? Talk to an engineer and get free advice about your specific issue. Time is limited.
WHEN: May 2, 2006 between 9:15 – 4:30
WHERE: IBM Beaverton
15300 SW Koll Parkway
Beaverton, OR 97006
If you're in the area drop by. If you have any questions post a comment here or RSVP.[Read More]
gbowerman 100000B5T0 2,109 Views
I'll be out on vacation for a few weeks. This blog will be back on April 19th.[Read More]
Setting up High-Availability Data Replication (HDR) is well documented, but users of IDS on Windows have to jump through one extra hoop compared to UNIX users.
When IDS is installed and initialized on Windows it puts the dbspaces in a path which contains the INFORMIXSERVER name. For example c:\ifmxdata\my_server1\rootdbs_dat.000.
A requirement for setting up HDR between two servers is that they both have the same dbspace paths, so in this example if the secondary server is called my_server2 the IDS instance will need to be re-initialized with a new root dbspace location to match that of my_server1.
Setting up HDR on a single machine
Suppose for testing purposes you want to operate HDR between two instances on a single machine (something our QA department likes to do from time to time)..
On UNIX this can be done by setting the onconfig parameter ROOTPATH to a relative value (as opposed to an absolute path), for example "rootdbs". This will cause oninit to look for a root dbspace in a path relative to its current working directory (which is wherever oninit was started from). If the primary and secondary HDR servers are installed in different directories but have the same relative path settings for dbspaces the standard set up method can be followed and the instances can connect and replicate successfully even on the same machine.
On Windows IDS is generally started as a Windows service... so what is the current working directory of the oninit process?
The answer is %INFORMIXDIR%\bin - so to set up HDR between two instances on a single Windows machine:
1. Install two IDS instances in separate directories.
2. Create an empty root dbspace file somewhere under %INFORMIXDIR%\bin for each instance.
3. Set the ROOTPATH onconfig parameter to the relative location under %INFORMIXDIR%\bin for each instance.
4. Follow the standard HDR set up steps.
Having to put a dbspace under the bin directory is a bit of a kludge and a bug (176568) was recently logged to address that.
A colleague reminded me there is one way you can choose the current working directory for the oninit process on Windows, and that is to run oninit in foreground - it will pick up the cwd from the location of the command line prompt as it does for UNIX - following this method you wouldn't require the IDS instances to be installed in different directories - just start them from different directories. The only downside is you are left with two windows running oninit.exe in foreground on your desktop.[Read More]
As of March 26th version 2.2 of InformixDB - the open source Python extension module for connecting Python applications to IBM Informix database engines - is available. New features include support for BOOLEAN types and improved support for DECIMAL and MONEY as well as various bug fixes.
For more information on how to use InformixDB check out the InformixDB manual, and the README.[Read More]
RSS feeds provide a convenient way to display up to date information directly in your Firefox browser toolbar. I for one spend more time perusing the BBC News and Slashdot feeds than I should.
Implementing an RSS feed that displays database information is very simple, hence the 5 minute Informix RSS feeds..
These two examples, for JSP and PHP, display a summary of the last 20 orders from the IDS stores_demo database. They both use the following IDS 10.0 SQL query:
Five Minute JSP Informix RSS Feed
If you have a working Tomcat installation setting it up to work with Informix JDBC drivers is as simple as copying the JDBC jar files into $CATALINA_HOME/common/lib and restarting.
Customize the machine, Informix Server and links in this code and create a new Tomcat webapp. The resulting URL can be added to the Firefox toolbar as a Live Bookmark.
Five Minute PHP Informix RSS Feed
Here's the equivalent code in PHP. This example uses the Informix PDO Driver.
This should result in the same output as the JSP example.
The look of the XML output when viewed from a browser can be improved by using an XSL stylesheet, and various parameters such as refresh interval (TTL) can be tweaked. There are some good RSS tutorials and books available, or it can be fun to reverse engineer the stylesheet of your favourite news feed to see what they do.[Read More]
If you've ever used dbaccess on Windows and have your Command prompt screen buffer height set to greater than the old default of 25 lines, you've probably seen the screen buffer corrupted after exiting from dbaccess. A typical symptom is getting a directory listing by running 'dir' and seeing the listing obscured by fragments of earlier screen output.
I'm pleased to report this problem is finally resolved, with the fix of product defect 175362:
DBACCESS CORRUPTS CONSOLE BUFFER WHEN EXITING ON WINDOWS
With the fix in place, the screen buffer is saved when dbaccess is started, and correctly restored upon exit. Look for this in the next IDS interim version, 10.00.TC5, or for those who can't wait, the fix is already available in the 10.00.TC4W2 post-interim drop.
So, you might be wondering, when is IBM going to offer a fully featured interactive GUI SQL editor for Informix?
There are some interesting projects currently underway in this area, I hope to provide more updates soon.[Read More]
Firstly, welcome to the Informix Application Development blog coming to you from rainy Beaverton, Oregon. I plan to use this blog mainly for Informix application development technical notes and tips, and anything else pertaining to Informix that crosses my mind.
I needed to set up a connection pool for a JSP application using Tomcat 5.5 and the Informix 3.0 JDBC driver recently and had a hard time finding any Informix specific instructions, so thought I might aswell start with that..
Since connection is an expensive part of a JDBC application it makes sense to maintain a connection pool, particularly for simple applications which connect/disconnect each time the page is viewed. Tomcat 5.5 comes with the Jakarta Commons Database Connection Pool implementation built-in so configuring a connection pool to work with any JDBC driver is fairly straightforward, and can be divided into 3 steps. In the following notes $CATALINA_HOME is assumed to be the path where you installed Tomcat, the application under webapps is called jspdemo, the INFORMIXSERVER is ol_myserver on mymachine:
1. Add a Context entry to conf/server.xml.
The Context entry goes in server.xml before the end of the Host definition </Host>. Add a Context entry for each connection URL required.
Edit $CATALINA_HOME/conf/server.xml and add:
Read the Tomcat documentation for more information on the resource parameters such as maxActive and maxIdle.
2. Add a Resource reference to WEB-INF/web.xml.
If the application directory is jspdemo, the web.xml file will be:
$CATALINA_HOME/webapps/jspdemo/WEB-INF/web.xml - If you don't have one a Tomcat tutorial should guide you through creating a basic one. Before the </web-app> tag add the following:
Note the res-ref-name is the same as the Resource name defined in server.xml.
3. Modify the JSP application to get the Connection from the connection pool.
Add javax.naming.*,javax.sql.* to your JSP page import tag.
Replace the old
Connection conn = ...with:
Restart Tomcat to re-read the server.xml settings and the connection pool should be operational. After a few connections run onstat -u at the database server to see the pooled sessions.