Changing the logging attribute

You can use the ALTER TABLESPACE statement to set the logging attribute of a table space.

Before you begin

Important: Limit the use of the NOT LOGGED attribute. Logging is not generally a performance bottleneck, given that in an average environment logging accounts for less than 5% of the central processing unit (CPU) utilization. Therefore, you should use the NOT LOGGED attribute only when data is being used by a single task, where the table space can be recovered if errors occur.

Procedure

To change the logging attribute of a table space:

  1. Issue an ALTER TABLESPACE statement.
  2. Specify the LOGGED or NOT LOGGED attribute.
    • LOGGED: Specifies that changes made to data in this table space are to be recorded on the log.
    • NOT LOGGED: Specifies that changes made to data in this table space are not to be recorded on the log. The NOT LOGGED attribute suppresses the logging of undo and redo information.

Results

The change in logging applies to all tables in this table space and also applies to all indexes on those tables, as well as associated LOB and XML table spaces.