IBM Support

JDBC Gateway: Update static Reporter tables regularly – UNIX ONLY

Question & Answer


Question

Is there an automated method to refresh these tables regularly?

Cause

The static tables in the Reporter Schema, which store user, class and
conversion information - REPORTER_NAMES, REPORTER_MEMBERS, REPORTER_GROUPS,
REPORTER_CLASSES, REPORTER_CONVERSIONS - are only updated on gateway startup, unlike
the REPORTER_STATUS REPORTER_JOURNAL and REPORTER_DETAILS tables.

In previous database gateways, this functionality was available via the nco_update.sh and later nco_g_icmd utilities.

Answer

You can implement a script which logs into the gateway via nco_sql and can be
scheduled to run via cron.

The following is an example script, which may be adapted or modified to suit
your requirements:

#!/usr/bin/bash
export NCHOME=/opt/IBM/tivoli/netcool
export OMNIHOME=$NCHOME/omnibus
cat << EOF | $OMNIHOME/bin/nco_sql -server -user <user> -password

TRANSFER FROM 'alerts.conversions' TO 'REPORTER_CONVERSIONS' DELETE USING
TRANSFER_MAP ConversionsMap;
TRANSFER FROM 'alerts.objclass' TO 'REPORTER_CLASSES' DELETE USING TRANSFER_MAP
ObjectClassesMap;
TRANSFER FROM 'master.groups' TO 'REPORTER_GROUPS' DELETE USING TRANSFER_MAP
GroupsMap;
TRANSFER FROM 'master.members' TO 'REPORTER_MEMBERS' DELETE USING TRANSFER_MAP
MembersMap;
TRANSFER FROM 'master.names' TO 'REPORTER_NAMES' DELETE USING TRANSFER_MAP
NamesMap;

go
EOF

This script can also be adapted to update custom tables in the database.

[{"Product":{"code":"SSSHTQ","label":"Tivoli Netcool\/OMNIbus"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"--","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"}],"Version":"7.4.0;7.3.1;7.3.0;8.1.0","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
17 June 2018

UID

swg21988538