DB2 - Problem description
Problem IC90066 | Status: Closed |
THE PROCEDURE SYSPROC.ADMIN_MOVE_TABLE STRIPS SPACES FROM OR ADDS SPACES TO THE END OF A TABLE NAME. | |
product: | |
DB2 FOR LUW / DB2FORLUW / 970 - DB2 | |
Problem description: | |
When you call the procedure SYSPROC.ADMIN_MOVE_TABLE with the MOVE option, if the second argument matches the name of some table except that the argument has extra spaces at the end or the name of the table has extra spaces at the end, the table gets renamed. For example: 1) Stripping spaces from the end of the table name. --Create a table called "TAB1 " --(with a space at the end of the name). db2 'create table schema1."TAB1 "(col1 int)' --Call SYSPROC.ADMIN_MOVE_TABLE passing 'TAB1' --as the second argument (without the space at the end). db2 "call sysproc.admin_move_table ('SCHEMA1', 'TAB1', '' , '' ,'', '', '' , '', '', '', 'move' )" --Now in the system catalog the space has been stripped off --the end of the name. db2 "select substr(tabname, 1, 20), length(tabname), substr(hex(tabname), 1, 20) from syscat.tables where tabname like 'TAB1%'" 1 2 3 -------------------- ----------- -------------------- TAB1 4 54414231 1 record(s) selected. 2) Adding spaces to the end of the table name. --Create a table called TAB1 without any spaces at the end --of the name. db2 "create table schema1.tab1(col1 int)" --Call SYSPROC.ADMIN_MOVE_TABLE passing 'TAB1 ' --as the second argument (with an extra space at the end). db2 "call sysproc.admin_move_table ('SCHEMA1', 'TAB1 ', '' ,'' ,'', '', '' , '', '', '', 'move' )" --Now in the system catalog the extra space has been added --to the end of the table name. db2 "select substr(tabname, 1, 20), length(tabname), substr(hex(tabname), 1, 20) from syscat.tables where tabname like 'TAB1%'" 1 2 3 -------------------- ----------- -------------------- TAB1 5 5441423120 1 record(s) selected. | |
Problem Summary: | |
**************************************************************** * USERS AFFECTED: * * Users of DB2 for Linux, UNIX and Windows * **************************************************************** * PROBLEM DESCRIPTION: * * See Error Description * **************************************************************** * RECOMMENDATION: * * . * **************************************************************** | |
Local Fix: | |
You can change the table back to its old name by calling SYSPROC.ADMIN_MOVE_TABLE passing the old table name as the second argument. | |
available fix packs: | |
DB2 Version 9.7 Fix Pack 9 for Linux, UNIX, and Windows | |
Solution | |
Problem was first fixed in Version 9.7 Fix Pack 9. At a minimum, this fix should be applied on the server. | |
Workaround | |
You can change the table back to its old name by calling SYSPROC.ADMIN_MOVE_TABLE passing the old table name as the second argument. | |
BUG-Tracking | |
forerunner : APAR is sysrouted TO one or more of the following: IC90069 IC94674 follow-up : | |
Timestamps | |
Date - problem reported : Date - problem closed : Date - last modified : | 06.02.2013 17.12.2013 17.12.2013 |
Problem solved at the following versions (IBM BugInfos) | |
9.7.FP9 | |
Problem solved according to the fixlist(s) of the following version(s) | |
9.7.0.9 | |
9.7.0.9 |