Friday, February 26, 2016

Netezza: nz_online_vacuum is for online manual vacuum


See what's new in IBM Netezza Software Support Tools NPS 7.2.0.6.P1 release notes.

Netezza manual vacuum (nz_manual_vacuum) has always required to stop NPS that incurred database service downtime.  This is not the case with NPS version 7.2.0.3-P2 and higher where new manual vacuum script  is to run manual vacuum for system in online state.  The new nz_online_valuum utility can be downloaded separately as part of Netezza NPS tools installation bundle e.g. no NPS upgrade needed.  

See instructions how to download and upgrade existing Netezza NPS tools (aka /nz/support/bin directory): IBM Support: Fix Central - download Netezza NPS 7.2 tools

Unfortunately, nz_online_valuum utility is picky and won't run on incomparable NPS versions:



[nz@server]$ /nz/support/bin/nz_online_vacuum -h

Usage:    nz_online_vacuum  [<database>]

Purpose:  Reindex the host catalogs ... while the system is online

          The database catalog is made up of a number of system tables and indexes
          that are stored on the NPS host.  In extreme situations, those relations
          can grow rather large in size, thereby affecting performance (when accessing
          the information contained in the catalog).

          An access exclusive lock is issued for each database.  No users can be signed
          into that database, no cross database queries to the database can be running.
          If the lock cannot be obtained then that database will not be vacuum'ed at
          this time and the output will report

                  ERROR:  unable to acquire lock on database DBNAME

          Online reindexing includes both a vacuum and a reindex.
          The SYSTEM database is not included in this operation.

          See also:  nz_manual_vacuum

Inputs:   The database name is optional ... if you want to process just the
          specified database.  Otherwise, the default is to process all databases.

Outputs:  Each database is processed, in turn.  Sample output

             1   DEV_DB       done
             2   PROD_DB      ERROR:  unable to acquire lock on database PROD_DB
             3   QA_DB        done
             4   TEST_DB      done

Running script on incomparable NPS system will fail. This is what it renders running on NPS 7.2.0.3-P1:  

[nz@server]$ /nz/support/bin/nz_online_vacuum

ERROR:  This script can only be run on the following NPS versions
             7.0.4.7-P2  or greater
             7.1.0.4-P2  or greater
             7.2.0.3-P2  or greater


Related documentation:   REINDEX DATABASE

No comments:

Post a Comment