Disabling Table Auditing for a DB2 for Linux, UNIX, and Windows Database

Before performing this task, make sure that all users are logged off the system and that no batch jobs are running on the server.

Note: Disabling auditing for a table does not remove the table from the audit list.
  1. From the Start menu, select IBM DB2, Command Window to start a DB2 Command Window.

  2. Sign in to the database with a user who has a DBADM privilege.

  3. Collect Table Space information for the Specified table with this SQL Command:

    SELECT TBSPACE, INDEX_TBSPACE, LONG_TBSPACE  FROM
    
    SYSCAT.TABLES where TABNAME = ERPTable (with '') and
    
    TABSCHEMA=schema (with'')
    
  4. Write down the table space names for table, index, and long data, respectively.

  5. Create the temporary table with this SQL command:

    CREATE TABLE schema.ERPTable_temp LIKE schema.ERPTable (VIEW) IN tbspace INDEX IN⇒
     index_tbspace LONG IN long_tbspace NOT LOGGED INITIALLY
    
    Note: The table space names were collected from step 4: tbspace for table, index_tbspace for index, and long_tbspace for long data.Run the SQL command in step 3 against the new temporary table to ensure that it has been created in correct table spaces.
  6. Copy data from the view to the temporary table with this SQL command:

    INSERT INTO schema.ERPTable_temp SELECT * FROM schema.ERPTable (VIEW)
    
    Note: This process may take a few minutes to complete depending on the size of the table.
  7. To ensure that all data was copied, run the following SQL commands against the view and the temporary table:

    SELECT COUNT(*) FROM schema.ERPTable_temp
    
    SELECT COUNT(*) FROM schema.ERPTable
    

    The results of running both commands should be same.

  8. Use this SQL command to drop the view:

    DROP VIEW schema.ERPTable
    
  9. Use this SQL command to drop the ADT table:

    DROP TABLE schema.ERPTable_ADT
    
  10. Rename temporary table with the original JD Edwards EnterpriseOne table name:

    RENAME schema.ERPTable_temp TO ERPTable
    
  11. Use this SQL command to grant privileges to PUBLIC for the new table:

    GRANT SELECT, INSERT, UPDATE, DELETE, ALTER, INDEX, REFERENCES ON TABLE⇒
     schema.ERPTable TO PUBLIC
    
  12. Sign in to JD Edwards EnterpriseOne client and then enter OMW in the Fast Path to access OMW.

  13. Use Table Design Toolset to generate indices for this table.

  14. Run "Verify and Reset" using the Work With Audit Table Configuration form.

    See Verifying and Resetting Audit Tables.