1 Upgrade the application

The Update process will install the last product version available without API or database changes.

To update the product to the last available version, use the following command:

Application libraries will be upgraded but configuration files will be preserved.
Copy
$ ./install.sh update

2 Upgrade the bootstrap database server

With the new version it is necessary to import the new databases of dictionaries. First, rename the existing databases. The bootstrap configuration database can be upgraded using the tool setup.

2.1 Import database dictionary wic

Rename the existing database wic, import the new and set transactions

Copy
$ echo "rename database wic to wic_old;" | dbaccess - -                
$ dbimport wic -d d_wics
$ ontape -s -U wic

2.2 Import database dictionary wic_admin

Rename the existing database wic_admin, import the new and set transactions

Copy
$ echo "rename database wic_admin to wic_admin_old;" | dbaccess - -                
$ dbimport wic_admin -d d_wics
$ ontape -s -U wic_admin

2.3 Upgrade bootstrap configuration database

The configuration database requires a schema conversion to update its structures to the new version.

After that, it is necessary to reload the data for these tables:

  • wic_label_data: the labels for the desktop tools.
  • wic_styles_%v2: the styles for the enterprise application.

You can run the setup tool by doing:

Copy
$ bin/studio.sh --setup

Update the data for tables.

The command load first deletes the content of the table and after it does load the new data.
Copy
$ load labels           
$ load styles

3 Upgrade wic database

Backup

Before executing this process verify that your database backup is up and running with the latest data.

3.1 Before of upgrade

Set the database to no logging:

Copy
ontape -s -N wic_custom -t /dev/null

Warning

Before executing this step, consult your informix administrator first, since if a replication between database servers is defined when returning the database to logging mode, it would cause an error.

Access to Axional Studio from a browser with a user with access privileges to the wic database, and privileges to execute and create objects on the wic_custom database.

From the applications menu select the WIC Metadata database and open the Deployment folder to work with these two objects according to each step:

  • STEP 1 [Compile code (spl)]: Drop all XUDFunction, XUDProcedure, Procedure and Trigger.
  • STEP 2 [Compile model (ddl)]: Drop all index.
  • STEP 3 [Compile model (ddl)]: Drop all check constraint.
  • STEP 4 [Compile model (ddl)]: Create all new object (New tables, index and constraints).
  • STEP 5 [Compile model (ddl)]: Table load.
  • STEP 6 [Compile model (ddl)]: Upgrade all objects prior to this version.
  • STEP 7 [Compile model (ddl)]: Create all check constraint.
  • STEP 8 [Compile model (ddl)]: Create all index.
  • STEP 9 [Compile model (ddl)]: Model status.
  • STEP 10 [Compile code (spl)]: Create all XUDFunction, XUDProcedure, Procedure and Trigger.
  • STEP 11 [Compile code (spl)]: Code status.

3.2 Drop all code

Drop all stored procedures and triggers.

3.3 Drop all index

Drop all primary constraint, foreign constraint, unique constraint and drop all indexes.

3.4 Drop all check constraint

Drop all check constraint.

3.5 Create all new object

Deploy the scheme of the new tables implemented in the new version and which are not currently created in the database.

3.6 Table load

Load the rows in those tables that currently have 0 rows and in the wic there are cataloged default rows (Form wic_table_object_data).

3.7 Upgrade all objects

Start the upgrade process. This process is based on two tables:

  • wic_version:Table of the wic_custom database that contains a row with the value of the obj_level column equal to the highest value of the chg_seqno column of the wic_change_log table of the wic database before starting the update process.
  • wic_change_log: Table of the wic database that contains the register of all the statement to execute for update the schema of your database to the schema of the new version.

The execution result of the update process shows the executed statement and its status for each change record number (change_seqno column). You have to move to the last page and check the status of the last sentence.

As seen in the example, the update process has stopped with error in the registration number 939 (Column change_seqno equal 939).

The change_seqno column has a link that leads right where the record of the block of the statement that failed.

Analyze the block of the statements that have failed, and using the dbstudio tool we connect to the wic_custom database and try to solve the problem manually.

Once the error has been fixed, perform the following update to set the obj_level column of the wic_version table to the value of the change_seqno column, which is where the upgrade process has stopped:

Copy
UPDATE wic_version SET obj_level = 939 WHERE obj_dict = 'wic';

Repeat this step until you get the message "NO CONVERSION CHANGES PENDING" as shown in the following figure:

3.8 Create all check constraint

Create all check constraint.

3.9 Create all index

Create all indexes, primary constraint, unique constraint and foreign constraint.

3.10 Model status

Run a model status. This process compares the schema of each table cataloged in the wic dictionary with actually is created in the wic_custom database. Then, if there are differences, generate a report with the sql instructions that resolve that difference.

To the right of each sql statement a button is shown that if we press it, execute on the wic_custom database the statement that fixes the difference.

If the sql statement was executed correctly, the message "REPAIR EXECUTED" will be displayed as shown in the following figure.

Repeat this step until no differences appear as shown in the following figure:

3.11 Create all code

Create all stored procedures and triggers.

3.12 Code status

This process check that each procedure and trigger cataloged in the wic dictionary is compiled and its timestamp is later than the her modification date.

The process generates a report of the status of each stored and trigger procedure as shown in the following figure. Where the value of the status column is equal to "VALID" for all items.

3.13 End of upgrade

Refresh statistics.

Copy
echo 'UPDATE STATISTICS LOW DROP DISTRIBUTIONS;' |dbaccess wic_custom

Set the database to logging if it has previously been set to no logging before starting the update process.

Copy
ontape -s -U wic_custom -t /dev/null

4 Upgrade company database

Backup

Before executing this process verify that your database backup is up and running with the latest data.

4.1 Before of upgrade

Set the database to no logging:

Copy
ontape -s -N customer -t /dev/null

Warning

Before executing this step, consult your informix administrator first, since if a replication between database servers is defined when returning the database to logging mode, it would cause an error.

Access Axional Studio from a browser with a user with access privileges to the customer database and all the dictionaries linked to it.

The process explained below must be carried out for each of the dictionaries linked to the customer database in order of precedence from highest to lowest for some steps and vice versa for others. For example, according to the figure below, in some steps you start in wic_custom and end in wic_icon. Nevertheless. for others it starts in wic_icon and end in wic_custom.

From the applications menu select the first dictionarie Metadata database and open the Deployment folder to work with these two objects according to each step:

  • STEP 1 [Compile code (spl)]: Drop all XUDFunction, XUDProcedure, Procedure and Trigger.
  • STEP 2 [Compile model (ddl)]: Drop all index.
  • STEP 3 [Compile model (ddl)]: Drop all check constraint.
  • STEP 4 [Compile model (ddl)]: Create all new object (New tables, index and constraints).
  • STEP 5 [Compile model (ddl)]: Table load.
  • STEP 6 [Compile model (ddl)]: Upgrade all objects prior to this version.
  • STEP 7 [Compile model (ddl)]: Create all check constraint.
  • STEP 8 [Compile model (ddl)]: Create all index.
  • STEP 9 [Compile model (ddl)]: Model status.
  • STEP 10 [Compile code (spl)]: Create all XUDFunction, XUDProcedure, Procedure and Trigger.
  • STEP 11 [Compile code (spl)]: Code status.

Note

To simplify, only the steps related to the iCON dictionary are shown.

4.2 Drop all code

Drop all stored procedures and triggers from all dictionaries linked to the customer database starting with the dictionary with lower precedence number to greater precedence number. Based on our example, it starts with the wic_custom dictionary and ends with the wic_icon dictionary.

4.3 Drop all index

Drop all primary constraint, foreign constraint, unique constraint and drop all indexes from all dictionaries linked to the customer database starting with the dictionary with lower precedence number to greater precedence number. Based on our example, it starts with the wic_custom dictionary and ends with the wic_icon dictionary.

4.4 Drop all check constraint

Drop all check constraint from all dictionaries linked to the customer database starting with the dictionary with lower precedence number to greater precedence number. Based on our example, it starts with the wic_custom dictionary and ends with the wic_icon dictionary.

4.5 Create all new object

Deploy the scheme of the new tables implemented in the new version and which are not currently created in the database. The deploy must start with the dictionary with greater precedence number to lower precedence number. Based on our example, it starts with the wic_icon dictionary and ends with the wic_custom dictionary.

4.6 Table load

Load the rows in those tables that currently have 0 rows and in the dictionaries there are cataloged default rows (Form wic_table_object_data). The load must start with the dictionary with greater precedence number to lower precedence number. Based on our example, it starts with the wic_icon dictionary and ends with the wic_custom dictionary.

In this step some messages of related errors are sometimes shown, many of these errors disappear when you rerun the process. You can also go to execute this step at the end of the update process.

4.7 Upgrade all objects

Start the upgrade process. This process is based on two tables:

  • wic_version: Table of the customer database that contains a row for each dictionary linked to it. The value of the obj_level column is equal to the highest value of the chg_seqno column of the wic_change_log table of each dictionary.
  • wic_change_log: Table of the dictionarie database linked that contains the register of all the statement to execute to update the schema of your database to the schema of the new version.

The upgrade must start with the dictionary with greater precedence number to lower precedence number. Based on our example, it starts with the wic_icon dictionary and ends with the wic_custom dictionary.

The execution result of the update process shows the executed statement and its status for each change record number (change_seqno column). You have to go to the last page or run the object again to check the status of the last sentence.

As seen in the example, the update process has stopped with error in the registration number 1351 (Column change_seqno equal 1351).

The change_seqno column has a link that leads right where the record of the block of the statement that failed.

Analyze the block of the statements that have failed and try to solve the problem manually.

Once the error is resolved, we can perform one of the following actions depending on the type of error and the solution adopted:

  • If the error is caused by a situation that prevents the process from continuing, for example, locked table, database in logging mode, etc. Then we solve the problem and restart the process at the same point where it failed.
  • If the error is caused by a failure in the current update log, we try to execute the previously corrected sql statements from the dbstudio tool, and then execute the following update to set the obj_level column of the wic_version table to the value of the change_seqno column, which is where the upgrade process has stopped:
    Copy
    UPDATE wic_version SET obj_level = 1351 WHERE obj_dict = 'wic_icon';

Repeat this step until you get the message "NO CONVERSION CHANGES PENDING" as shown in the following figure:

4.8 Create all check constraint

Create all check constraint. Start with the dictionary with lower precedence number to greater precedence number. Based on our example, it starts with the wic_custom dictionary and ends with the wic_icon dictionary.

4.9 Create all index

Create all indexes, primary constraint, unique constraint and foreign constraint. Start with the dictionary with greater precedence number to lower precedence number. Based on our example, it starts with the wic_icon dictionary and ends with the wic_custom dictionary.

4.10 Model status

Run a model status. This process compares the schema of each table cataloged in the metadata dictionary with actually is created in the customer database. Then if there are differences, generate a report with the sql statements that solve the difference. Start with the dictionary with greater precedence number to lower precedence number. Based on our example, it starts with the wic_icon dictionary and ends with the wic_custom dictionary.

To the right of each sql statement a button is shown that if we press it, execute on the customer database the statement that fixes the difference.

If the sql statement was executed correctly, the message "REPAIR EXECUTED" will be displayed as shown in the following figure.

Repeat this step until no differences appear as shown in the following figure:

4.11 Create all code

Create all stored procedures and triggers. Start with the dictionary with greater precedence number to lower precedence number. Based on our example, it starts with the wic_icon dictionary and ends with the wic_custom dictionary.

4.12 Code status

This process check that each procedure and trigger cataloged in the metadata dictionary is compiled and its timestamp is later than the her modification date. Start with the dictionary with lower precedence number to greater precedence number. Based on our example, it starts with the wic_custom dictionary and ends with the wic_icon dictionary.

The process generates a report of the status of each stored and trigger procedure as shown in the following figure. Where the value of the status column is equal to "VALID" for all items.

4.13 End of upgrade

Refresh statistics.

Copy
echo 'UPDATE STATISTICS LOW DROP DISTRIBUTIONS;' |dbaccess customer

Set the database to logging if it has previously been set to no logging before starting the update process.

Copy
ontape -s -U customer -t /dev/null