home clear 64x64
en blue 200x116 de orange 200x116 info letter User
suche 36x36
Neueste VersionenFixList
11.1.0.7 FixList
10.5.0.9 FixList
10.1.0.6 FixList
9.8.0.5 FixList
9.7.0.11 FixList
9.5.0.10 FixList
9.1.0.12 FixList
Haben Sie Probleme? - Kontaktieren Sie uns.
Kostenlos registrieren anmeldung-x26
Kontaktformular kontakt-x26

DB2 - Problembeschreibung

Problem IC94656 Status: Geschlossen

FED: DB2LOOK GENERATE INCORRECT FUNCTION MAPPING DDL

Produkt:
DB2 FOR LUW / DB2FORLUW / A50 - DB2
Problembeschreibung:
db2look generates incorrect function mapping DDL causes users 
need to refine their db2look output before running it to 
recreate their federated objects. 
 
-- -------------------------------- 
-- DDL Statements for FUNCTION MAPPING 
-- -------------------------------- 
CREATE FUNCTION MAPPING "FM_TO_CHAR" 
   FOR "SYSIBM".TO_CHAR(SYSIBM.TIMESTMP,SYSIBM.VARCHAR) 
   SERVER "SERV1" 
   OPTIONS 
      (REMOTE_NAME  'TO_CHAR' 
      ); 
 
In above DDL, TIMESTMP  should be  TIMESTAMP,   VARCHAR should 
be 
VARCHAR(). 
 
Reproduce: 
 
create wrapper net8; 
create server serv1 type oracle version '11.1' wrapper net8 
options(node '****'); 
create user mapping for <USER NAME> server serv1 
options(remote_authid '<USER ID>',remote_password '<PASSWORD>'); 
CREATE FUNCTION MAPPING FM_TO_CHAR  FOR 
SYSIBM.TO_CHAR(SYSIBM.TIMESTAMP,SYSIBM.VARCHAR()) SERVER serv1 
OPTIONS (REMOTE_NAME'TO_CHAR') ; 
 
 
db2look  -d <db name> -e -fedonly -o db2look.sql 
 
-- -------------------------------- 
-- DDL Statements for FUNCTION MAPPING 
-- -------------------------------- 
CREATE FUNCTION MAPPING "FM_TO_CHAR" 
   FOR "SYSIBM".TO_CHAR(SYSIBM.TIMESTMP,SYSIBM.VARCHAR) 
   SERVER "SERV1" 
   OPTIONS 
      (REMOTE_NAME  'TO_CHAR' 
      ); 
 
 
=> db2 "SELECT substr(funcschema,1,14),substr(funcname,1,40) 
from SYSIBM.SYSFUNCMAPPINGS" 
 
1              2 
-------------- ---------------------------------------- 
SYSIBM         TO_CHAR(SYSIBM.TIMESTMP,SYSIBM.VARCHAR) 
 
  1 record(s) selected. 
 
 
=> db2 "CREATE FUNCTION MAPPING "FM_TO_CHAR" FOR 
"SYSIBM".TO_CHAR(SYSIBM.TIMESTMP,SYSIBM.VARCHAR) SERVER "SERV1" 
OPTIONS (REMOTE_NAME'TO_CHAR') " 
DB21034E  The command was processed as an SQL statement because 
it was not a 
valid Command Line Processor command.  During SQL processing it 
returned: 
SQL0104N  An unexpected token "VARCHAR" was found following 
"IBM.TIMESTMP, 
SYSIBM.".  Expected tokens may include:  "LONG".  LINE NUMBER=1. 
SQLSTATE=42601 
 
 
=> db2 "CREATE FUNCTION MAPPING "FM_TO_CHAR" FOR 
"SYSIBM".TO_CHAR(SYSIBM.TIMESTMP,SYSIBM.VARCHAR()) SERVER 
"SERV1" OPTIONS (REMOTE_NAME'TO_CHAR') " 
DB21034E  The command was processed as an SQL statement because 
it was not a 
valid Command Line Processor command.  During SQL processing it 
returned: 
SQL0204N  "SYSIBM.TIMESTMP" is an undefined name.  LINE 
NUMBER=2. 
SQLSTATE=42704 
 
=> db2 "CREATE FUNCTION MAPPING "FM_TO_CHAR" FOR 
"SYSIBM".TO_CHAR(SYSIBM.TIMESTAMP,SYSIBM.VARCHAR()) SERVER 
"SERV1" OPTIONS (REMOTE_NAME'TO_CHAR') " 
DB20000I  The SQL command completed successfully.
Problem-Zusammenfassung:
**************************************************************** 
* USERS AFFECTED:                                              * 
* All users                                                    * 
**************************************************************** 
* PROBLEM DESCRIPTION:                                         * 
* See Error Description                                        * 
**************************************************************** 
* RECOMMENDATION:                                              * 
* Please upgrade to DB2 version 10.5 fixpack 3 or later        * 
****************************************************************
Local-Fix:
Replace TIMESTMP with TIMESTAMP, VARCHAR with VARCHAR() in 
db2look function mapping output
verfügbare FixPacks:
DB2 Cancun Release 10.5.0.4 (also known as Fix Pack 4) for Linux, UNIX, and Windows
DB2 Version 10.5 Fix Pack 9 for Linux, UNIX, and Windows

Lösung
Workaround
keiner bekannt / siehe Local-Fix
Weitere Daten
Datum - Problem gemeldet    :
Datum - Problem geschlossen :
Datum - der letzten Änderung:
05.08.2013
28.11.2014
28.11.2014
Problem behoben ab folgender Versionen (IBM BugInfos)
Problem behoben lt. FixList in der Version
10.5.0.4 FixList