IBM Support

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

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error 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
    

Local fix

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                                           *
    ****************************************************************
    

Problem conclusion

  • V9.7 FP2 contains the fix
    

Temporary fix

Comments

APAR Information

  • APAR number

    IC65657

  • Reported component name

    DB2 FOR LUW

  • Reported component ID

    DB2FORLUW

  • Reported release

    970

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2010-01-19

  • Closed date

    2010-05-14

  • Last modified date

    2010-05-14

  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

Fix information

  • Fixed component name

    DB2 FOR LUW

  • Fixed component ID

    DB2FORLUW

Applicable component levels

  • R950 PSN

       UP

  • R970 PSN

       UP

[{"Business Unit":{"code":"BU048","label":"IBM Software"},"Product":{"code":"SSEPGG","label":"DB2 for Linux, UNIX and Windows"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"9.7","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
14 May 2010