Monday, February 1, 2016

Netezza: problem with nz_sysutil_history scripts and table NZ_SYSUTIL_HISTORY

Discovered in Release 7.2.0.3-P1 [Build 42685]


PROBLEM
Running statistics collection script nz_sysutil_history produces following error: 

[nz@server bin]$ / nz/ support/bin/nz_sysutil_history NZDBA
Error: Operation canceled
Error: External Table : count of bad input rows reached maxerrors limit
See /tmp/NZ_SYSUTIL_HISTORY.NZDBA.nzlog file
Error: Load Failed, records not inserted.

Further investigation showed that the target NZ_SYSUTIL_HISTORY table has missing two columns that exist in source system view _V_SYSTEM_UTIL: Here is side-by-side comparison of  _V_SYSTEM_UTIL v.s. NZ_SYSUTIL_HISTORY



SOLUTION
Drop table and recreate it as CTAS from  _V_SYSTEM_UTIL :

ALTER TABLE NZ_SYSUTIL_HISTORY RENAME TO NZ_SYSUTIL_HISTORY_OLD;
CREATE TABLE  NZ_SYSUTIL_HISTORY AS SELECT * FROM _V_SYSTEM_UTIL;
ALTER TABLE  NZ_SYSUTIL_HISTORY OWNER TO ADMIN;

Rerun script to verify it works:

[nz@server ~]$ / nz/ support/bin/nz_sysutil_history NZDBA
Load session of table 'NZ_SYSUTIL_HISTORY' completed successfully
[nz@server ~]$



No comments:

Post a Comment