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 IC84061 Status: Geschlossen

SQL0206N RETURNED WHEN REFERENCING VARIABLE IN ANOTHER ORACLE PACKAGE WITH
SAME NAME.

Produkt:
DB2 FOR LUW / DB2FORLUW / 970 - DB2
Problembeschreibung:
You will receive error SQL0206N when the following 
conditions are met: 
 
- A PL/SQL function declares a local variable and also contains 
a package-qualified reference to a package variable with the 
same name as the local variable. 
 
- The local variable appears in a RETURN statement in the 
function. 
 
For example: 
 
create or replace package package1 
as 
  v_test varchar2(10) := 'test'; 
end package1; 
/ 
 
create or replace function f 
return varchar2 
is 
  v_test varchar2(10); 
begin 
  v_test := package1.v_test; 
  return v_test; 
end f; 
/ 
 
The same error can occur in compiled SQL PL functions that 
reference a local variable with the same name as a module 
variable in a RETURN statement.  For example: 
 
create module M % 
 
alter module M publish variable v_test varchar(10) 
  default 'test' % 
 
create or replace function f() 
returns varchar(10) 
begin 
  declare v_test varchar(10); 
 
  set v_test = M.v_test; 
  return v_test; 
end %
Problem-Zusammenfassung:
**************************************************************** 
* USERS AFFECTED:                                              * 
* ALL                                                          * 
**************************************************************** 
* PROBLEM DESCRIPTION:                                         * 
* See Error Description                                        * 
**************************************************************** 
* RECOMMENDATION:                                              * 
* Apply DB2 Version 9.7 Fix Pack 7 to the DB2 database server. * 
****************************************************************
Local-Fix:
Rename the local variable so that it does not have the same 
name as the package variable.  Using the PL/SQL example from 
the error description: 
 
-- Rename 'v_test' as 'v_testx' to work around name 
-- resolution error with 'package1.v_test': 
 
create or replace function f 
return varchar2 
is 
  v_testx varchar2(10); 
begin 
  v_testx := package1.v_test; 
  return v_testx; 
end f; 
/
verfügbare FixPacks:
DB2 Version 9.7 Fix Pack 7 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 8 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 9 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 9a for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 10 for Linux, UNIX, and Windows

Lösung
Problem first fixed in DB2 Version 9.7 Fix Pack 7.  This is a 
server side fix.
Workaround
keiner bekannt / siehe Local-Fix
Weitere Daten
Datum - Problem gemeldet    :
Datum - Problem geschlossen :
Datum - der letzten Änderung:
11.06.2012
20.10.2012
20.10.2012
Problem behoben ab folgender Versionen (IBM BugInfos)
9.7.FP7
Problem behoben lt. FixList in der Version
9.7.0.7 FixList