After you have created a table, you can change the comment,
select a lock size, determine the percentage of free space on each
page, select data capture for propagation, extend the data capture
to include long variable length columns, and indicate whether data
is to be appended to the end of the table data.
Before you begin
To
alter a table, you must have at least one of the following privileges
on the table to be altered:
- ALTER privilege
- CONTROL privilege
- DBADM authority
- ALTERIN privilege on the schema of the table
Note: To change the definition of a existing column (in a database
that is Version 8.2 or greater), you must have DBADM authority.
Procedure
- To alter table properties using the Control Center:
- Expand the object tree until you find the Tables folder.
Click the Tables folder. Any existing tables
are displayed in the pane on the right side of the window. Right-click
the table you want and select Alter from the
pop-up menu. The Alter Table notebook
opens.
- On the Table tab:
- Type a new comment or edit the existing comment.
- Select a lock size to specify the use of row locks or table locks
when accessing the table. Use of the Lock size does
not prevent normal lock escalation.
Attention: Your new lock size selection is saved in the system but
will not be displayed the next time you view this field.
- Select a value to change the percentage of each page to be left
as free space during load or reorganization.
- Indicate whether extra information regarding changes to this table
will be written to the log if this table is replicated.
- Indicate whether to extend the data capture for propagation function
to include long varchar and long vargraphic columns in the log.
Attention: You must first select the Data
capture for propagation check box to enable the Include
long variable length columns check box.
- Indicate whether data is to be appended to the end of the table
data.
- Indicate to the optimizer that the cardinality of your table can
vary significantly at run time.
- Specify how index build logging should be performed:
- No change specifies that no change will be made to the
LOG INDEX BUILD table attribute
- NULL specifies that the amount of index build information
logged for this table will depend on the value of the logindexbuild database
configuration parameter.
- ON specifies that enough index build data will be logged
for this table to reconstruct indexes during DB2® rollforward or HADR log replay.
- OFF specifies that minimal index build data will be logged.
- To alter table properties using the command line, use the
ALTER TABLE statement.