DB2 - Problem description
| Problem IC82706 | Status: Closed |
ALTER COLUMN SET DATA TYPE NOT BLOCKED FOR ROW CHANGE TIMESTAMP COLUMN | |
| product: | |
DB2 FOR LUW / DB2FORLUW / 970 - DB2 | |
| Problem description: | |
A row change timestamp column must have data type
TIMESTAMP(6). This is correctly enforced by CREATE TABLE
and ALTER TABLE ADD COLUMN. However, the data type can be
changed via:
ALTER TABLE <table> ALTER COLUMN <row change column>
SET DATA TYPE <data type>
This should be blocked with SQLCODE SQL0190 if <data type>
is not TIMESTAMP(6) but the alteration succeeds. The result
is possible abnormal termination of the DB2 server and
general unpredictable behaviour with respect to the row
change timestamp column.
Use the following query to identify any tables that have a
row change timestamp column with an invalid type:
SELECT TABSCHEMA, TABNAME, COLNAME FROM SYSCAT.COLUMNS
WHERE ROWCHANGETIMESTAMP = 'Y'
AND ( TYPENAME != 'TIMESTAMP' OR SCALE != 6 ) | |
| Problem Summary: | |
**************************************************************** * USERS AFFECTED: * * ALL * **************************************************************** * PROBLEM DESCRIPTION: * * See Error Description * **************************************************************** * RECOMMENDATION: * * Upgrade to DB2 version 9.7 Fix Pack 6 * **************************************************************** | |
| Local Fix: | |
To fix such a table, alter the column back to TIMESTAMP(6)
ALTER TABLE <table> ALTER COLUMN <row change timestamp column>
SET DATA TYPE TIMESTAMP(6) | |
| available fix packs: | |
DB2 Version 9.7 Fix Pack 6 for Linux, UNIX, and Windows | |
| Solution | |
Problem was first fixed in Version 9.7 Fix Pack 6 | |
| Workaround | |
See Local Fix | |
| BUG-Tracking | |
forerunner : APAR is sysrouted TO one or more of the following: IC84599 IC84609 follow-up : | |
| Timestamps | |
Date - problem reported : Date - problem closed : Date - last modified : | 17.04.2012 05.06.2012 05.06.2012 |
| Problem solved at the following versions (IBM BugInfos) | |
9.7.FP6 | |
| Problem solved according to the fixlist(s) of the following version(s) | |
| 9.7.0.6 |
|