DB2 - Problem description
Problem IT22422 | Status: Closed |
TRANSFER OWNERSHIP OF A VIEW THAT IS BASED ON A MODULE VARIABLE FAILS WITH SQL20342N | |
product: | |
DB2 FOR LUW / DB2FORLUW / B10 - DB2 | |
Problem description: | |
TRANSFER OWNERSHIP of a VIEW which is based on a MODULE VARIABLE may fail with SQL20342N. Example: Suppose there are 2 different users, instance user (db2n75) and a second user (sapn75): #1st part: db2 connect to N75 user sapn75 using ****** Database Connection Information Database server = DB2/LINUXX8664 11.1.1.1 SQL authorization ID = SAPN75 Local database alias = N75 db2 " create module mtest " db2 " alter module mtest publish variable myvar integer " db2 " create table hugo ( i integer ) " -> Now user SAPN75 is OWNER of MODULE MTEST and OWNER of MTEST.MYVAR and can READ this variable. # 2nd part, connect as instance user DB2N75: db2 connect to N75 Database Connection Information Database server = DB2/LINUXX8664 11.1.1.1 SQL authorization ID = DB2N75 Local database alias = N75 db2 set current schema sapn75 db2 set current path SYSTEM PATH, 'SAPTOOLS' , 'SAPN75' db2 " CREATE VIEW TEST1 AS SELECT MTEST.MYVAR FROM HUGO " db2 " TRANSFER OWNERSHIP OF VIEW TEST1 TO USER SAPN75 PRESERVE PRIVILEGES " DB21034E The command was processed as an SQL statement because it was not a valid Command Line Processor command. During SQL processing it returned: SQL20342N "SAPN75" does not have one or more required privileges "READ" on object "MYVAR" of type "VARIABLE" necessary for ownership of the object. -> The instance owner DB2N75 can not transfer the ownership of view TEST1. This is supposed to work and should not return with error. | |
Problem Summary: | |
**************************************************************** * USERS AFFECTED: * * ALL * **************************************************************** * PROBLEM DESCRIPTION: * * See Error Description * **************************************************************** * RECOMMENDATION: * * Upgrade to Db2 11.1 Mod 4 Fixpack 5 or higher * **************************************************************** | |
Local Fix: | |
Solution | |
Workaround | |
not known / see Local fix | |
BUG-Tracking | |
forerunner : follow-up : IT22443 | |
Timestamps | |
Date - problem reported : Date - problem closed : Date - last modified : | 18.09.2017 16.01.2020 16.01.2020 |
Problem solved at the following versions (IBM BugInfos) | |
Problem solved according to the fixlist(s) of the following version(s) |