DB2에서 오라클 호환모드를 사용할 때, PL/SQL에서 오라클 방식으로 VARCHAR ARRAY ( VARRAY ) 타입의 데이터를 오라클 스타일로 초기화할 때 발생하는 오류에 대한 해결방법입니다. DB2에서 VARRAY 데이터 타입을 오라클 스타일로 초기화하려고 하면 함수로 인식해 SQL0440N 오류가 발생합니다.
Problem(Abstract)
A PL/SQL array constructor statement with the syntax as seen below, fails in DB2 with error SQL0440N
For e.g.
v_List va1.t_Strings := va1.t_Strings('Harry', 'Ron', 'Hermione');
SQL0440N No authorized routine named routine-name of type routine-type having compatible arguments was found
Symptom
Error SQL0440N will be returned when a PL/SQL containing an array constructor is run in DB2.
Cause
DB2 does not support PL/SQL array constructor syntax, and therefore ends up trying to interpret the array constructor as a function call(routine).
However since it does not find a matching routine name corresponding to this, it ends up throwing the SQL0440N error.
Diagnosing the problem
If SQL0440N is returned when the PL/SQL statement is executed, then this issue can be confirmed by examining the PL/SQL to see if it uses an array constructor to initialize an array.
Resolving the problem
Workaround :
Instead of using an array constructor to initialize the array, ie. instead of doing :
v_List va1.t_Strings := va1.t_Strings('Harry', 'Ron', 'Hermione');
we can initialize the array as follows :
v_List(1) := 'Harry';
v_List(2) := 'Ron';
v_List(3) := 'Hermione';
http://www-01.ibm.com/support/docview.wss?uid=swg21608791
'Db2 > Db2 troubleshooting' 카테고리의 다른 글
SQL0727N 오류 관련 ( SQLCODE -204 , SQLSTATE 42703 ) (0) | 2015.06.03 |
---|---|
SQL0805N Package SYSLH203 was not found (0) | 2015.05.07 |
db2icrt fails with DBI1295E (0) | 2014.10.23 |
db2top 화면이 어그러지는 현상 (AIX) (0) | 2014.10.21 |
Considerations before installing DB2 for Windows on or prior to Fix Pack (9.7.9, 10.1.3, 10.5.3) on Windows 8.1 and Windows 2012 R2 (0) | 2014.05.07 |