IBM Support

Loading data into offline segments using the Redbrick Table Management Utility (TMU)

Troubleshooting


Problem

Loading data into offline segments using the Redbrick Table Management Utility (TMU).

Resolving The Problem


You can use the Redbrick Table Management Utility (TMU) for taking one segment offline and loading data into it. You can only load into segments which are offline.

    Tip: Users will be able to query tables and online segments while data is being loaded into offline segments. For more information on how to do that, refer to the Partial Availability parameter in the Redbrick Administrator's Guide.


STEPS

1. The segment must be attached to a table and be offline.

In RISQL, offline a segment by running an ALTER SEGMENT statement:

    ALTER SEGMENT seg_name OF TABLE tab_name OFFLINE ;

      seg_name
        The name of the segment you want to load data into.
      tab_name
        The name of the table you want to load data into.

2. In TMU, run the LOAD command. The Format clause must be APPEND, INSERT or REPLACE. The default is INSERT. The AUTOROWGEN feature in the discard clause must be OFF.

    LOAD INPUTFILE 'filename'  INSERT AUTOROWGEN OFF INTO OFFLINE SEGMENT seg_name OF TABLE tab_name WORKING_SPACE work_segment;
      seg_name
        The name of the segment you want to load data into.

      tab_name
        The name of the table you want to load data into.
      work_segment
        The segment used for working space.


3. To complete the load you must synchronize the segment with the table and indexes before the segment can be brought online and available for use.

Run TMU using the control file containing a SYNCH OFFLINE SEGMENT statement.

    SYNCH OFFLINE SEGMENT seg_name WITH TABLE tab_name ;
      seg_name
        The name of the segment you want to synchronize.
      tab_name
        The name of the table you want to synchronize.

4. In RISQL, bring the segment online by running an ALTER SEGMENT statement:

    ALTER SEGMENT seg_name OF TABLE tab_name ONLINE ;
      seg_name
        The name of the segment you want to bring online.

      tab_name
        The name of the table you want to bring online.

See the TMU Reference Manual for the full syntax on loading segments, SYNCH statement and control files. See the Redbrick SQL Reference Guide for full syntax of the ALTER SEGMENT command.

[{"Product":{"code":"SSCRW7","label":"Red Brick Warehouse"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"--","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF025","label":"Platform Independent"},{"code":"PF008","label":"DYNIX\/ptx"},{"code":"PF010","label":"HP-UX"},{"code":"PF015","label":"IRIX"},{"code":"PF016","label":"Linux"},{"code":"PF026","label":"Reliant UNIX"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"}],"Version":"6.0;6.1;6.2","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
16 June 2018

UID

swg21153366