The TDBMMGRT SPUFI file

-- ******************************************************************
-- *
-- * Licensed Materials - Property of IBM
-- * 5650-ZOS
-- * Copyright IBM Corp.  2006, 2013
-- *
-- ******************************************************************
--
-- Use the SPUFI function to execute these SQL statements.
--
-- Database, table, tablespace and storage class values must be
-- retrieved from your z/OS LDAP Server DB2 configuration.  Use
-- the following DB2 command to query the information:
--
-- '-DISPLAY DATABASE(GLDDB)'
--
-- NOTE: GLDDB is the default database name, your database name may
-- differ.
--
-- ******************************************************************
-- Database Name Information
-- ******************************************************************
-- Change any instance of -DB2_NAME- to the name of the LDAP
-- database name you want to migrate.  Be sure this name matches what
-- was defined for the database name in the z/OS LDAP Server
-- configuration file.
--
-- The default configuration sets this value to GLDDB.  But this
-- value should be verified.
--
-- ******************************************************************
-- DataBase Owner Information
-- ******************************************************************
-- Change any instance of -DB2_USERID- to the database owner id
-- defined as the owner id for the z/OS LDAP Server DB2
-- configuration. This id is the highlevel qualifier for the tables.
--
-- The default configuration sets this value to GLDSRV.  But this
-- value should be verified.
--
-- ******************************************************************
-- LDAP Server User ID Information
-- ******************************************************************
-- Change any instance of -LDAP_USERID- to the user ID for the LDAP
-- server to run under.
--
-- The default configuration sets this value to GLDSRV.  But this
-- value should be verified.
--
-- ******************************************************************
-- Tablespace Information
-- ******************************************************************
-- Change any instance of -MISC_TABLESPACE- to the LDAP miscellaneous
-- tablespace as defined in the z/OS LDAP Server DB2 configuration.
--
-- The default configuration sets this value to MISCTS.  But this
-- value should be verified.
--
-- Change any instance of -REPLICA_TABLESPACE- to the LDAP replica
-- tablespace as defined in the z/OS LDAP Server DB2 configuration.
--
-- The default configuration sets this value to REPTS.  But this
-- value should be verified.
--
-- ******************************************************************
-- Storage Group Information
-- ******************************************************************
-- Change any instance of -STORAGEGROUP- to the storage group as
-- defined in the z/OS LDAP Server DB2 configuration.
--
-- The default configuration sets this value to SYSDEFLT.  But this
-- value should be verified.

--
--
-- ******************************************************************
-- TABLE OF CONTENTS
-- ******************************************************************
-- SECTION  TITLE
--
-- -------  ---------------------------------------------------------
-- 01       SQL statements for migrating from z/OS Integrated
--          Security Services LDAP server to the latest version of
--          IBM Tivoli Directory Server for z/OS LDAP server.
-- -------  ---------------------------------------------------------
-- 02       SQL for using the partitioned entry identifier assignment
--          algorithm.  This is generally needed for users migrating
--          from IBM Tivoli Directory Server for z/OS V1R8 to IBM
--          Tivoli Directory Server for z/OS V1R10.
-- -------  ---------------------------------------------------------
-- 03       SQL for using advanced replication support.
--          This is generally needed for users migrating
--          from IBM Tivoli Directory Server for z/OS V1R10 to IBM
--          Tivoli Directory Server for z/OS V1R11.
-- -------  ---------------------------------------------------------

--
--
-- ******************************************************************
-- *** SECTION 01:                                                ***
-- ***                                                            ***
-- ***    SQL statements for migrating from z/OS Integrated       ***
-- ***    Security Services LDAP server to the latest version of  ***
-- ***    IBM Tivoli Directory Server for z/OS LDAP server.       ***
-- ******************************************************************
-- The following SQL statememts, created for the z/OS Integrated
-- Security Services LDAP server, will alter your DB2 database tables
-- such that they will be supported by the latest version of IBM
-- Tivoli Directory Server for z/OS LDAP server.
--
-- ******************************************************************
-- ***** SPECIAL NOTICE *****              ***** SPECIAL NOTICE *****
-- ******************************************************************
-- The DIR_CHANGE table used for replication must be empty before the
-- backend is started on the IBM Tivoli Directory Server for z/OS
-- LDAP server.  The SQL statements in this file will empty the table
-- if it is not empty, but this will result in one or more replicas
-- that are no longer synchronized with this master server.
--
-- To verify that the DIR_CHANGE table is empty, from a separate
-- file, execute the following SQL statement using SPUFI:
--
--    SELECT * FROM -DB2_USERID-.DIR_CHANGE;
--
-- where -DB2_USERID- is changed to the database owner id, as
-- previously described above.
--
-- After execution, if the row count returns 0, then all replicaton
-- changes have been made and the table is ready to be dropped.
--
-- Otherwise, refer to the z/OS Integrated Security Services LDAP
-- Server Administration and Use documentation to ensure all
-- replication changes have been made and then verify that the table
-- is empty.
--
-- If replication does not take place and the table does not become
-- empty, then all the replication tables will be emptied by the
-- SQL commands below.  In this case replication updates to one or
-- more replicas will have been lost and it will be necessary to
-- synchronize these replicas with the master server. Refer to the
-- IBM Tivoli Directory Server Administration and Use for z/OS
-- publication for information about replica synchronization.
--
-- ******************************************************************
-- Empty the replication tables
-- ******************************************************************
DELETE FROM -DB2_USERID-.DIR_REGISTER;
DELETE FROM -DB2_USERID-.DIR_PROGRESS;
DELETE FROM -DB2_USERID-.DIR_CHANGE;
DELETE FROM -DB2_USERID-.DIR_LONGCHANGE;
--
-- ******************************************************************
-- Drop the replication tables
--
-- NOTE: these SQL statements are commented out.  The IBM Tivoli
-- Directory Server for z/OS LDAP server will ignore these tables.
-- Keeping these tables allows you to roll-back DB2 data to the z/OS
-- Integrated Security Services LDAP server database.  It also allows
-- sharing the database between the two servers.  Remove the '--'
-- characters from the following SQL statements if you want to drop
-- the replication tables.
--
-- NOTE: New replica tables and indexes will be created below.
-- ******************************************************************
-- DROP TABLE -DB2_USERID-.DIR_REGISTER;
-- DROP TABLE -DB2_USERID-.DIR_PROGRESS;
-- DROP TABLE -DB2_USERID-.DIR_CHANGE;
-- DROP TABLE -DB2_USERID-.DIR_LONGCHANGE;
-- COMMIT;

-- ******************************************************************
-- Alter the misc tablespace to set locksize row
-- ******************************************************************
ALTER TABLESPACE -DB2_NAME-.-MISC_TABLESPACE-
        LOCKSIZE ROW;

-- ******************************************************************
-- Alter the misc table to add the schema timestamp column
--
-- NOTE: This SQL statement is commented out.  The IBM Tivoli
-- Directory Server for z/OS LDAP server will automatically alter the
-- DIR_MISC table to add the new schema timestamp column if it is not
-- already there.  As an alternative, you can create the new column
-- here by removing the '--' characters from the following SQL
-- statement.
-- ******************************************************************
-- ALTER TABLE -DB2_USERID-.DIR_MISC
--         ADD SCHEMA_TIMESTAMP TIMESTAMP
--         WITH DEFAULT NULL;

-- ******************************************************************
-- Alter the misc table to add the partitioned eid column
--
-- NOTE: This SQL statement is commented out.  The IBM Tivoli
-- Directory Server for z/OS LDAP server will automatically alter the
-- DIR_MISC table to add the new partitioned eid column if it is not
-- already there.  As an alternative, you can create the new column
-- here by removing the '--' characters from the following SQL
-- statement.
-- ******************************************************************
-- ALTER TABLE -DB2_USERID-.DIR_MISC
--         ADD PARTITIONED_EID CHAR(1)
--         WITH DEFAULT NULL;

-- ******************************************************************
-- Create the new replica table
-- ******************************************************************
CREATE TABLE -DB2_USERID-.DIR_REPLICA (
        REPID   DECIMAL(15 , 0) NOT NULL,
        CHNGID  DECIMAL(15 , 0) NOT NULL,
        REPCAPS INTEGER         NOT NULL,
        PRIMARY KEY( REPID ) )
IN -DB2_NAME-.-MISC_TABLESPACE-;

-- ******************************************************************
-- Create the new replica entry table
--
-- Note: The maximum size of the change DN column (CHNGDN) in the
--       replication table (DIR_REPENTRY) must be greater than
--       or equal to the maximum size of the DN column in the entry
--       table (DIR_ENTRY).  The default maximum size of 512 is set
--       here.
-- ******************************************************************
CREATE TABLE -DB2_USERID-.DIR_REPENTRY (
        CHNGID    DECIMAL(15 , 0) NOT NULL,
        CHNGFLAGS INTEGER         NOT NULL,
        CHNGSIZE  INTEGER         NOT NULL,
        CHNGDN    VARCHAR(512)    FOR BIT DATA,
        CHNGDATA  LONG VARCHAR    FOR BIT DATA,
        PRIMARY KEY( CHNGID ) )
IN -DB2_NAME-.-REPLICA_TABLESPACE-;

-- ******************************************************************
-- Create the new long replica entry table
-- ******************************************************************
CREATE TABLE -DB2_USERID-.DIR_LONGREPENTRY (
        CHNGID   DECIMAL(15 , 0) NOT NULL,
        CHNGSEQ  INTEGER         NOT NULL,
        CHNGDATA LONG VARCHAR    FOR BIT DATA,
        PRIMARY KEY( CHNGID , CHNGSEQ ) )
IN -DB2_NAME-.-REPLICA_TABLESPACE-;

-- ******************************************************************
-- Create the entry identifier table
-- ******************************************************************
CREATE TABLE -DB2_USERID-.DIR_EID (
        PARTID           DECIMAL(15 , 0) NOT NULL,
        NEXT_EID         DECIMAL(15 , 0) NOT NULL,
        MODIFY_TIMESTAMP TIMESTAMP       NOT NULL,
        PRIMARY KEY( PARTID ) )
IN -DB2_NAME-.-MISC_TABLESPACE-;

-- ******************************************************************
-- Create the new replica index
-- ******************************************************************
CREATE UNIQUE INDEX -DB2_USERID-.DIR_REPLICAX1
        ON -DB2_USERID-.DIR_REPLICA( REPID )
        USING STOGROUP -STORAGEGROUP-
        CLUSTER
        DEFER YES;

-- ******************************************************************
-- Create the new replica entry index
-- ******************************************************************
CREATE UNIQUE INDEX -DB2_USERID-.DIR_REPENTRYX1
        ON -DB2_USERID-.DIR_REPENTRY( CHNGID )
        USING STOGROUP -STORAGEGROUP-
        CLUSTER
        DEFER YES;

-- ******************************************************************
-- Create the new long replica entry index
-- ******************************************************************
CREATE UNIQUE INDEX -DB2_USERID-.DIR_LONGREPX1
        ON -DB2_USERID-.DIR_LONGREPENTRY( CHNGID , CHNGSEQ )
        USING STOGROUP -STORAGEGROUP-
        CLUSTER
        DEFER YES;

-- ******************************************************************
-- Create the entry identifier index
-- ******************************************************************
CREATE UNIQUE INDEX -DB2_USERID-.DIR_EIDX1
        ON -DB2_USERID-.DIR_EID( PARTID )
        USING STOGROUP -STORAGEGROUP-
        CLUSTER
        DEFER YES;

-- ******************************************************************
-- Update the DB_VERSION value to 4.0 in the DIR_MISC table.
--
-- NOTE: This SQL statement is commented out.  The DB_VERSION value
-- indicates the level of the TDBM database.  Updating the
-- DB_VERSION value to 4.0 enables the backend to use the enhanced
-- sysplex and replication support in the IBM Tivoli Directory Server
-- for z/OS LDAP server.  However, it will prevent the backend
-- database from being shared with a z/OS Integrated Security
-- Services LDAP server.  If you do not plan to share the database,
-- you can update the DB_VERSION value here by removing the '--'
-- characters from the following SQL statement.
-- ******************************************************************
-- UPDATE -DB2_USERID-.DIR_MISC
--      SET DB_VERSION='4.0';

-- ******************************************************************
-- Commit the changes made in this section
-- ******************************************************************
COMMIT;

-- *********************************************************************
-- Grant SQL SELECT privileges on DB2 catalog tables to the user
-- running the LDAP server.
--
-- NOTE: You need to remove the '--' from each line before you can run
--       these statements.
--
-- Change -LDAP_USERID- to the user ID running the LDAP server.
-- *********************************************************************
--GRANT SELECT ON SYSIBM.SYSCOLUMNS TO -LDAP_USERID-;
--GRANT SELECT ON SYSIBM.SYSCOLDIST TO -LDAP_USERID-;
--GRANT SELECT ON SYSIBM.SYSTABLES TO -LDAP_USERID-;
--GRANT SELECT ON SYSIBM.SYSTABLEPART TO -LDAP_USERID-;
--GRANT SELECT ON SYSIBM.SYSKEYS TO -LDAP_USERID-;
--GRANT SELECT ON SYSIBM.SYSTABLESPACE TO -LDAP_USERID-;
--GRANT SELECT ON SYSIBM.SYSINDEXPART TO -LDAP_USERID-;
--COMMIT;

--
--
-- ******************************************************************
-- *** SECTION 02:                                                ***
-- ***                                                            ***
-- ***  SQL for using the partitioned entry identifier assignment ***
-- ***  algorithm.  This is generally needed for users migrating  ***
-- ***  from IBM Tivoli Directory Server for z/OS V1R8 to IBM     ***
-- ***  Tivoli Directory Server for z/OS V1R10.                   ***
-- ******************************************************************
-- The following SQL statememts, created for the IBM Tivoli Directory
-- Server for z/OS V1R8, will alter your DB2 database tables such
-- that they will support the partitioned entry identifier assignment
-- algorithm.  
--
-- You SHOULD NOT run the following SQL statements if your DB2
-- database tables were built to support IBM Tivoli Directory Server
-- for z/OS V1R10 or if your DB2 database tables already support the
-- partitioned entry identifier assignment algorithm.
--
-- If you are unsure whether you need to run the SQL statements in
-- this section, from a separate file, execute the following SQL
-- statement using SPUFI:
--
--    SELECT * FROM SYSIBM.SYSTABLES WHERE
--         CREATOR='-DB2_USERID-' AND NAME='DIR_EID';
--
-- where -DB2_USERID- is changed to the database owner id, as
-- previously described above.
--
-- After execution, if the row count returns 0, then your DB2
-- database tables DO NOT support the partitioned entry identifier
-- assignment algorithm.  If you want to use the partitioned entry
-- identifier assignment algorithm, or if you want to run IBM Tivoli
-- Directory Server for z/OS V1R10, you need to execute the
-- following SQL statements.
--
-- To ensure a successful update of your DB2 database tables, you
-- must comment out all SQL statements in other sections of this file
-- prior to running the following SQL statements.
--
-- ******************************************************************
-- Alter the misc tablespace to set locksize row
--
-- NOTE: This SQL statement is commented out.  To set the misc
-- tablespace to locksize row, remove the '--' characters from the
-- following SQL statement.
-- ******************************************************************
-- ALTER TABLESPACE -DB2_NAME-.-MISC_TABLESPACE-
--         LOCKSIZE ROW;

-- ******************************************************************
-- Alter the misc table to add the partitioned eid column
--
-- NOTE: This SQL statement is commented out.  The IBM Tivoli
-- Directory Server for z/OS LDAP server will automatically alter the
-- DIR_MISC table to add the new partitioned eid column if it is not
-- already there.  As an alternative, you can create the new column
-- here by removing the '--' characters from the following SQL
-- statement.
-- ******************************************************************
-- ALTER TABLE -DB2_USERID-.DIR_MISC
--         ADD PARTITIONED_EID CHAR(1)
--         WITH DEFAULT NULL;

-- ******************************************************************
-- Create the entry identifier table
--
-- NOTE: This SQL statement is commented out.  To create the entry
-- identifier table, remove the '--' characters from the following
-- SQL statement.
-- ******************************************************************
-- CREATE TABLE -DB2_USERID-.DIR_EID (
--         PARTID           DECIMAL(15 , 0) NOT NULL,
--         NEXT_EID         DECIMAL(15 , 0) NOT NULL,
--         MODIFY_TIMESTAMP TIMESTAMP       NOT NULL,
--         PRIMARY KEY( PARTID ) )
-- IN -DB2_NAME-.-MISC_TABLESPACE-;

-- ******************************************************************
-- Create the entry identifier index
--
-- NOTE: This SQL statement is commented out.  To create the entry
-- identifier index, remove the '--' characters from the following
-- SQL statement.
-- ******************************************************************
-- CREATE UNIQUE INDEX -DB2_USERID-.DIR_EIDX1
--         ON -DB2_USERID-.DIR_EID( PARTID )
--         USING STOGROUP -STORAGEGROUP-
--         CLUSTER
--         DEFER YES;

-- ******************************************************************
-- Commit the changes made in this section
--
-- NOTE: This SQL statement is commented out.  Remove the '--'
-- characters from the following SQL statement to commit the changes
-- made in this section.
-- ******************************************************************
-- COMMIT;

-- *********************************************************************
-- Grant SQL SELECT privileges on DB2 catalog tables to the user
-- running the LDAP server.
--
-- NOTE: You need to remove the '--' from each line before you can run
--       these statements.
--
-- Change -LDAP_USERID- to the user ID running the LDAP server.
-- *********************************************************************
--GRANT SELECT ON SYSIBM.SYSCOLUMNS TO -LDAP_USERID-;
--GRANT SELECT ON SYSIBM.SYSCOLDIST TO -LDAP_USERID-;
--GRANT SELECT ON SYSIBM.SYSTABLES TO -LDAP_USERID-;
--GRANT SELECT ON SYSIBM.SYSTABLEPART TO -LDAP_USERID-;
--GRANT SELECT ON SYSIBM.SYSKEYS TO -LDAP_USERID-;
--GRANT SELECT ON SYSIBM.SYSTABLESPACE TO -LDAP_USERID-;
--GRANT SELECT ON SYSIBM.SYSINDEXPART TO -LDAP_USERID-;
--COMMIT;

--
--
-- ******************************************************************
-- *** SECTION 03:                                                ***
-- ***                                                            ***
-- ***  SQL for using the advanced replication support.           ***
-- ***  This is generally needed for users migrating              ***
-- ***  from IBM Tivoli Directory Server for z/OS V1R10 to IBM    ***
-- ***  Tivoli Directory Server for z/OS V1R11.                   ***
-- ******************************************************************
-- The following SQL statememts, created for the IBM Tivoli Directory
-- Server for z/OS V1R10, will alter your DB2 database tables such
-- that they will support advanced replication.
--
-- You SHOULD NOT run the following SQL statements if your DB2
-- database tables were built to support IBM Tivoli Directory Server
-- for z/OS V1R11 or if your DB2 database tables already support
-- advanced replication.
--
-- If you are unsure whether you need to run the SQL statements in
-- this section, from a separate file, execute the following SQL
-- statement using SPUFI:
--
--    SELECT * FROM SYSIBM.SYSTABLES WHERE
--         CREATOR='-DB2_USERID-' AND NAME='DIR_REPLSTATUS';
--
-- where -DB2_USERID- is changed to the database owner id, as
-- previously described above.
--
-- After execution, if the row count returns 0, then your DB2
-- database tables DO NOT support advanced replication.
-- If you want to use advanced replication, you need to execute 
-- the following SQL statements.
--
-- To ensure a successful update of your DB2 database tables, you
-- must comment out all SQL statements in other sections of this file
-- prior to running the following SQL statements.
--
-- ******************************************************************
-- Create the DIR_REPLSTATUS table
--
-- NOTE: This SQL statement is commented out.  Remove the '--'
-- characters from the following SQL statement to commit the changes
-- made in this section.
-- ******************************************************************
--CREATE TABLE -DB2_USERID-.DIR_REPLSTATUS (
--    AGREEMENTEID        DECIMAL(15 , 0)   NOT NULL,
--    CHANGEID            INTEGER           NOT NULL,
--    REPLICACAPS         CHAR(64)          FOR BIT DATA,
--    PRIMARY KEY( AGREEMENTEID ) )
--IN -DB2_NAME-.-MISC_TABLESPACE-;

-- ******************************************************************
-- Create the DIR_REPLCHANGE table
--
-- NOTE: This SQL statement is commented out.  Remove the '--'
-- characters from the following SQL statement to commit the changes
-- made in this section.
-- ******************************************************************
--CREATE TABLE -DB2_USERID-.DIR_REPLCHANGE (
--    CHANGEID            INTEGER           NOT NULL,
--    CONTEXTEID          DECIMAL(15 , 0)   NOT NULL,
--    CHANGESIZE          INTEGER           NOT NULL,
--    CHANGEDATA          LONG VARCHAR      FOR BIT DATA,
--    PRIMARY KEY( CHANGEID, CONTEXTEID ) )
--IN -DB2_NAME-.-REPLICA_TABLESPACE-;

-- ******************************************************************
-- Create the DIR_LONGREPLCHANGE table
--
-- NOTE: This SQL statement is commented out.  Remove the '--'
-- characters from the following SQL statement to commit the changes
-- made in this section.
-- ******************************************************************
--CREATE TABLE -DB2_USERID-.DIR_LONGREPLCHANGE (
--    CHANGEID            INTEGER           NOT NULL,
--    CONTEXTEID          DECIMAL(15 , 0)   NOT NULL,
--    CHANGESEQ           INTEGER           NOT NULL,
--    CHANGEDATA          LONG VARCHAR      FOR BIT DATA,
--    PRIMARY KEY( CHANGEID, CONTEXTEID, CHANGESEQ ) )
--IN -DB2_NAME-.-REPLICA_TABLESPACE-;

-- ******************************************************************
-- Create the DIR_REPLERROR table
--
-- NOTE: This SQL statement is commented out.  Remove the '--'
-- characters from the following SQL statement to commit the changes
-- made in this section.
-- ******************************************************************
--CREATE TABLE -DB2_USERID-.DIR_REPLERROR (
--    ERRORID             INTEGER           NOT NULL,
--    AGREEMENTEID        DECIMAL(15 , 0)   NOT NULL,
--    ERRORSIZE           INTEGER           NOT NULL,
--    ERRORDATA           LONG VARCHAR      FOR BIT DATA,
--    PRIMARY KEY( ERRORID ) )
--IN -DB2_NAME-.-REPLICA_TABLESPACE-;

-- ******************************************************************
-- Create the DIR_LONGREPERROR table
--
-- NOTE: This SQL statement is commented out.  Remove the '--'
-- characters from the following SQL statement to commit the changes
-- made in this section.
-- ******************************************************************
--CREATE TABLE -DB2_USERID-.DIR_LONGREPLERROR (
--    ERRORID             INTEGER           NOT NULL,
--    AGREEMENTEID        DECIMAL(15 , 0)   NOT NULL,
--    ERRORSEQ            INTEGER           NOT NULL,
--    ERRORDATA           LONG VARCHAR      FOR BIT DATA,
--    PRIMARY KEY( ERRORID, ERRORSEQ ) )
--IN -DB2_NAME-.-REPLICA_TABLESPACE-;

-- ******************************************************************
-- Create the DIR_REPLSTATUS Index
--
-- NOTE: This SQL statement is commented out.  Remove the '--'
-- characters from the following SQL statement to commit the changes
-- made in this section.
-- ******************************************************************
--CREATE UNIQUE INDEX -DB2_USERID-.DIR_REPLSTATUSX1
--    ON -DB2_USERID-.DIR_REPLSTATUS( AGREEMENTEID )
--    USING STOGROUP -STORAGEGROUP-
--    CLUSTER
--    DEFER YES;

-- ******************************************************************
-- Create the DIR_REPLCHANGE Indexes
--
-- NOTE: This SQL statement is commented out.  Remove the '--'
-- characters from the following SQL statements to commit the changes
-- made in this section.
-- ******************************************************************
--CREATE UNIQUE INDEX -DB2_USERID-.DIR_REPLCHANGEX1
--    ON -DB2_USERID-.DIR_REPLCHANGE( CHANGEID, CONTEXTEID )
--    USING STOGROUP -STORAGEGROUP-
--    CLUSTER
--    DEFER YES;

--CREATE INDEX -DB2_USERID-.DIR_REPLCHANGEX2
--    ON -DB2_USERID-.DIR_REPLCHANGE( CONTEXTEID )
--    USING STOGROUP -STORAGEGROUP-
--    DEFER YES;

--CREATE INDEX -DB2_USERID-.DIR_REPLCHANGEX3
--    ON -DB2_USERID-.DIR_REPLCHANGE( CHANGEID )
--    USING STOGROUP -STORAGEGROUP-
--    DEFER YES;

-- ******************************************************************
-- Create the DIR_LONGREPLCHANGE Index
--
-- NOTE: This SQL statement is commented out.  Remove the '--'
-- characters from the following SQL statement to commit the changes
-- made in this section.
-- ******************************************************************
--CREATE UNIQUE INDEX -DB2_USERID-.DIR_LONGREPLCHANGEX1
--    ON -DB2_USERID-.DIR_LONGREPLCHANGE( CHANGEID, CONTEXTEID,
--                                       CHANGESEQ )
--    USING STOGROUP -STORAGEGROUP-
--    CLUSTER
--    DEFER YES;

-- ******************************************************************
-- Create the DIR_REPERROR Indexes
--
-- NOTE: This SQL statement is commented out.  Remove the '--'
-- characters from the following SQL statements to commit the changes
-- made in this section.
-- ******************************************************************
--CREATE UNIQUE INDEX -DB2_USERID-.DIR_REPLERRORX1
--    ON -DB2_USERID-.DIR_REPLERROR( ERRORID )
--    USING STOGROUP -STORAGEGROUP-
--    CLUSTER
--    DEFER YES;

--CREATE INDEX -DB2_USERID-.DIR_REPLERRORX2
--    ON -DB2_USERID-.DIR_REPLERROR( AGREEMENTEID )
--    USING STOGROUP -STORAGEGROUP-
--    DEFER YES;

-- ******************************************************************
-- Create the DIR_LONGREPERROR Indexes
--
-- NOTE: This SQL statement is commented out.  Remove the '--'
-- characters from the following SQL statements to commit the changes
-- made in this section.
-- ******************************************************************
--CREATE UNIQUE INDEX -DB2_USERID-.DIR_LONGREPLERRORX1
--    ON -DB2_USERID-.DIR_LONGREPLERROR( ERRORID, ERRORSEQ )
--    USING STOGROUP -STORAGEGROUP-
--    CLUSTER
--    DEFER YES;

--CREATE INDEX -DB2_USERID-.DIR_LONGREPLERRORX2
--    ON -DB2_USERID-.DIR_LONGREPLERROR( AGREEMENTEID )
--    USING STOGROUP -STORAGEGROUP-
--    DEFER YES;
--
-- ******************************************************************
-- Commit the changes made in this section
--
-- NOTE: This SQL statement is commented out.  Remove the '--'
-- characters from the following SQL statement to commit the changes
-- made in this section.
-- ******************************************************************
-- COMMIT;