home clear 64x64
en blue 200x116 de orange 200x116 info letter User
suche 36x36
Latest versionsfixlist
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
Have problems? - contact us.
Register for free anmeldung-x26
Contact form kontakt-x26

DB2 - Problem description

Problem IC65657 Status: Closed

DB2LOOK ERROR IN V97FP1 IN GRANT TO STORED PROCEDURES WITH THE SAME NAME
BUT DIFFERENT SCHEMA

product:
DB2 FOR LUW / DB2FORLUW / 970 - DB2
Problem description:
create table s1.tab1(c1 smallint NOT NULL, c2 int, c3 bigint) 
DB20000I  The SQL command completed successfully. 
 
create function s1.func1() specific func1 returns integer 
language sql reads sql data deterministic no external action 
begin declare i integer; set i = (select c3 from s1.tab1 where 
c2 = 22);return i;end 
 
DB20000I  The SQL command completed successfully. 
 
grant execute on function s1.func1 to user ZURBIE 
DB20000I  The SQL command completed successfully. 
 
create table s2.tab1(c1 smallint NOT NULL, c2 int, c3 bigint) 
DB20000I  The SQL command completed successfully. 
 
create function s2.func1() specific func1 returns integer 
language sql reads sql data deterministic no external action 
begin declare i integer; set i = (select c3 from s2.tab1 where 
c2 = 22);return i;end 
 
DB20000I  The SQL command completed successfully. 
 
select PRIVILEGE from SYSIBMADM.PRIVILEGES where OBJECTNAME = 
'FUNC1'  and  OBJECTSCHEMA = '11' and AUTHID = 'ZURBIE' 
 
PRIVILEGE 
----------- 
EXECUTE 
 
  1 record(s) selected. 
 
select PRIVILEGE from SYSIBMADM.PRIVILEGES where OBJECTNAME = 
'FUNC1'  and  OBJECTSCHEMA = 'S2' and AUTHID = 'ZURBIE' 
 
PRIVILEGE 
----------- 
 
  0 record(s) selected. 
 
 
 
 db2look -d srcdb1 -e -x 
-- No userid was specified, db2look tries to use Environment 
variable USER 
-- USER is: SVALENTI 
-- Creating DDL for table(s) 
-- This CLP file was created using DB2LOOK Version "9.7" 
-- Timestamp: Wed 23 Sep 2009 12:40:56 PM EDT 
-- Database Name: SRCDB1 
-- Database Manager Version: DB2/LINUXX8664 Version 9.7.1 
-- Database Codepage: 1208 
-- Database Collating Sequence is: IDENTITY 
 
-- Binding package automatically ... 
-- Bind is successful 
-- Binding package automatically ... 
-- Bind is successful 
 
CONNECT TO SRCDB1; 
 
 
 
------------------------------------------------ 
-- DDL Statements for table "S1      "."TAB1" 
------------------------------------------------ 
 
 
CREATE TABLE "S1      "."TAB1"  ( 
                  "C1" SMALLINT NOT NULL , 
                  "C2" INTEGER , 
                  "C3" BIGINT ) 
                 IN "USERSPACE1" ; 
 
------------------------------------------------ 
-- DDL Statements for table "S2      "."TAB1" 
------------------------------------------------ 
 
 
CREATE TABLE "S2      "."TAB1"  ( 
                  "C1" SMALLINT NOT NULL , 
                  "C2" INTEGER , 
                  "C3" BIGINT ) 
                 IN "USERSPACE1" ; 
 
--------------------------------- 
-- DDL statements for User Defined Functions 
--------------------------------- 
 
SET CURRENT SCHEMA = "SVALENTI"; 
SET CURRENT PATH = 
"SYSIBM","SYSFUN","SYSPROC","SYSIBMADM","SVALENTI"; 
 
create function s1.func1() specific func1 returns integer 
language sql reads 
sql data deterministic no external action begin declare i 
integer; set 
i = (select c3 from s1.tab1 where c2 = 22);return i;end; 
 
SET CURRENT SCHEMA = "SVALENTI"; 
SET CURRENT PATH = 
"SYSIBM","SYSFUN","SYSPROC","SYSIBMADM","SVALENTI"; 
 
create function s2.func1() specific func1 returns integer 
language sql reads 
sql data deterministic no external action begin declare i 
integer; set 
i = (select c3 from s2.tab1 where c2 = 22);return i;end; 
 
----------------------------------------------------- 
-- Authorization Statements on User Defined Functions 
----------------------------------------------------- 
 
 
GRANT EXECUTE ON FUNCTION "S1      "."FUNC1"() TO USER "ZURBIE 
" ; 
 
GRANT EXECUTE ON FUNCTION "S2      "."FUNC1"() TO USER "ZURBIE 
" ;            <===== This GRANT statement should not be here
Problem Summary:
**************************************************************** 
* USERS AFFECTED:                                              * 
* All user of db2look -x option                                * 
**************************************************************** 
* PROBLEM DESCRIPTION:                                         * 
* Incorrect Grant statements on function having same name but  * 
* different schema                                             * 
**************************************************************** 
* RECOMMENDATION:                                              * 
* Upgrade to V9.7 P2                                           * 
****************************************************************
Local Fix:
available fix packs:
DB2 Version 9.7 Fix Pack 2 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 3 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 3a for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 4 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 5 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 6 for Linux, UNIX, and Windows
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 9a for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 9 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 10 for Linux, UNIX, and Windows

Solution
V9.7 FP2 contains the fix
Workaround
not known / see Local fix
Timestamps
Date  - problem reported    :
Date  - problem closed      :
Date  - last modified       :
19.01.2010
14.05.2010
14.05.2010
Problem solved at the following versions (IBM BugInfos)
9.7.,
9.7.FP2
Problem solved according to the fixlist(s) of the following version(s)
9.7.0.2 FixList