Populating the ManagedSystem Table

The MangedSystem table is populated using the kqz_populate_msn stored procedure. For more information, see Running the stored procedure. This procedure needs to be run periodically so that the ManagedSystem table contains the current list of managed system names.

The stored procedure reads the following historical tables in the Tivoli® Data Warehouse if they exist:

Historical collection must be started on a particular set of attribute groups. A set of scripts is generated that creates and starts historical collection for these attribute groups. If you do not wish to use the scripts, the list of attribute groups is listed in the script's comment header block.

Sample scripts are created that show which tables need to have historical collection enabled:

The following table describes the required arguments:

Note:
You must specify either -n or -m, but not both.
Table 51. Required arguments
Argument Description
-h candle_home The IBM® Tivoli Monitoring installation path.
-u teps_user The Tivoli Enterprise Portal Server user to log in as when you create the historical collections.
-n tems_name The Tivoli Enterprise Monitoring Server where the collections should be started. More than one Tivoli Enterprise Monitoring Server can be specified using a space separated list. If you specify more than one Tivoli Enterprise Monitoring Server, put the list in quotes. For example, -n “tems1 tems2"
-m managed_system_group_or_manged_system The managed system group or managed system name against which the collection should be started. More than one managed system group or managed system can be specified using a space separated list. If you specify more than one managed system group or managed system, put the list in quotes. For example, -m “msg1 msg2"

The following table describes the optional arguments:

Table 52. Optional arguments
Argument Description
-s teps_host The host name or IP address of the Tivoli Enterprise Portal Server. If this is not specified, the default is localhost.
-p teps_password The password for the Tivoli Enterprise Portal Server user specified with the -u option. If not specified, the script will prompt for the password
-c historical_collection_interval The historical collection interval to use when starting the historical collections. If not specified, the default is 1h (1 hour). The valid values are: 15m, 30m, 1h, 12h or 1d, where m is minutes, h is hours and d is days.
-r pruning_interval The pruning interval to use for the historical data. The historical data should be pruned so that the tables do not continue to grow in size. If not specified, the default is 2d (2 days). Use d for days, m for months, y for years.

After historical collection has been started, the kqz_populate_msn stored procedure should be run periodically so that the ManagedSystem table contains the most current list of managed systems in the IBM Tivoli Monitoring environment.

Running the stored procedure

Perform the following steps to run the stored procedure:

DB2®
  1. Connect to the Tivoli Data Warehouse database as the warehouse user:
    connect to <Tivoli Data Warehouse database alias> user 
    <Tivoli Data Warehouse user id> using <password>
  2. Run the stored procedure:
    db2 "call <Tivoli Data Warehouse schema>.kqz_populate_msn
    ('<three letter product code for the agent>')"
Oracle
  1. Start sqlplus:
    sqlplus <Tivoli Data Warehouse user id>/<password>@
    <Oracle SID> 
  2. Run the stored procedure:
    execute kqz_populate_msn('<three letter product code for the agent>');
SQL Server 2005 and 2008

  1. Run the stored procedure:
    osql -S <server> -U <Tivoli Data Warehouse id> -P 
    <Tivoli Data Warehouse password> -d 
    <Tivoli Data Warehouse database name> -Q "EXEC 
    [<Tivoli Data Warehouse schema>].[kqz_populate_msn]
    @pv_productcode = N'<three letter product code>'"