Upgrading Netezza Performance Server Analytics

Learn how to upgrade Netezza Performance Server Analytics.

About this task

If a previous installation of Netezza Performance Server Analytics is found on your system, the installation process removes the earlier version before new packages are installed. As a result, the INZA, NZA, NZM, and NZR databases are dropped, and all objects in those databases are permanently removed, including objects that were created by users.

Unless problems occur during the upgrade procedure, you do not need to uninstall the existing Netezza Performance Server Analytics version first.

Before you begin

After you update and re-enable your user databases, you cannot fall back to a previous version. Therefore, back up all user databases before you start the upgrade procedure.

Because during upgrade the INZA, NZA, NZM, and NZR databases are dropped, you might want to save changes that were made in these databases.

It is suggested that you do not make such changes in these databases. They are intended for storing the Netezza Performance Server Analytics code only.

Saving analytic models

  1. To save analytic models, create a new database and enable it for use with Netezza Performance Server Analytics by running the appropriate scripts:
    • create_inza_db.sh
    • create_inza_db_admin.sh
    • create_inza_db_developer.sh
    • create_inza_db_user.sh
  2. Run the COPY_MODEL command to copy the wanted model or models into the new database.

    Do not copy these objects back to an INZA, NZA, NZM, or NZR database, because these databases are deleted during upgrade.

Saving other database objects

To save other database objects, copy them manually to another database by using the appropriate SQL commands.

Alternatively, you can use the backup command to save a whole database, and then restore it to a new database with a different name.

In that case, you can also copy the database objects back to the original database after the upgrade. Adjust the user and group privileges of the copied objects as necessary.

Procedure

Upgrade the existing version of Netezza Performance Server Analytics by using the inzaPackageInstaller.sh script.

Upgrading without uninstalling Netezza Performance Server Analytics first

  1. Ensure that the system databases of Netezza Performance Server Analytics are not in use.
    You can stop and start Netezza Performance Server.
    1. nzstop
    2. nzstart
  2. Ensure that the state of the node is not suspended or suspending.
  3. Install the new version of Netezza Performance Server Analytics by using the inzaPackageInstaller.sh script.
    • If the inzaPackageInstaller.sh script does not find dependencies and installs the new Netezza Performance Server Analytics version, continue with Step 4.
    • If the inzaPackageInstaller.sh script cannot uninstall the existing Netezza Performance Server Analytics version because it finds dependencies between user objects and objects in Netezza Performance Server Analytics system databases, do the following steps:
      1. Exit the script.

        The script prints a list of all dependencies.

      2. Ensure that you know how to re-create these objects after the upgrade of Netezza Performance Server Analytics.
        For example, you can use one or more of the following methods:
        • From the Netezza Performance Server Software Support package, use the nz_ddl tool to create the DDL statements for all databases that have dependencies on Netezza Performance Server Analytics system databases. You can re-create the objects based on the output of nz_ddl.
        • If Fluid Query is installed, unregister your data connector functions before Netezza Performance Server Analytics upgrade and re them afterward.
        • If you have your own functions that depend on Netezza Performance Server Analytics, you might still have the code to compile and register these functions. However, you must re-create the Lua functions by using nzl.

          The Lua library that is installed, typically changes in a new Netezza Performance Server Analytics.

        • If database views depend on Netezza Performance Server Analytics, you can read the view definitions from the catalog by using the following statement:
          select viewschema, viewname, text from syscat.views
        • For all objects that you re-create, check whether you also need to re-create user privileges, group privileges, or role privileges on these objects. The nz_ddl tool generates GRANT statements to re-create privileges.
      3. Delete the dependent objects that reference objects in Netezza Performance Server Analytics system databases.
    • Reinstall the new version of Netezza Performance Server Analytics by using the inzaPackageInstaller.sh script, and continue with Step 4.
  4. Verify whether the new version number of Netezza Performance Server Analytics is correct in one of the following ways:
    • On Linux, run the following command:
      nzcm –inza
    • In a database, run the following command:
      select * from inza..product;
  5. Re-create the deleted dependent objects.

Upgrading with uninstalling Netezza Performance Server Analytics first

To uninstall the existing version of Netezza Performance Server Analytics and then do a fresh installation, complete the following steps:
  1. Ensure that the system databases of Netezza Performance Server Analytics are not in use.
    You can stop and start Netezza Performance Server.
    1. nzstop
    2. nzstart
  2. Ensure that the state of the node is not suspended or suspending.
  3. Run the following statements to determine which databases exist and which users are enabled to use Netezza Performance Server Analytics.

    You must re-enable these databases and users after the upgrade is completed.

    select inzadb from (select substr(groupname, 1, length(groupname)-10) as inzadb from
      _v_group where upper(groupname) like '%_INZAUSERS') g inner join _v_database on inzadb = database;
    
    select username, groupname from _v_usergroups where username <> 
      'INZAUSER' and (groupname like '%INZAUSERS' or groupname like 
      '%INZADEVELOPERS' or groupname like '%INZAADMINS');
    The group name consists of the database name, followed by a suffix that indicates the user type:
    • _inzausers for a standard user
    • _inzadevelopers for a developer
    • _inzaadmins for an administrator
  4. Uninstall Netezza Performance Server Analytics by using the /nz/var/nzcm/uninstall_inza.sh script.
    • If the uninstall_inza.sh script does not find dependencies and uninstalls the new Netezza Performance Server Analytics version, proceed with Step 5.
    • If the uninstall_inza.sh script cannot uninstall the existing Netezza Performance Server Analytics version because it finds dependencies between user objects and objects in Netezza Performance Server Analytics system databases, take the following steps:
      1. Exit the script.

        The script then prints a list of all dependencies.

      2. Ensure that you know how to re-create these objects after the upgrade of Netezza Performance Server Analytics.
        For example, by using one or more of the following methods:
        • From the Netezza Performance Server Software Support package, use the nz_ddl tool to creregisterate the DDL statements for all databases that have dependencies on Netezza Performance Server Analytics system databases. You can re-create the objects based on the output of nz_ddl.
        • If Fluid Query is installed, unregister your data connector functions before Netezza Performance Server Analytics upgrade and reregister them afterward.
        • If you have your own functions that depend on Netezza Performance Server Analytics, you might still have the code to compile and register these functions. However, you must re-create the Lua functions by using nzl. The Lua library that is installed, typically changes in a new Netezza Performance Server Analytics.
        • If database views depend on Netezza Performance Server Analytics, you can read the view definitions from the catalog by using the following statement:
          select viewschema, viewname, text from syscat.views
        • For all objects that you re-create, check whether you also need to re-create user privileges, group privileges, or role privileges on these objects. The nz_ddl tool generates GRANT statements to re-create privileges.
      3. Delete the dependent objects that reference objects in Netezza Performance Server Analytics system databases.
      4. Uninstall Netezza Performance Server Analytics again by using the uninstall_inza.sh script and proceed with Step 5.
  5. Verify that Netezza Performance Server Analytics is uninstalled by confirming that the following databases no longer exist:
    INZA
    NZA
    NZM 
    NZR
    NZRC
    NZVERIFY
    NZMSG
  6. Install the new version of Netezza Performance Server Analytics by using the inzaPackageInstaller.sh script.
  7. Verify whether the new version number of Netezza Performance Server Analytics is correct in one of the following ways:
    • On Linux, run the following command:
      nzcm –inza
    • In a database, run the following command:
      select * from inza..product;
  8. Re-enable the databases and users for Netezza Performance Server Analytics by using the following scripts:
    create_inza_db.sh 
    create_inza_db_user.sh 
    create_inza_db_developer.sh 
    create_inza_db_admin.sh
    If create_inza_db.sh fails with the error message Permission denied on "NZ_MAT_METADATA", or DROP TABLE: permission denied, or a similar error for a database, verify whether the following tables are owned by INZAUSER:
    NZ_MAT_BRDCST_COMMAND
    NZ_MAT_METADATA
    NZA_META_MODELS
    NZA_META_COMPONENTS
    NZA_META_PARAMS
    NZA_META_COLPROPS
    If these tables are owned by ADMIN, change the owner to INZAUSER:
    alter table table owner to INZAUSER
    Then, run the create_inza_db.sh script again.
  9. Re-create the deleted dependent objects.

Updating and reenabling user databases after the upgrade

After you upgrade your Netezza Performance Server Analytics version to Version 3.0, and if you did not re-enable the databases during installation, update, and re-enable all user databases that are enabled for Netezza Performance Server Analytics.

From /nz/export/ae/utilities/bin, run:
./update_inza_dbs.sh

This script does not change the components. For example, tables, views, and matrices, of existing models. If the format of model components for an algorithm was changed, you get an error message when you use the model in a procedure that cannot process the old format. You are then asked to use the MIGRATE_MODEL procedure to convert the model to the latest format.