Panther: EXISTS or NOT EXISTS

This article is written in English and Portuguese
Este artigo est� escrito em Portugu�s e Ingl�s

English version:

I'll continue with the quick and easy posts about Panther (v11.70). This time I'll focus on some new SQL that was added in Panther. Most (if not all) CREATE and DROP statements now allow for IF NOT EXISTS and IF EXISTS clauses respectively. These clauses allow us to write CREATE/DROP statements that will not raise errors in case the objects already exist and we're trying to create them, or when they don't exist and we're trying to drop them.
As an example:


panther@pacman.onlinedomus.net:fnunes-> onstat -

IBM Informix Dynamic Server Version 11.70.UC1 -- On-Line -- Up 00:03:17 -- 369588 Kbytes

panther@pacman.onlinedomus.net:fnunes-> dbaccess stores -

Database selected.

> DROP TABLE test;

206: The specified table (test) is not in the database.

111: ISAM error: no record found.
Error in line 1
Near character position 15
> DROP TABLE IF EXISTS test;
>

These two clauses can be used for TABLE, PROCEDURE, FUNCTION, DATABASE, INDEX, ROLE etc. (both for create and drop).
This can be used in scripts to prevent that they abort prematurely. Also interesting is the fact that this syntax can be found on mySQL. So it's easier now to port existing code into Informix.



Vers�o Portuguesa:

Vou continuar com os artigos r�pidos e f�ceis sobre a vers�o 11.70 (Panther). Desta vez vou abordar uma mudan�a no SQL que foi adicionada ao Panther. A maior parte (se n�o todas) as instru��es CREATE e DROP suportam agora as cl�usulas IF NOT EXISTS e IF EXISTS respectivamente. Estas cl�usulas permitem-nos escrever instru��es CREATE/DROP que n�o geram erros caso os objectos j� existam e os estejamos a tentar criar, ou quando n�o existem e os estamos a tentar eliminar.
Como exemplo:


panther@pacman.onlinedomus.net:fnunes-> onstat -

IBM Informix Dynamic Server Version 11.70.UC1 -- On-Line -- Up 00:03:17 -- 369588 Kbytes

panther@pacman.onlinedomus.net:fnunes-> dbaccess stores -

Database selected.

> DROP TABLE test;

206: The specified table (test) is not in the database.

111: ISAM error: no record found.
Error in line 1
Near character position 15
> DROP TABLE IF EXISTS test;
>

Estas duas cl�usulas podem ser usadas para TABLE, PROCEDURE, FUNCTION, DATABASE, INDEX, ROLE etc. (tanto para o CREATE como para o DROP).
Isto pode ser usado em scripts para evitar que abortem prematuramente. Tamb�m � interessante o facto de que esta sintaxe pode ser encontrada no mySQL. Portanto ser� agora mais f�cil portar c�digo existente para Informix

New blog from Paraguay

This article will only be written in English
Este artigo s� tem vers�o Inglesa. Para ver esta not�cia em Portugu�s consulte o site do Cesar Martins

There is a new south American blog, written in castilian. It's located here:

http://informixpy.blogspot.com/

The author is Javier Gray.
Apparently Javier wants to translate some articles from other blogs (he already did it once from Cesar's blog) besides writing his own articles. Javier also requested my permission to do the same from my blog. So, permission is granted as long as a reference to the original author is kept (as he did with Cesar's article). Hopefully, some of this blog's articles will be available in English, Portuguese and Castilian! That's great! Anybody wants to pick up for French and Chinese (and others?)

Informix today: an executive statement / Informix hoje: Declara��o de um executivo

This article is written in English and Portuguese
Este artigo est� escrito em Portugu�s e Ingl�s

English version:
I'm doing a pause in the Panther related articles to make echo of something equally important. The ones more involved in the Informix community surely recognize the name of Robert D. Thomas. He's an IBM executive, more precisely a vice president for Information Management and he has been addressing some communications to the Informix community.
He did it in March and he's doing it again
I won't repeat here what he writes in his latest letter, but I'd like to mention something about him. As you can see in both these letters and also on his session in IIUG conference in 2010, he always and I mean always starts his messages with a story. It may look strange but we must admit that it really works. It's like a signature. In this case, with a very short paragraph he condenses all the rest of his ideas. And it does sound good. I don't know if he digs these stories, or if he has someone to do it for him, or if he has a pocket reference of inspiring stories :).... How he does it, I don't know, but that he does it perfectly he does it.
The topic of this letter is the status of Informix, and how IBM has delivered (or not) on what Rob laid down in March.
Interesting read. You'll love the story.
I'll refrain myself of commenting on his statements, since any agreement would look suspicious and any disagreement could get me fired :)


Vers�o Portuguesa:

Estou a fazer uma pausa na s�rie de artigos sobre o Panther, para fazer eco de algo igualmente importante. Quem esteja mais envolvido na comunidade Informix certamente reconhece o nome de Robert D. Thomas. � um executivo da IBM, mais precisamente o vice presidente para Information Management e tem endere�ado algumas comunica��es � comunidade.
F�-lo em Mar�o e est� a faz�-lo agora
N�o vou repetir o que escreve nesta sua �ltima carta, mas gostava de mencionar algo sobre ele. Como pode confirmar por ambas as cartas e tamb�m na sua sess�o na confer�ncia anual do IIUG em 2010, ele come�a sempre e repito sempre as suas mensagens com uma est�ria. Pode parecer estranho mas tenho de admitir que realmente funciona. � como uma assinatura. Neste caso, com um curto par�grafo condensa todas as ideias restantes. E soa bem. N�o sei se ele pesquisa estas est�rias, ou se tem algu�m que o fa�a por ele, ou se tem uma refer�ncia de bolso com est�rias inspiradoras :)... N�o sei como o faz, mas garantidamente sai-lhe bem.
O tema desta carta � o estado do Informix, e como a IBM tem cumprido (ou n�o) com o que o Rob exp�s em Mar�o como sendo o caminho a seguir.
� uma leitura interessante. Vai adorar a est�ria.
Abstenho-me de comentar as suas afirma��es pois qualquer concord�ncia seria suspeita e qualquer discord�ncia poderia fazer com que fosse despedido :)

Panther: "extenting" indexes / "extenting" ind�ces

This article is written in English and Portuguese
Este artigo est� escrito em Portugu�s e Ingl�s


English version:

Very short article for very simple feature: Since v11.7 (Panther) you can now define the extent size for indexes as we use to do with tables (data). Many people may find this a great feature, or a must have (specially if you worked with other RDBMS before), but for me it's relatively useless (unless it makes easier to port SQL scripts).
Why do I think this? Because Informix has been clever enough to find a good size for the index extents. It simply doesn't need us to tell it. It knows the size that the key will need for each index entry, and it knows the table's extent size. So it can calculate how many rows will fit in the data area (since it knows the extent size) and then it can calculate the space that number of rows will consume in the index.
I don't recall having a discrepancy between the index number of extents and the tables data extents. So I'm assuming it worked ok over the years.

The syntax is similar to the CREATE TABLE. But let's start by seeing how it works without specifying the index extent size:


panther_clone@pacman.onlinedomus.net:informix-> cat test_100k.sql
DROP TABLE test_100k;

CREATE TABLE test_100k
(
col1 INTEGER,
col2 CHAR(4)
) EXTENT SIZE 100 LOCK MODE ROW;

CREATE UNIQUE INDEX ix_test_100k ON test_100k(col1);
panther_clone@pacman.onlinedomus.net:informix-> dbaccess stores test_100k.sql

Database selected.


Table dropped.


Table created.


Index created.


Database closed.

panther_clone@pacman.onlinedomus.net:informix-> oncheck -pt stores:test_100k | awk '/Extents/,/^$/ {print $0}'
Extents
Logical Page Physical Page Size Physical Pages
0 4:4627 50 50

Extents
Logical Page Physical Page Size Physical Pages
0 4:4677 81 81


So, the data extent size of 100K generates an index extent size of 162K.
If we double the data extent size to 200K:


panther_clone@pacman.onlinedomus.net:informix-> cat test_200k.sql
DROP TABLE test_200k;

CREATE TABLE test_200k
(
col1 INTEGER,
col2 CHAR(4)
) EXTENT SIZE 200 LOCK MODE ROW;

CREATE UNIQUE INDEX ix_test_200k ON test_200k(col1);
panther_clone@pacman.onlinedomus.net:informix-> dbaccess stores test_200k.sql

Database selected.


Table dropped.


Table created.


Index created.


Database closed.

panther_clone@pacman.onlinedomus.net:informix-> oncheck -pt stores:test_200k | awk '/Extents/,/^$/ {print $0}'
Extents
Logical Page Physical Page Size Physical Pages
0 4:4758 100 100

Extents
Logical Page Physical Page Size Physical Pages
0 4:4858 162 162


So, doubling the data size doubles the index size.

What we can now do it establish the index extent size explicitly:


panther_clone@pacman.onlinedomus.net:informix-> cat test_100k_new.sql
DROP TABLE test_100k;

CREATE TABLE test_100k
(
col1 INTEGER,
col2 CHAR(4)
) EXTENT SIZE 100 LOCK MODE ROW;

CREATE UNIQUE INDEX ix_test_100k ON test_100k(col1) EXTENT SIZE 40 NEXT SIZE 162;
panther_clone@pacman.onlinedomus.net:informix-> dbaccess stores test_100k_new.sql

Database selected.


Table dropped.


Table created.


Index created.


Database closed.

panther_clone@pacman.onlinedomus.net:informix-> oncheck -pt stores:test_100k | awk '/Extents/,/^$/ {print $0}'
Extents
Logical Page Physical Page Size Physical Pages
0 4:4627 50 50

Extents
Logical Page Physical Page Size Physical Pages
0 4:4677 20 20


Truly simple and obvious. Hopefuly this will bring peace to some souls who think that this was needed. And let's hope people won't start making wrong calculations and choose wrong extent sizes.


Vers�o Portuguesa:

Um artigo muito curto para uma funcionalidade muito simples: A partir da vers�o 11.7 (Panther) podemos definir o tamanho de cada extent para os �ndices tal como fazemos para as tabelas (dados). Muita gente pode considerar esta como uma grande funcionalidade, ou algo mesmo necess�rio (especialmente se j� trabalhou com outros RDBMS antes), mas eu considero-a relativamente in�til (a menos que facilite a transposi��o de scripts SQL).
Porque penso assim? Porque o Informix sempre foi esperto o suficiente para encontrar um bom valor para os extents dos �ndices. Simplesmente n�o necessita que lhe digamos. Ele sabe o tamanho da chave necess�rio a cada entrada do �ndice, e sabe o tamanho dod extents da tabela. Portanto pode calcular quantas linhas caber�o na �rea de dados (pois sabe o tamanho do extent) e assim consegue calcular quantas p�ginas � que o �ndice ir� necessitar para esse mesmo n�mero de registos.
N�o me recordo de ver discrep�ncia entre o espa�o no �ndice e o espa�o dos dados. S� posso assumir que tem corrido bem ao longo dos anos.

A nova sintaxe ser� semelhante � do CREATE TABLE. Vejamos como funciona sem especificar:


panther_clone@pacman.onlinedomus.net:informix-> cat test_100k.sql
DROP TABLE test_100k;

CREATE TABLE test_100k
(
col1 INTEGER,
col2 CHAR(4)
) EXTENT SIZE 100 LOCK MODE ROW;

CREATE UNIQUE INDEX ix_test_100k ON test_100k(col1);
panther_clone@pacman.onlinedomus.net:informix-> dbaccess stores test_100k.sql

Database selected.


Table dropped.


Table created.


Index created.


Database closed.

panther_clone@pacman.onlinedomus.net:informix-> oncheck -pt stores:test_100k | awk '/Extents/,/^$/ {print $0}'
Extents
Logical Page Physical Page Size Physical Pages
0 4:4627 50 50

Extents
Logical Page Physical Page Size Physical Pages
0 4:4677 81 81


Um tamanho de 100K para o extent dos dados gera um extent para ind�ces de 162K
Se duplicarmos o extent de dados para 200K:


panther_clone@pacman.onlinedomus.net:informix-> cat test_200k.sql
DROP TABLE test_200k;

CREATE TABLE test_200k
(
col1 INTEGER,
col2 CHAR(4)
) EXTENT SIZE 200 LOCK MODE ROW;

CREATE UNIQUE INDEX ix_test_200k ON test_200k(col1);
panther_clone@pacman.onlinedomus.net:informix-> dbaccess stores test_200k.sql

Database selected.


Table dropped.


Table created.


Index created.


Database closed.

panther_clone@pacman.onlinedomus.net:informix-> oncheck -pt stores:test_200k | awk '/Extents/,/^$/ {print $0}'
Extents
Logical Page Physical Page Size Physical Pages
0 4:4758 100 100

Extents
Logical Page Physical Page Size Physical Pages
0 4:4858 162 162


Portanto, duplicando o tamanho para dados, automaticamene o motor aumenta o tamanho do �ndice na mesma propor��o

Podemos agora tentar estabelecer o tamanho do extent do �ndice:



panther_clone@pacman.onlinedomus.net:informix-> cat test_100k_new.sql
DROP TABLE test_100k;

CREATE TABLE test_100k
(
col1 INTEGER,
col2 CHAR(4)
) EXTENT SIZE 100 LOCK MODE ROW;

CREATE UNIQUE INDEX ix_test_100k ON test_100k(col1) EXTENT SIZE 40 NEXT SIZE 162;
panther_clone@pacman.onlinedomus.net:informix-> dbaccess stores test_100k_new.sql

Database selected.


Table dropped.


Table created.


Index created.


Database closed.

panther_clone@pacman.onlinedomus.net:informix-> oncheck -pt stores:test_100k | awk '/Extents/,/^$/ {print $0}'
Extents
Logical Page Physical Page Size Physical Pages
0 4:4627 50 50

Extents
Logical Page Physical Page Size Physical Pages
0 4:4677 20 20


Completamente simples e �bvio. Esperemos que isto ajude a pacificar algumas almas que acham isto necess�rio. E tamb�m que as pessoas n�o comecem agora a calcular mal o espa�o a alocar.

Panther: oninit -i ... ups... too late... or not / Panther: oninit -i ... ups... tarde de mais... ou n�o

This article is written in English and Portuguese
Este artigo est� escrito em Ingl�s e Portugu�s

English version:

I hope that this one will be quick... How many of us have tried to initialize (oninit -i) an already initialized instance by mistake? Personally I don't think I did it, but our mind tends to erase bad experiences :) But we have heard too many stories like this. A problem in the environment setup and this can easily happen.
Well, the good folks from R&D tried to keep us safe from ourselves by introducing a new parameter called FULL_DISK_INIT. It's something that magically appears in the $ONCONFIG file with the value of 0, or that simply is not there... It's absence, or the value 0, means that if you run oninit -i and there is already an informix page in the rootdbs chunk, it will fail. Let's see an example:


panther@pacman.onlinedomus.net:fnunes-> onstat -V
IBM Informix Dynamic Server Version 11.70.UC1 Software Serial Number AAA#B000000
panther@pacman.onlinedomus.net:fnunes-> onstat -
shared memory not initialized for INFORMIXSERVER 'panther'
panther@pacman.onlinedomus.net:fnunes-> onstat -c | grep FULL_DISK_INIT
FULL_DISK_INIT 0
panther@pacman.onlinedomus.net:fnunes-> oninit -i

This action will initialize IBM Informix Dynamic Server;
any existing IBM Informix Dynamic Server databases will NOT be accessible -
Do you wish to continue (y/n)? y

WARNING: server initialization failed, or possibly timed out (if -w was used).
Check the message log, online.log, for errors.
panther@pacman.onlinedomus.net:fnunes-> onstat -m
shared memory not initialized for INFORMIXSERVER 'panther'

Message Log File: /usr/informix/logs/panther.log
Wed Oct 20 00:02:10 2010

00:02:10 Warning: ONCONFIG dump directory (DUMPDIR) '/usr/informix/dumps' has insecure permissions
00:02:10 Event alarms enabled. ALARMPROG = '/home/informix/etc/alarm.sh'
00:02:13 Booting Language from module <>
00:02:13 Loading Module
00:02:13 Booting Language from module <>
00:02:13 Loading Module
00:02:19 DR: DRAUTO is 0 (Off)
00:02:19 DR: ENCRYPT_HDR is 0 (HDR encryption Disabled)
00:02:19 Event notification facility epoll enabled.
00:02:19 IBM Informix Dynamic Server Version 11.70.UC1 Software Serial Number AAA#B000000
00:02:20 DISK INITIALIZATION ABORTED: potential instance overwrite detected.
To disable this check, set FULL_DISK_INIT to 1 in your config file and retry.

00:02:20 oninit: Fatal error in shared memory initialization

00:02:20 IBM Informix Dynamic Server Stopped.

00:02:20 mt_shm_remove: WARNING: may not have removed all/correct segments

Very nice. It didn't allow me to shoot myself in the foot.
And if we don't have it in the $ONCONFIG?:


panther@pacman.onlinedomus.net:fnunes-> vi $INFORMIXDIR/etc/$ONCONFIG
panther@pacman.onlinedomus.net:fnunes-> onstat -
shared memory not initialized for INFORMIXSERVER 'panther'
panther@pacman.onlinedomus.net:fnunes-> onstat -c | grep FULL_DISK_INIT
#FULL_DISK_INIT 0
panther@pacman.onlinedomus.net:fnunes-> oninit -i

This action will initialize IBM Informix Dynamic Server;
any existing IBM Informix Dynamic Server databases will NOT be accessible -
Do you wish to continue (y/n)? y

WARNING: server initialization failed, or possibly timed out (if -w was used).
Check the message log, online.log, for errors.
panther@pacman.onlinedomus.net:fnunes-> onstat -m
shared memory not initialized for INFORMIXSERVER 'panther'

Message Log File: /usr/informix/logs/panther.log
The default memory page size will be used.
00:06:43 Segment locked: addr=0x44000000, size=224858112

Wed Oct 20 00:06:44 2010

00:06:44 Warning: ONCONFIG dump directory (DUMPDIR) '/usr/informix/dumps' has insecure permissions
00:06:44 Event alarms enabled. ALARMPROG = '/home/informix/etc/alarm.sh'
00:06:44 Booting Language from module <>
00:06:44 Loading Module
00:06:44 Booting Language from module <>
00:06:44 Loading Module
00:06:50 DR: DRAUTO is 0 (Off)
00:06:50 DR: ENCRYPT_HDR is 0 (HDR encryption Disabled)
00:06:50 Event notification facility epoll enabled.
00:06:50 IBM Informix Dynamic Server Version 11.70.UC1 Software Serial Number AAA#B000000
00:06:52 DISK INITIALIZATION ABORTED: potential instance overwrite detected.
To disable this check, set FULL_DISK_INIT to 1 in your config file and retry.

00:06:52 oninit: Fatal error in shared memory initialization

panther@pacman.onlinedomus.net:fnunes->

The same. So if I'm trying to configure a second instance and I point the ROOTPATH to an existing one I'm safe.... But this raises one question: How can I really re-initialize an instance? I know what I'm doing, so let me work!... It's simple... If you really know what you're doing, set it to 1:


panther@pacman.onlinedomus.net:fnunes-> vi $INFORMIXDIR/etc/$ONCONFIG
panther@pacman.onlinedomus.net:fnunes-> onstat -c | grep FULL_DISK_INIT
FULL_DISK_INIT 1
panther@pacman.onlinedomus.net:fnunes-> oninit -i

This action will initialize IBM Informix Dynamic Server;
any existing IBM Informix Dynamic Server databases will NOT be accessible -
Do you wish to continue (y/n)? y
panther@pacman.onlinedomus.net:fnunes-> onstat -

IBM Informix Dynamic Server Version 11.70.UC1 -- On-Line -- Up 00:00:32 -- 369588 Kbytes

panther@pacman.onlinedomus.net:fnunes-> onstat -c | grep FULL_DISK_INIT
FULL_DISK_INIT 0
panther@pacman.onlinedomus.net:fnunes->

Perfect! It allowed me to initialize it, and immediately changed the FULL_DISK_INIT parameter to 0 to keep me safe again.
This has been in the feature request list for years. Now that it's implemented we should be jumping up and down in plain happiness... But I'm not. Why? Because instead of sending the deserved compliments to R&D for implementing this I want more!
This is terribly useful, and will save a lot of people from destroying their instances. But unfortunately I've seen many other cases of destruction that can't be avoided by this. A few examples:
  1. A chunk allocation for a second instance on the same machine (using RAW devices) overwrites another already used chunk from another instance
  2. A restore of an instance overwrites another (either fully or partially)
  3. A restore of an instance on the same machine using the rename chunks functionality uses an outdated rename chunks file (-rename -f FILE ontape option). This file doesn't have a few chunks that were recently added. So these chunks will be restored over the existing chunks!
So, what would make me jump would be something that covered all these scenarios. It would not be a simple ONCONFIG parameter and a change in oninit. It would require changes in more utilities and server components (onspaces, SQL Admin API, ontape, onbar...), but that would really keep us safe from our mistakes. For now this is a good sign, and if these questions worry you, be alert and if you have the chance make IBM know that it is important to you.

One instance was destroyed to bring this article to you... I'll spend another 30s to get the data back into it :)



Vers�o Portuguesa:

Espero que este seja r�pido... Quantos de n�s j� tent�mos inicializar (oninit -i/iy) uma inst�ncia j� inicializada por engano? Pessoalmente n�o me recordo de me ter acontecido, mas a nossa mente tende a apagar epis�dios traum�ticos :) Mas j� ouvimos demasiadas est�rias como esta. Basta um problema na configura��o de um ambiente e isto pode acontecer facilmente.
Bem, os bons rapazes do desenvolvimento tentaram manter-nos a salvo de n�s mesmos, atrav�s da introdu��o de um novo par�metro chamado FULL_DISK_INIT. � algo que aparece magicamente no nosso $ONCONFIG com o valor 0, ou que simplesmente n�o est� l�... A sua aus�ncia ou o valor 0 significam que se tentarmos correr o oninit -i e j� existir uma p�gina Informix no nosso chunk do rootdbs ir� falhar. Vejamos um exemplo:


panther@pacman.onlinedomus.net:fnunes-> onstat -V
IBM Informix Dynamic Server Version 11.70.UC1 Software Serial Number AAA#B000000
panther@pacman.onlinedomus.net:fnunes-> onstat -
shared memory not initialized for INFORMIXSERVER 'panther'
panther@pacman.onlinedomus.net:fnunes-> onstat -c | grep FULL_DISK_INIT
FULL_DISK_INIT 0
panther@pacman.onlinedomus.net:fnunes-> oninit -i

This action will initialize IBM Informix Dynamic Server;
any existing IBM Informix Dynamic Server databases will NOT be accessible -
Do you wish to continue (y/n)? y

WARNING: server initialization failed, or possibly timed out (if -w was used).
Check the message log, online.log, for errors.
panther@pacman.onlinedomus.net:fnunes-> onstat -m
shared memory not initialized for INFORMIXSERVER 'panther'

Message Log File: /usr/informix/logs/panther.log
Wed Oct 20 00:02:10 2010

00:02:10 Warning: ONCONFIG dump directory (DUMPDIR) '/usr/informix/dumps' has insecure permissions
00:02:10 Event alarms enabled. ALARMPROG = '/home/informix/etc/alarm.sh'
00:02:13 Booting Language from module <>
00:02:13 Loading Module
00:02:13 Booting Language from module <>
00:02:13 Loading Module
00:02:19 DR: DRAUTO is 0 (Off)
00:02:19 DR: ENCRYPT_HDR is 0 (HDR encryption Disabled)
00:02:19 Event notification facility epoll enabled.
00:02:19 IBM Informix Dynamic Server Version 11.70.UC1 Software Serial Number AAA#B000000
00:02:20 DISK INITIALIZATION ABORTED: potential instance overwrite detected.
To disable this check, set FULL_DISK_INIT to 1 in your config file and retry.

00:02:20 oninit: Fatal error in shared memory initialization

00:02:20 IBM Informix Dynamic Server Stopped.

00:02:20 mt_shm_remove: WARNING: may not have removed all/correct segments


Muito bem. N�o me deixou dar um tiro no p�.
E se n�o tivermos o par�metro no $ONCONFIG?:

panther@pacman.onlinedomus.net:fnunes-> vi $INFORMIXDIR/etc/$ONCONFIG
panther@pacman.onlinedomus.net:fnunes-> onstat -
shared memory not initialized for INFORMIXSERVER 'panther'
panther@pacman.onlinedomus.net:fnunes-> onstat -c | grep FULL_DISK_INIT
#FULL_DISK_INIT 0
panther@pacman.onlinedomus.net:fnunes-> oninit -i

This action will initialize IBM Informix Dynamic Server;
any existing IBM Informix Dynamic Server databases will NOT be accessible -
Do you wish to continue (y/n)? y

WARNING: server initialization failed, or possibly timed out (if -w was used).
Check the message log, online.log, for errors.
panther@pacman.onlinedomus.net:fnunes-> onstat -m
shared memory not initialized for INFORMIXSERVER 'panther'

Message Log File: /usr/informix/logs/panther.log
The default memory page size will be used.
00:06:43 Segment locked: addr=0x44000000, size=224858112

Wed Oct 20 00:06:44 2010

00:06:44 Warning: ONCONFIG dump directory (DUMPDIR) '/usr/informix/dumps' has insecure permissions
00:06:44 Event alarms enabled. ALARMPROG = '/home/informix/etc/alarm.sh'
00:06:44 Booting Language from module <>
00:06:44 Loading Module
00:06:44 Booting Language from module <>
00:06:44 Loading Module
00:06:50 DR: DRAUTO is 0 (Off)
00:06:50 DR: ENCRYPT_HDR is 0 (HDR encryption Disabled)
00:06:50 Event notification facility epoll enabled.
00:06:50 IBM Informix Dynamic Server Version 11.70.UC1 Software Serial Number AAA#B000000
00:06:52 DISK INITIALIZATION ABORTED: potential instance overwrite detected.
To disable this check, set FULL_DISK_INIT to 1 in your config file and retry.

00:06:52 oninit: Fatal error in shared memory initialization

panther@pacman.onlinedomus.net:fnunes->

Acontece o mesmo. Portanto de estiver a tentar configurar uma nova inst�ncia e por lapso apontar o ROOTPATH para outra j� existente estou salvo... Mas isto levanta uma questao: Como posso re-inicializar uma inst�ncia? Eu sei o que estou a fazer, por isso deixem-me trabalhar!... � simples... Se sabe realmente o que est� a fazer s� tem de o definir para 1:


panther@pacman.onlinedomus.net:fnunes-> vi $INFORMIXDIR/etc/$ONCONFIG
panther@pacman.onlinedomus.net:fnunes-> onstat -c | grep FULL_DISK_INIT
FULL_DISK_INIT 1
panther@pacman.onlinedomus.net:fnunes-> oninit -i

This action will initialize IBM Informix Dynamic Server;
any existing IBM Informix Dynamic Server databases will NOT be accessible -
Do you wish to continue (y/n)? y
panther@pacman.onlinedomus.net:fnunes-> onstat -

IBM Informix Dynamic Server Version 11.70.UC1 -- On-Line -- Up 00:00:32 -- 369588 Kbytes

panther@pacman.onlinedomus.net:fnunes-> onstat -c | grep FULL_DISK_INIT
FULL_DISK_INIT 0
panther@pacman.onlinedomus.net:fnunes->

Perfeito. Deixou-me inicializar e imediatamente mudou o par�metro FULL_DISK_INIT para 0 para me salvaguardar de novo.

Isto estava na lista de pedidos de coisas a implementar h� anos. Agora que est� implementado dev�amos estar aos saltos de contentamento... Mas eu n�o estou. Porqu�? Porque em vez de enviar os merecidos cumprimentos ao desenvolvimento quero mais!
Isto � tremendamente �til, e vai salvar muita gente de destruir as suas inst�ncias. Mas infelizmente eu tenho visto muitos outros casos de destrui��o que n�o podem ser evitados por isto. Alguns exemplos:
  1. Uma cria��o de um chunk para uma segunda inst�ncia na mesma m�quina (usando RAW devices) sobrep�e outro chunk j� em uso noutra inst�ncia
  2. Uma reposi��o de um backup sobrep�e outra inst�ncia (completa ou parcialmente)
  3. Uma reposi��o de um backup de uma inst�ncia, na mesma m�quina, usando a funcionalidade de troca de paths dos chunks usa um ficheiro de rename desactualizado (op��o -rename -f FICHEIRO do ontape). Este ficheiro n�o cont�m alguns chunks que foram adicionados recentemente. Portanto estes chunks ser�o restaurados sobre os existentes!
Assim, o que me deixaria aos pulos de contentamento seria algo que cobrisse todos estes cen�rios. N�o seria t�o simples quanto uma mudan�a no ONCONFIG e uma mudan�a no oninit. Requeriria mudan�as em mais utilit�rios e componentes do servidor (onspaces, SQL Admin API, ontape, onbar....), mas isto sim, conseguiria manter-nos a salvo dos nossos erros. Por agora, esta funcionalidade � um bom sinal, e se estas quest�es o preocupam, esteja alerta e se tiver oportunidade fa�a com que a IBM saiba que isto � importante para si.

Uma inst�ncia foi destru�da para fazer chegar este artigo at� a si. Agora vou passar mais 30s a rep�r-lhe os dados :)

Panther: Installing.... / Panther: Instalando....

This article is written in English and Portuguese
Este artigo est� escrito em Portugu�s e Ingl�s

English version:

Let's start the series by the beginning. The Informix installation method has been changing with some frequency. Panther is not an exception, at least under the covers. From a user perspective it didn't change too much... A bit of history: Why does IBM change this? Many old timers miss the days where we simply unpacked an archive into the destination folder and then run a shell script (Unix/Linux) and that was it. Of course in Windows it was different. And there was no MacOS version... And it was different if you were using version 7.31 or 9+... And some platforms used cpio, others tar (I believe I've seen a cpio with a tar file inside), others RPM.
Ok... Enough. I think I've made IBM point clear... But there's more... You could not choose what to install, or what not to install. And there was no option to automatically create an instance (or when it appeared we could not control it's configuration).

So, the goals of the new installation process are to provide the same feeling across platforms and offer flexibility at the same time, by allowing to customize the installation, choose what to install with greater granularity and allow the user to create a working database instance.
The version 11.1 and 11.5 install method already provided most of this, but people complained about several things. Most noticeable the fact that it used Java for the installation process and it was sensitive to which JRE your system was using. Specially in Linux systems it didn't like the OpenJDK that many of them use. There was an option to use a JRE included in the installer, but some times it was hard to force it to use that one.

All this and some internal presentations I've seen made me curious to test the new installer and I must say I'm pleased with it. It has one problem that I believe is the price to pay for the advantages: The installer takes a large amount of temporary space (~1GB). If this looks too much stay tuned because you can workaround it. Note that this space will be freed at the end of a successful installation. If something goes wrong it will leave info there (so a few unsuccessful installations may lead to lack of space pretty quickly).
The temporary space will be used inside /tmp (Unix and Linux). If it has not enough space it will try the user (who is installing) home directory. Be aware, that if you're running with root this may be the root filesystem which many times doesn't have too much free space. In any case, if you define an environment variable called IATEMPDIR (point it to some directory with enough free space and correct permissions), it will use that location. This is the safest and easiest way to control where it will put the temporary files needed during the installation.

Let's check the installation process:

The software comes in an archived format (.tar, .zip, ...?). So first we need to unpack it into any directory - an install base directory - . After that we need to run one script to install any of the included components (server, client sdk, connect and JDBC driver). We can choose to install in three ways:
  1. Graphic mode
    ./ids_install -i swing
  2. Console mode
    ./ids_install -i console
  3. Silent mode
    ./ids_install -i silent-f PATH_TO_OPTIONS_FILE
For graphic and console mode you can ask the installer to save your options into a file that can later be used for silent installations. And this brings me to an important note: The option to record the options file is -r and it takes an absolute pathname as argument. A relative pathname will not work, and will not raise an error. It just ignores it. So don't forget this. Apparently this is a limitation of the software used to create the installer. Working with absolute pathnames is not a big issue, but the fact that it doesn't warn you if you try to use a relative one can really be annoying.

For the interactive methods, either in GUI or character mode, you'll be asked a few questions:
  1. You must accept the license
  2. If you want a "typical" or "custom" installation
  3. What components you want to install if you choose "custom"
  4. The install location (it will default to $INFORMIXDIR if that is defined in the environment)
  5. If you want to do role separation (and the respective groups if you say yes...)
  6. If you want to create an instance, and if the answer is yes, a few more questions to configure it (space, number of CPUVPs, type of instance - OLTP or DSS -, number of expected clients and a few more)
Then it verifies the free space and proceeds. Easy and quick as usual....
If you choose to install in text mode (-i console), and you choose the custom installation you'll have to choose the components to install. In text mode, this is done after the install present you a list of all the parts you can choose. Note that this list may possibly not fit on your console screen. Be prepared to scroll back (so your terminal program must have some sort of buffer).
Each item and sub-item has a number. To select it (which will turn it on or off depending on current state), you just have to include it's number in a comma separated list of components. This is as convenient as possible in a character mode interface. When you're done choosing the components you just ask it to advance and that's it.

Another option to install the software is to use what we call silent installation (-i silent -f path_name). This is a good way to install the software in big shops. You just setup the options file (or create one during an installation), and then re-use it as many times as you want. With a simple command (./ids_install -i silent -f pathname) you will get a similar installation every time. No questions, no answers, no delays.
You can create a customized version of the option file just by changing three entries in the example file (assuming you want a customized install, with no instance creation and no role separation). The entries you need to change are:
  1. LICENSE_ACCEPTED=FALSE
    This must be changed to LICENSE_ACCEPTED=TRUE (which implies you read and agreed with all the licensing terms)
  2. #USER_INSTALL_DIR=/opt/ibm/informix/11.70
    This one should be uncommented and changed. It will the be install directory (INFORMIXDIR) for the product.
  3. CHOSEN_FEATURE_LIST=IDS,IDS-SVR,IDS-EXT,IDS-EXT-JAVA,IDS-EXT-OPT,IDS-EXT-CNV,IDS-EXT-XML,IDS-DEMO,IDS-ER,IDS-LOAD,IDS-LOAD-ONL,IDS-LOAD-DBL,IDS-LOAD-HPL,IDS-BAR,IDS-BAR-CHK,IDS-BAR-ONBAR,IDS-BAR-ISM,IDS-BAR-TSM,IDS-ADM,IDS-ADM-PERF,IDS-ADM-MON,IDS-ADM-ADT,IDS-ADM-IMPEXP,SDK,SDK-CPP,SDK-CPP-DEMO,SDK-ESQL,SDK-ESQL-DEMO,SDK-ESQL-ACM,SDK-LMI,SDK-ODBC,SDK-ODBC-DEMO,JDBC,GLS,GLS-WEURAM,GLS-EEUR,GLS-CHN,GLS-JPN,GLS-KOR,GLS-OTH
    Ok... I bet you loved this one... Each name separated by commas identifies a component that you can choose not to install. If you want to leave out one of them just remove it from the list. Some of them are easy to understand, but others not so. That's why it's easier to select them during an interactive installation (character or GUI) and save the preferences in a file by using the -r option.
There is one more way to install it, that is not evident from the documentation (although it is documented). If you've been working with Informix for some years you may remind that we used to be able to "install" the software as user informix and after that run a script as root (Unix and Linux). In some situations, where the use of root permissions is very strict you may want to use this method. Personally it's my favorite when I do not have root. This method is documented as a way to "extract" the files. The idea is that you can extract the files into a directory that is similar to the final INFORMIXDIR setup, with the exception that the ownership of the files and the file permissions is not set. It includes a script called RUNasroot.installserver that should be run by root (as the name suggests). This script will do all the necessary chown/chmod commands to correct the file permissions and ownerships. You can copy this full directory (or an archive of it) into other machines and run the mentioned script to complete the installation.
This is called the legacy installation and you can do it by running the command:

./ids_install -i swing|console -DLEGACY=TRUE

If you use this, please don't forget to run the RUNasroot.installserver script after. If you don't, the installation directory will not be a usable INFORMIXDIR. It should be highlighted that after the initial unpack of the files into a directory, you won't require any more temporary space for installation.

So, in short:
  • Everything is installed with the command
    ids_install
  • Can do a console (-i console), a graphical (-i swing) or a silent (-i silent) install
  • Can save a preferences file during a console or graphical install using -r option (full pathname). Can then re-use that file in silent installations with the -f option (full or relative pathname)
  • The install temporary directory is /tmp or the user home directory, but can (should?) be overridden by defining the variable IATEMPDIR (needs around 1GB)
  • You can uncompress the files or install with a non-root user using the option -DLEGACY=TRUE
    After that you'll need to run the script RUNasroot.installserver (as root) to complete the installation (this step is documented, but the installer will not remind you about it...)
I had no issues with the installer and up to now, all the problems I've heard about were all related to installations in non-supported platforms. In many of these cases if the install would work, the product would fail...

I hope this time people will be happy with the install process. There are several options depending on your needs. It's easy for Informix newcomers, and old timers can run with -DLEGACY=TRUE.

If you need to sort all this, we can establish a sort of installation matrix trying to match installation processes with environment conditions:

  • Silent install (-i silent)
    If you have a large number of machines and you want to install it the same way in every machine. Needs root privileges, but can easily be done by system administrators, as long as you provide them the options file
  • Console install (-i console)
    If you don't have a graphical environment or simply prefer character mode interfaces
    Can be used by root or by informix. If run as informix needs that root runs RUNasroot.installserver script
  • Gui install (-i swing)
    If you're new to Informix this is the ideal way. Again, can be used by informix or root.
  • -DLEGACY=TRUE
    This option must be used in console or GUI installations if you're not running as root. You can use it to install the software (requiring RUNasroot.installserver) or simply to create an image of INFORMIXDIR, that can then be copied (simple OS copy) into other systems where you would then just need to run the script RUNasroot.installserver

This article does not cover the installation of other products included in version 11.70 of Informix like Optim Development Studio ou IBM Mashup Center. Hopefully I'll cover these in following articles.


Vers�o Portuguesa:

Vamos come�ar esta s�rie de artigos pelo princ�ipio. O m�todo de instala��o do Informix tem mudado com alguma frequ�ncia. O Panther n�o � excep��o, pelo menos internamente. Da perspectiva do utilizador n�o mudou assim tanto... Um pouco de hist�ria: Porque � que a IBM muda isto? Muitos dos utilizadores antigos certamente t�m saudades dos dias em que simplesmente descompactavamos um arquivo para o direct�rio de destino e depois corr�amos um script SHELL (Unix/Linux) e j� estava. Claro que no Windows era diferente. E n�o existia vers�o para MacOS... E era diferente conforme fosse vers�o 7.3x ou 9.x... E algumas plataformas usavam cpio, outras tar (creio que cheguei a ver um cpio com um tar l� dentro), outras RPM.
Ok.... Chega. Creio que j� tornei a justifica��o da IBM suficientemente clara... Mas h� mais... N�o pod�amos escolher o que instalar, ou o que n�o instalar. E n�o havia op��o para criar uma inst�ncia automaticamente (ou quando apareceu, n�o tinhamos controlo sobre a sua configura��o).

Portanto, em resumo, os objectivos do novo processo de instala��o s�o fornecer a mesma sensa��o entre plataformas e oferecer flexibilidade ao mesmo tempo, permitindo que a instala��o seja adaptada, escolher o que instalar com maior granularidade e permitir a cria��o de uma inst�ncia funcional de base de dados.
O programa de instala��o da vers�o 11.1 e 11.5 j� permitia a maior parte disto, mas os clientes queixavam-se de v�rias coisas. A mais frequente � que usava Java para o processo e era muito sens�vel ao JRE que o sistema estava a usar. Especialmente em sistemas Linux, n�o gostava do OpenJDK que muitos deles usam. Existia uma op��o para usar o JRE insclu�do no programa de instala��o, mas algumas vezes era dif�cil for�ar a sua utiliza��o.

Tudo isto e algumas apresenta��es internas a que assisti deixaram-me curioso para testar o novo instalador e devo dizer que estou bastante satisfeito com ele. Tem um problema que acredito ser o pre�o a pagar pelas vantagens: O instalador consome um espa�o tempor�rio relativamente grande (~1GB). Se isto lhe parecer demasiado continue atento pois � poss�vel contormar a quest�o. Note que este espa�o ser� libertado no final de uma instala��o bem sucedida. Se alguma coisa correr mal ele vai deixar informa��o l� (portanto uma sequ�ncia de instala��es mal sucedidas podem levar a falta de espa�o bastante rapidamente).
O espa�o tempor�rio ser� usado em /tmp (Unix e Linux). Se esta localiza��o n�o tiver espa�o suficiente tentar� a home directory do utilizador que est� a efectuar a instala��o. Aten��o que se estiver a fazer a instala��o como root isto pode ser o root filesystem que muitas vezes n�o ter� muito espa�o dispon�vel. Em qualquer caso, se definir uma vari�vel de ambiente chamada IATEMPDIR (apontar para um direct�rio com espa�o livre suficiente e com permiss�es adequadas), o instalador usar� essa localiza��o. Esta � a forma mais segura e f�cil de controlar onde � que s�o colocados os ficheiros tempor�rios necess�rios durante a instala��o.

Vejamos o processo de instala��o:

O software vem num formato de arquivo (.tar, .zip, ...?). Por isso, primeiro temos de o descompactar para um qualquer direct�rio - direct�rio base de instala��o -. Depois � necess�rio correr um script para instalar qualquer dos componentes inclu�dos (servidor, client sdk, connect e driver JDBC). Podemos escolher tr�s formas de instala��o:

  1. Modo gr�fico
    ./ids_install -i swing
  2. Modo de consola
    ./ids_install -i console
  3. Modo silencioso
    ./ids_install -i silent-f PATH_TO_OPTIONS_FILE
Para os modos gr�fico e de consola podemos pedir ao instalador que grave as nossas op��es para um ficheiro que pode depois ser usado para efectuar instala��es em modo silencioso. E isto requer uma chamada de aten��o muito importante: A op��o que permite gravar as op��es em ficheiro � a op��o -r e requer como argumento um caminho absoluto para um ficheiro. Um caminho relativo n�o funcionar�, e n�o gera nenhum erro. Apenas ignora a op��o. N�o se esque�a disto. Aparentemente isto � uma limita��o no produto com o qual foi construido o instalador. Trabalhar com caminhos de ficheiro absolutos n�o ser� um grande problema, mas o facto de n�o ser gerado nenhum erro caso se use um caminho relativo pode ser realmente irritante.

Para os m�todos interactivos, seja modo gr�fico ou em consola, ser-lhe-�o feitas algumas perguntas:
  1. Ter� de aceitar a licen�a
  2. Se quer uma instala��o "t�pica" ou "personalizada"
  3. Quais os componentes que quer instalar se escolheu "personalizada"
  4. O direct�rio de instala��o (usar� o que est� na vari�vel INFORMIXDIR se estiver definida)
  5. Se quer configurar separa��o de fun��es (e caso queira, quais os respectivos grupos...)
  6. Se quer criar uma inst�ncia, e caso a resposta seja sim mais umas quest�es para a configurar (espa�o, n�mero de CPUVPs, tipo de inst�ncia - OLTP ou DSS -, n�mero esperado de clientes e mais alguns)
Depois verifica o espa�o livre e prossegue. F�cil e r�pido como habitualmente...
Se escolher o modo de consola (-i console), e escolher a instala��o "personalizada", ter� de escolher quais os componentes a instalar. Em modo de texto, isto � feito ap�s o instalador apresentar uma lista de todos os elementos que pode escolher. Note que esta lista poder� n�o caber no �cran. Esteja preparado para ter de fazer um pouco de scroll back (portanto o seu programa de terminal deve ter alguma capacidade de guardar as �ltimas linhas).
Cada item e sub-item tem um n�mero. Para o seleccionar (o que ir� activar ou desactivar dependendo do estado actual), ter� de incluir o seu n�mero numa lista de n�meros separada por v�rgulas.
Isto � t�o conveniente quanto poss�vel num interface em modo de caracter. Quando tiver conclu�do a selecc��o basta pedir-lhe que avance e pronto.

Outra op��o para instalar o software � o modo silencioso (-i silent -f ficheiro). Esta forma de instala��o � adequada a ambientes com muitas m�quinas. Basta preparar o ficheiro de op��es (ou cri�-lo durante uma instala��o), e depois re-utiliz�-lo as vezes que se queira. Com um comando simples (./ids_install -i silent -f ficheiro) obter-se-� uma instala��o semelhante em cada execu��o. Sem quest�es, sem respostas, sem demoras.
Pode criar-se uma vers�o personalizada do ficheiro de op��es mudando tr�s op��es no ficheiro fornecido como exemplo (assumindo que se quer uma instala��o personalizada, sem cria��o de inst�ncia e sem separa��o de fun��es). As entradas que � necess�rio modificar s�o:
  1. LICENSE_ACCEPTED=FALSE
    Isto tem de ser modificado para LICENSE_ACCEPTED=TRUE (o que pressup�e que leu e concordou com os termos da licen�a)
  2. #USER_INSTALL_DIR=/opt/ibm/informix/11.70
    Este deve der descomentado e modficado. Ser� o direct�rio de instala��o (INFORMIXDIR) para o produto
  3. CHOSEN_FEATURE_LIST=IDS,IDS-SVR,IDS-EXT,IDS-EXT-JAVA,IDS-EXT-OPT,IDS-EXT-CNV,IDS-EXT-XML,IDS-DEMO,IDS-ER,IDS-LOAD,IDS-LOAD-ONL,IDS-LOAD-DBL,IDS-LOAD-HPL,IDS-BAR,IDS-BAR-CHK,IDS-BAR-ONBAR,IDS-BAR-ISM,IDS-BAR-TSM,IDS-ADM,IDS-ADM-PERF,IDS-ADM-MON,IDS-ADM-ADT,IDS-ADM-IMPEXP,SDK,SDK-CPP,SDK-CPP-DEMO,SDK-ESQL,SDK-ESQL-DEMO,SDK-ESQL-ACM,SDK-LMI,SDK-ODBC,SDK-ODBC-DEMO,JDBC,GLS,GLS-WEURAM,GLS-EEUR,GLS-CHN,GLS-JPN,GLS-KOR,GLS-OTH
    Ok... Calculo que tenha adorado esta... Cada nome separado por v�rgulas identifica um componente que pode ser escolhido para instalar. Se n�o quiser instalar um deles basta remov�-lo desta lista. Alguns s�o f�ceis de decifrar mas outros nem tanto. � por isso que � mais f�cil seleccion�-los durante uma instala��o interactiva (modo caracter ou gr�fico) e gravar as escolhas num ficheiro com a op��o -r

Existe ainda outra forma de instala��o que pode n�o ser evidente na documenta��o (apesar de estar l� referida). Se tem trabalhado com Informix h� alguns anos, talvez se recorde que era habitual ou poss�vel instalar o software com o utilizador informix e depois correr um script como root (Unix e Linux). Em alguns ambientes, onde o uso de permiss�es de root � muito restrito, talvez queira utilizar este m�todo. Pessoalmente � o meu favorito quando n�o tenho acesso a root. Este m�todo est� documentado como uma forma de "extrair" os ficheiros. A ideia � que possa extrair os ficheiros para um direct�rio que ser� semelhante ao INFORMIDIR final, com a excep��o que as permiss�es e titularidade dos ficheiros n�o est� devidamente estabelecida. Esses ficheiros inclu�m um script chamado RUNasroot.installserver que ter� de ser executado como root (tal como o nome indica). Este script far� todos os chown/chmod necess�rios para corrigir a titularidade e permsiss�es dos ficheiros. Pode copiar-se este direct�rio completo (ou um arquivo do mesmo) para outras m�quinas e correr o script mencionado para completar a instala��o.
Isto � a chamada instala��o legacy e pode ser feita executando o comando:

./ids_install -i swing|console -DLEGACY=TRUE

Se usar este m�todo n�o se esque�a de correr o script RUNasroot.installserver. Se n�o o fizer o direct�rio de instala��o n�o ser� um INFORMIXDIR v�lido. Saliente-se que ap�s a coloca��o inicial dos ficheiros num direct�rio n�o ser� mais necess�rio espa�o tempor�rio para a instala��o.


Fazendo um resumo:
  • Tudo � instalado com o comando:
    ids_install
  • Pode fazer-se uma instala��o em consola (-i console), em modo gr�fico (-i swing) ou em modo silencioso (-i silent)
  • Pode gravar-se um ficheiro de op��es durante a instala��o em consola ou modo gr�fico usando a op��o -r (caminho absoluto). Pode depois re-utilizar-se o ficheiro em instala��es silenciosas com a op��o -f (caminho absoluto ou relativo)
  • O direct�rio de instala��o � /tmp ou a directoria base do utilizador que instala mas pode (deve-se?) sobrepor definindo a vari�vel IATEMPDIR (precisa de cerca de 1GB)
  • Pode descompactar-se os ficheiros ou instalar com um utilizador n�o root usando a op��o
    -DLEGACY=TRUE
    Depois disto � necess�rio correr o script RUNasroot.installserver com o utilizador root para completar a instala��o (este passo est� documentado, mas o instalador n�o o ir� lembrar disso...)

N�o tive problemas com o instalador e at� agora, todos os problemas que vi referenciados resultaram de tentativas de instala��o em plataformas n�o suportadas. Nestes casos, mesmo que o instalador funcionasse o mais prov�vel era existirem problemas com o produto propriamente dito.

Espero que desta vez as pessoas fiquem satisfeitas com o processo de instala��o. Existem v�rias op��es dependendo das suas necessidades. � f�cil para rec�m chegados ao Informix e os utilizadores mais experientes podem sempre usar a op��o -DLEGACY=TRUE.

Se precisar de ordenar ideias, podemos estabelecer uma esp�cie de matriz entre os m�todos de instala��o e as condi��es do ambiente:
  • Modo silencioso (-i silent)
    Se tiver um grande n�mero de m�quinas e quiser instalar sempre da mesma forma em todas. Requer privil�gios de root, mas pode facilmente ser executada pelos administradores de sistema desde que lhes forne�a o ficheiro de op��es
  • Modo de consola (-i console)
    Se n�o tiver um ambiente gr�fico dispon�vel ou simplesmente se preferir um ambiente de texto
    Pode ser utilizado por root ou por informix. Se executar como informix necessita que o root corra o RUNasroot.installserver
  • Modo gr�fico (-i swing)
    Se � novo no Informix esta � a forma ideal. Tal como o anterior pode ser usado como informix ou como root.
  • -DLEGACY=TRUE
    Esta op��o pode ser usada em conjunto com os modos gr�fico e de consola se n�o estiver a correr como root.
    Pode usar este formato para instalar o software (requer execu��o do RUNasroot.installserver) ou simplesmente para criar uma imagem do INFORMIXDIR, que poder� depois ser copiada (c�pia simples de SO) para outrous sistemas onde apenas seria necess�rio executar o RUNasroot.installserver
Este artigo n�o cobre a instala��o de outros produtos fornecidos com a vers�o 11.70 do Informix como sejam o Optim Development Studio ou o IBM Mashup Center. Espero poder falar disto em artigos seguintes.

Panther: The beginning / Panther: O in�cio

This article is written in English and Portuguese
Este artigo est� escrito em Ing�s e Portugu�s

English version:

Around 2007, after IBM launched the version 11.10 (Cheetah), I wrote a series of articles focusing on several new features. I called it "Chetah spot by spot: ...". I wanted to do the same for Panther, but I have a big problem: What is a Panther? Does it have spots?! Kate Tomchik (IIUG board member), asked about this in Jerry Keesee's (Informix development director) Facebook profile... For me a Panther is a black variant of several animals (leopard, jaguar and possibly a mountain lion or cougar). So, although it may have spots, they're not very visible... So, in short, I don't have a nice title for these articles... it's a shame, but I think we can all live with that :)
So, I took a look at the Panther release notes and looked at the new features... Too many! Too good. Since this is the first article, I'll try to group them (giving some highlights) following my personal view:

  • Embeddability
    This version is the best Informix version ever in terms of ability to embed it into some controlled environment. Some features that contribute to this are: better install, several capabilities for cloning and deploying instances, more autonomic features, improved ability to control it in a programmable way (alarm codes, oninit return codes), storage provisioning etc.
  • Grid
    Imagine you have a large number of instances. And you need to run something in all of them (or a subset). How do you do it? With scripts.... Yes... I've done it... But now you can do it with "grid functionality". You just define the grid nodes (add/delete) and then you connect to the grid, run you SQL, and voil�.... This requires a lot more explanation, but it's that simple.
  • Performance
    As always, a new version is expected to run faster than it's predecessors. This can be done with code improvements and new features. Panther has both. To list a few, it has several Informix XPS features that were ported into Dynamic Server like XPS api (faster tables and indexes access times), Index Skip Scan, Multi Index Scan, improved light scans, push down hash joins (or Star joins), and a few others like Forest of Trees Indexes (FOT), DLL preload, improved name service connection time (NS_CACHE) etc.
  • Warehousing
    Well... I named a few in the performance group. But there are others, like fragment level statistics, more fragmentation schemes (interval, list), online fragment attach/detach for interval fragmentation scheme
  • Security
    This is one of my favorites... Users don't need to be recognized by the OS anymore, trusted context was ported from DB2 (change the authentication inside an already established session - perfect for application servers, and hopefully in the future for 4GL web services), and finally the ability to audit only specific tables (when using the RDRW, INRW, DLRW and UPRW mnemonics). This last one was the Achilles' heel of the Informix auditing facility
  • Others
    It's weird to group such nice features into an "others" category, but I'll do it anyway for simplification: End of extent limit, online table reorg, WebSphere MQ datablade enhancements, OAT enhancements (too match all the relevant new features), DDL support for "CREATE/DROP ... IF [NOT] EXISTS", DDL on secondary nodes, Enterprise Replication without primary key, connection manager improvements, SPL debugging, Optim Development Studio and IBM Mashup Center 2.0 included, etc.
The next article will focus on the installation process. After that I'll proceed with several other features. Don't expect a specific order. I thought about going for the more important features first, but then I realized that there are excellent features in totally different areas. What can be fundamental to some people may as well be nearly useless to others... So, the order will not reflect the feature importance.


Vers�o Portuguesa:

Em 2007, ap�s a IBM ter lan�ado a vers�o 11.10 (Cheetah), eu escrevi uma s�rie de artigos que focavam v�rias funcionalidades novas. Na altura, s� em Ingl�s, chamei-lhes "Chetah spot by spot: ..." que se poderiam traduzir por "Cheetah, mancha por mancha". Queria fazer algo semelhante para a nova vers�o com o nome de c�digo "Panther" ou pantera mas deparei-me com um problema: O que � uma pantera? Tem manchas? A Kate Tomchik, perguntou sobre isto no profile do Jerry Keesee (director de desenvolvimento do Informix) no Facebook... Para mim, uma pantera � uma variante negra de v�rios animais (leopardo, jaguar e possivelmente le�o da montanha ou puma). Portanto, embora possa ter manchas ser�o pouco vis�veis.... Em resumo, n�o tenho um t�tulo sonante para estes artigos... � uma pena, mas penso que conseguimos viver sem isso :)

Continuando, dei uma vista de olhos nas release notes do Panther � procura das novas funcionalidades... Muitas e muito boas. Sendo este o primeiro artigo, vou tentar agrup�-las (salientando algumas) seguindo a minha vis�o pessoal:

  • Embeddability
    Esta � a melhor vers�o Informix de sempre em termos de capacidade de embeber a base de dados num ambiente controlado. Algumas funcionalidades contribuem para isto: Melhor instala��o, v�rias formas de clonar e "implantar" inst�ncias, mais funcionalidades autonomicas, melhoria nas possibilidades de controlar as inst�ncias de forma program�tica (c�digos de alarme, c�digos de retorno do oninit), aprovisionamento de espa�o etc.
  • Grid
    Imagine que tem um grande n�mero de inst�ncias. E que necessita executar algo em todas elas (ou numa parte). Como � que o faz? Com scripts... sim... j� o fiz... Mas agora pode faz�-lo com a funcionalidade "grid". S� tem de definir os n�s do grid (adicionar/remover) e depois conectar-se � grid correr o SQL e voil�.... Isto requer muito mais explica��es, mas � assim t�o simples...
  • Desempenho
    Como sempre, espera-se que uma nova vers�o seja mais r�pida que as anteriores. Isto pode ser feito com melhorias no c�digo ou novas funcionalidades. O Panther tem ambas. S� para listar algumas, tem v�rias funcionalidades que foram portadas do Informix XPS para o Dynamic Server como a XPS api (melhores tempos de acesso a tabelas e ind�ces), Index Skip Scan, Multi Index Scan, melhoria nos light scans, push down hash joins (ou Star Joins) e mais algumas como ind�ces Forest Of Trees (FOT), pr�-carregamento de DLLs, melhores tempos do servi�o de nomes (NS_CACHE) etc.
  • Warehousing
    Bom.... J� mencionei algumas no grupo de desempenho. Mas existem outras, como estatisticas ao n�vel dos fragmentos (ou parti��es), mais formas de framenta��o/particionamento (intervalo, lista), attach/detach de fragmentos online para tabelas particionadas por intervalo
  • Seguran�a
    Este � um dos meus favoritos.... Os utilizadores j� n�o necessitam de ser reconhecidos pelo sistema operativo (note-se que a autentica��o j� podia ser feita externamente, mas os utilizadores tinham de ter a sua identidade - uid, home dir, group etc. - conhecido pelo SO), trusted context foi portado do DB2 (mudar a autentica��o dentro de uma conex�o j� estabelecida - perfeito para servidores aplicacionais, e esperemos no futuro para os web services em 4GL), e finalmente a possibilidade de auditar tabelas espec�ficas (quando se quer usar as menem�nicas RDRW, INRW, DLRW e UPRW). Esta �ltima era o calcanhar de Aquiles do sistema de auditing do Informix
  • Outros
    � estranho agrupar estas funcionalidades t�o interessantes numa categoria "Outros" mas fa�o-o para simplificar: Fim do limite de extents, reorganiza��o (jun��o de extents) de tabelas online, melhorias no datablade WebSphere MQ, melhorias no Open Admin Tool (para acompanhar as novas funcionalidades do motor), suporte para a sintaxe "CREATE/DROP ... IF [NOT] EXISTS", DDL nos n�s secund�rios, Enterprise Replication sem chave prim�ria, melhorias no connection manager, depuramento de stored procedures SPL, Optim Development Studio e IBM Mashup Center 2.0 inclu�do etc.

O pr�ximo artigo focar� o processo de instala��o. Depois prosseguirei com v�rias outras funcionalidades. N�o espere uma ordem espec�fica. Pensei em abordar primeiro as funcionalidades mais importantes, mas depois tomei consci�ncia que h� excelentes novidades em �reas completamente distintas. O que pode ser fundamental para um cliente pode ser praticamente in�til para outro. Assim a ordem n�o reflectir� a import�ncia das funcionalidades

Panther is out / Panther est� dispon�vel

This article is written in English and Portuguese
Este artigo est� escrito em Ingl�s e Portugu�s

English version:

The new release of Informix (v11.70) is out and available on Passport Advantage. The announcement letter is here:

http://www-01.ibm.com/common/ssi/cgi-bin/ssialias?subtype=ca&infotype=an&appname=iSource&supplier=877&letternum=ENUSZP10-0472

Later I'll focus on the new features. For now you can read the announcement letter and check it on PA.

Vers�o Portuguesa:

A nova vers�o do Informix (v11.70) foi anunciada e est� dispon�vel no Passport Advantage. O an�ncio oficial est� aqui:

http://www-01.ibm.com/common/ssi/cgi-bin/ssialias?subtype=ca&infotype=an&appname=iSource&supplier=877&letternum=ENUSZP10-0472

Mais tarde irei abordar as novas funcionalidades. Por agora pode ler o an�ncio e aceder ao produto no PA

Happy birthday... / Feliz anivers�rio

This article is written in English and Portuguese
Este artigo est� escrito em Ingl�s e Portugu�s

English version:

I'm really not very good with dates. I keep forgetting them. Today I was reviewing some of the blog links and structure, and one date poped up: September 26 of 2006. Around four years ago I made the first post in this blog. During these four years I believe I've made some interesting posts here (apologies for the lack od modesty), and judging by some feedback I have received some of this posts were important for my readers. That's the best reward I could get.
On that first post I explained some of the reasons why I was creating a blog. And these were:

  1. The only blog I've found about Informix seems empty
  2. I've been involved with Informix technology for several years and I think the Informix community although enthusiastic is a bit invisible
  3. I have some subjects about which I'd like to write a bit...
It's with great pleasure that I see that 1) and 2) aren't valid anymore. As you can see from the lists of links on the right side, we have a healthy blog community. We also have a strong international user group, and new user groups are appearing around the world (China, Adria, Brazil...)

One thing has not changed: I still have some subjects about which I'd like to write a bit. History is a funny thing and tends to repeat itself. Around 2006 we were preparing Cheetah which was released in 2007. Then came Cheetah 2 (2008). We're now waiting for Panther.

So I hope you enjoy the links/blogs revision and stay tuned for upcoming articles. Let's hope I have the time for everything I want to publish

Vers�o Portuguesa:

N�o sou nada bom com datas. � habitual esquecer-me dos anivers�rios dos amigos (e at� mesmo do meu!). Hoje estava a rever a lista de links e blogs e uma data saltou-me � vista: 26 de Setembro de 2006. H� cerca de quatro anos atr�s eu coloquei o primeiro artigo neste blog. Durante estes quatro anos escrevi alguns artigos interessantes (mod�stia � parte) e a julgar por algumas reac��es que recebi, alguns desses artigos foram importantes para os meus leitores. Essa � a melhor recompensa que poderia ter.

Nesse primeiro artigo eu indiquei as raz�es porque estava a criar um blog. E estas eram:

  1. O �nico blog que encontrei sobre Informix parecia vazio
  2. Estava envolvido com a tecnologia Informix h� j� v�rios anos e parecia-me que a comunidade Informix, apesar de entusiasta, parecia invis�vel.
  3. Tinha v�rios assuntos sobre os quais queria escrever...
� com grande prazer que vejo que 1) e 2) j� n�o s�o v�lidos. Como se pode ver pela lista de � direita, temos uma comunidade de blogs bastante saud�vel. Tamb�m temos um grupo internacional de utilizadores forte, e novos grupos locais t�m aparecido (China, Adria, Brasil...)

Algo que n�o mudou: Ainda tenho v�rios assuntos sobre os quais desejo escrever. A hist�ria costuma repetir-se. Por volta de 2006 est�vamos a preparar a vers�o Cheetah que foi lan�ada em 2007. Depois veio a Cheetah 2 (2008). Agora estamos � espera do Panther.

Assim, espero que aprecie a revis�o dos links/blogs e mantenha-se alerta aos pr�ximos artigos. Espero que tenha tempo suficiente para tudo o que pretendo publicar.