If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Execute grant poblem

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-16-06, 05:18
NGambler NGambler is offline
Registered User
 
Join Date: Jul 2005
Posts: 25
Execute grant poblem

Hi, everybody

I encountered a very strange behavior of DB2. There are two SELECT statements listed below. The difference is presencing UPPER function in the second statement. When I execute these statements (in the same session without any other statements) the first one works properly but the second one returns an exception

SQL0551N "USER1" does not have the privilege to perform operation "EXECUTE"
on object "SCHEMA1.FUNCTION1". SQLSTATE=42501

The first statement:
select *
from table1
where SCHEMA1.FUNCTION1 ( column1 ) = 1

The second statement:
select *
from table1
where SCHEMA1.FUNCTION1 ( upper(column1) ) = 1

table1.column1 and the parameter of SCHEMA1.FUNCTION1 have varchar type.
Execute permition granted to a group containing USER1.
DB2 version: 8.1.1.88 + FixPack 9
Platform: AIX

Any ideas what causes the difference in behavoir. Please advise.
Reply With Quote
  #2 (permalink)  
Old 02-16-06, 21:41
sathyaram_s sathyaram_s is offline
Super Moderator
 
Join Date: Aug 2001
Location: UK
Posts: 4,534
Raise a PMR

Sathyaram
__________________
Visit the new-look IDUG Website , register to gain access to the excellent content.
Reply With Quote
  #3 (permalink)  
Old 02-16-06, 22:22
murali_sb murali_sb is offline
Registered User
 
Join Date: Dec 2005
Posts: 39
maybe some packages could be missing which need to be rebound to the database. If you do db2 ? sql0551 from windows/unix prompt you'll get the error description, one of which is utility programs missing.
Reply With Quote
  #4 (permalink)  
Old 02-17-06, 06:43
NGambler NGambler is offline
Registered User
 
Join Date: Jul 2005
Posts: 25
Quote:
Originally Posted by sathyaram_s
Raise a PMR

Sathyaram
Sorry, but I don't understand what you have meant to say "Raise a PMR"
Reply With Quote
  #5 (permalink)  
Old 02-17-06, 06:45
NGambler NGambler is offline
Registered User
 
Join Date: Jul 2005
Posts: 25
Quote:
Originally Posted by murali_sb
maybe some packages could be missing which need to be rebound to the database. If you do db2 ? sql0551 from windows/unix prompt you'll get the error description, one of which is utility programs missing.
Thanks for reply!

I'll check your suggestion...
Reply With Quote
  #6 (permalink)  
Old 02-17-06, 10:35
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
Quote:
Originally Posted by NGambler
Sorry, but I don't understand what you have meant to say "Raise a PMR"
A PMR is a problem that you open with IBM support (they assign a PMR number), assuming that you have a support contract.
__________________
M. A. Feldman
IBM Certified DBA on DB2 for Linux, UNIX, and Windows
IBM Certified DBA on DB2 for z/OS and OS/390
Reply With Quote
  #7 (permalink)  
Old 02-17-06, 11:33
NGambler NGambler is offline
Registered User
 
Join Date: Jul 2005
Posts: 25
Thanks Marcus
I see
Reply With Quote
  #8 (permalink)  
Old 02-20-06, 02:46
Peter.Vanroose Peter.Vanroose is offline
Registered User
 
Join Date: Sep 2004
Location: Belgium
Posts: 1,079
Check for the presence of overloaded SCHEMA1.FUNCTION1 and/or UPPER functions; do you have identical problems when column1 is CHAR(1) instead of VARCHAR? Try e.g. SCHEMA1.FUNCTION1 ( upper('a') ) = 1
__________________
--_Peter Vanroose,
__IBM Certified Database Administrator, DB2 9 for z/OS
__IBM Certified Application Developer
__ABIS Training and Consulting
__http://www.abis.be/
Reply With Quote
  #9 (permalink)  
Old 03-01-06, 12:30
NGambler NGambler is offline
Registered User
 
Join Date: Jul 2005
Posts: 25
4 Peter
thank for reply

I have identical problems when column1 is CHAR(1) and
select *
from sysibm.sysdummy1
where SCHEMA1.FUNCTION1 ( upper('a') ) = 1
returns an exception

SQL0551N "USER1" does not have the privilege to perform operation "EXECUTE"
on object "SCHEMA1.FUNCTION1". SQLSTATE=42501
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On