$('a[name]').remove(); $('#ic-homepage__footer').before('

'); $("#tabs").tabs({ selected: 1 }); $("#ic-homepage__ic-tips").append( quickTipHTML() ); unhideOneProductTip(); $("#ic-homepage__product-tips").wrapInner('

'); $("#ic-homepage__feed-tips").wrapInner('

'); });

IBM Tivoli Monitoring > Version 6.3 > User's Guides > Agent Builder User's Guide > Cognos data model generation > Prerequisites to generating a Cognos data model > Tivoli Data Warehouse IBM Tivoli Monitoring, Version 6.3


Create tables and Procedures in the Tivoli Data Warehouse

Create or alter the ManagedSystem Table and Stored Procedure in the Tivoli Data Warehouse


The generated Cognos data model includes a ManagedSystem table which is used to define a ManagedSystem dimension. The ManagedSystem dimension allows reports to be created that can correlate managed systems. For example, if the agent is a subnode agent, the dimension can be used to determine the subnodes that exist for a specific agent instance.

The ManagedSystem table is not created by the Tivoli Data Warehouse. Therefore, when an agent is generated in Agent Builder, SQL scripts are generated for each database platform that will:

Run these scripts one time only.


Parent topic:

Tivoli Data Warehouse


Run DB2 Scripts to Create tables and Procedures in the Tivoli Data Warehouse

For a DB2 database, use these scripts to create tables in the Tivoli Data Warehouse

The scripts for DB2 are in the following directory:


Procedure

  1. The generated scripts (create_table.sql, alter_table.sql, and create_procedure.sql) all use itmuser as the Tivoli Data Warehouse user ID. If itmuser is not the Tivoli Data Warehouse user ID in your environment, change all occurrences of itmuser to the correct user ID.

  2. Connect to the Tivoli Data Warehouse as the Tivoli Data Warehouse User:

      db2 connect to <Tivoli Data Warehouse alias name> user 
      <Tivoli Data Warehouse user id> using  <password>

  3. Determine whether the ManagedSystem table exists:

      db2 "select count(*) from sysibm.systables where name = 'MANAGEDSYSTEM' 
      and creator=upper ('<Tivoli Data Warehouse user id>')"

  4. Create or alter the table.

    • If the query returns 1, the table exists. Run the alter script:

        db2 -tvf alter_table.sql

    • If the query returns 0, the table does not exist. Run the create script:

        db2 -tvf create_table.sql

  5. Run the script to create the stored procedure:

      db2 -td@ -f create_procedure.sql


Run Oracle Scripts to Create tables and Procedures in the Tivoli Data Warehouse

For an Oracle database, use these scripts to create tables in the Tivoli Data Warehouse

The scripts for Oracle are in the following directory:


Procedure

  1. The generated scripts (create_table.sql, alter_table.sql, and create_procedure.sql) all use itmuser as the Tivoli Data Warehouse user ID. If itmuser is not the Tivoli Data Warehouse user ID in your environment, change all occurrences of itmuser to the correct user ID.

  2. Start sqlplus:

      sqlplus <IBM Tivoli Monitoring user ID>/<password>@  
      <Tivoli Data Warehouse SID>

  3. Determine whether the ManagedSystem table exists:

      select count(*) from user_tables where table_name = 'MANAGEDSYSTEM';

  4. Create or alter the table.

    • If the query returns 1, the table exists. Run the alter script:

        @<path to alter_table.sql>;

    • If the query returns 0, the table does not exist. Run the create script:

        @<path to create_table.sql>;

  5. Run the script to create the stored procedure:

      @<path to create_procedure.sql>;


Run SQL Server 2005 and 2008 Scripts to Create tables and Procedures in the Tivoli Data Warehouse

The scripts for SQL Server are in the following directory:


Procedure

  1. The generated scripts (create_table.sql, alter_table.sql, and create_procedure.sql) all use itmuser as the Tivoli Data Warehouse user ID. If itmuser is not the Tivoli Data Warehouse user ID in your environment, change all occurrences of itmuser to the correct user ID.

  2. Determine whether the ManagedSystem table exists:

      osql -S <Server> -U <Tivoli Data Warehouse user ID> -P <password> -d 
      <Tivoli Data Warehouse database name> -Q "Select count(*) 
      from INFORMATION_SCHEMA.TABLES where table_name = 'ManagedSystem'"

  3. Create or alter the table.

    • If the query returns 1, the table exists. Run the alter script:

        osql -S <Server> -U <Tivoli Data Warehouse user ID> -P <password> -d 
        <Tivoli Data Warehouse database name> -I -n -i <path to alter_table.sql>

    • If the query returns 0, the table does not exist. Run the create script:

        osql -S <Server> -U <Tivoli Data Warehouse user ID> -P <password> -d 
        <Tivoli Data Warehouse database name> -I -n -i <path to create_table.sql>

  4. Run the script to create the stored procedure:

      osql -S <Server> -U <Tivoli Data Warehouse user ID> -P
      <password> -d <Tivoli Data Warehouse database name> 
      -I -n -i <path to create_procedure.sql>



+

Search Tips   |   Advanced Search