DB2 - Problembeschreibung
Problem IC90069 | Status: Geschlossen |
THE PROCEDURE SYSPROC.ADMIN_MOVE_TABLE STRIPS SPACES FROM OR ADDS SPACES TO THE END OF A TABLE NAME. | |
Produkt: | |
DB2 FOR LUW / DB2FORLUW / A10 - DB2 | |
Problembeschreibung: | |
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-Zusammenfassung: | |
**************************************************************** * 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. | |
verfügbare FixPacks: | |
DB2 Version 10.1 Fix Pack 3 for Linux, UNIX, and Windows | |
Lösung | |
Problem was first fixed in Version 10.1 Fix Pack 3 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. | |
Weitere Daten | |
Datum - Problem gemeldet : Datum - Problem geschlossen : Datum - der letzten Änderung: | 06.02.2013 08.10.2013 08.10.2013 |
Problem behoben ab folgender Versionen (IBM BugInfos) | |
Problem behoben lt. FixList in der Version | |
10.1.0.3 | |
10.1.0.3 |