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 > Problems executing a stored procedure

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-08-09, 13:29
itsonlyme44 itsonlyme44 is offline
Registered User
 
Join Date: Dec 2007
Posts: 261
Problems executing a stored procedure

DB2 Version 9.5 on windows


I have a user who reported this error to me:

Warning: Cannot create stored procedure(s), resulting in non-optimal performance. To improve performance, you must authorize
user <OPETLL70> to CREATE, DROP, and EXECUTE stored procedures. DB2 data source <%1> warning message for operation <%3>: <%4>,

He is trying to execute a stored procedure when he receives the error.

The user OPETLL70 has Full authority in the database and full priviledges to the stored procedure itself.

I googled the error and found this: Help - IBM WebSphere Help System

and then I executed this:
GRANT CREATE_EXTERNAL_ROUTINE ON DATABASE TO USER OPETLL70

he is still getting the error. can anyone help?
Reply With Quote
  #2 (permalink)  
Old 05-08-09, 13:36
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
What is the entire statement that he is trying to execute? And what is the entire error he is getting?

Andy
Reply With Quote
  #3 (permalink)  
Old 05-08-09, 13:45
itsonlyme44 itsonlyme44 is offline
Registered User
 
Join Date: Dec 2007
Posts: 261
Here is the SQL that he is using to call the truncate procedure from his ETL (BODI) job
Code:
sql('DS_Stage_Data_Mart','CALL '||$sys_DM_Target_Schema ||'.truncate_table(\''||$sys_DM_Target_Schema ||'\',\''|| substr( $GV_JOBNAME,0,index( $GV_JOBNAME,'_STG',0)-1) ||'\')');
and here is the error:

Code:
Warning: Cannot create stored procedure(s), resulting in non-optimal performance. To improve performance, you must authorize
user <OPETLL70> to CREATE, DROP, and EXECUTE stored procedures. DB2 data source <%1> warning message for operation <%3>: <%4>,
Reply With Quote
  #4 (permalink)  
Old 05-08-09, 13:53
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
I am sorry I cannot help you. I do not know ETL.

Andy
Reply With Quote
  #5 (permalink)  
Old 05-08-09, 14:01
itsonlyme44 itsonlyme44 is offline
Registered User
 
Join Date: Dec 2007
Posts: 261
I think it's a db2 permissions problem..

the user has these permissions to the stored procedure:

GRANT EXECUTE ON PROCEDURE KCSTGDUT.TRUNCATE_TABLE(VARCHAR(),VARCHAR()) TO USER OPETLL70;

am I missing something?
Reply With Quote
  #6 (permalink)  
Old 05-08-09, 14:21
stolze stolze is offline
Registered User
 
Join Date: Jan 2007
Location: Jena, Germany
Posts: 2,662
The problem is that you show us an error message that does not originate from DB2 but rather from some application that you are using. You will have to figure out what that application is doing and whether there is indeed a problem with DB2 or the user's privileges - or not.
__________________
Knut Stolze
IBM DB2 Analytics Accelerator
IBM Germany Research & Development
Reply With Quote
  #7 (permalink)  
Old 05-08-09, 14:23
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
It looks like the schema for the procedure is dynamic. Is there more than one SP with that name is a different schema that the user does not have right to execute?

Andy
Reply With Quote
  #8 (permalink)  
Old 05-08-09, 14:25
itsonlyme44 itsonlyme44 is offline
Registered User
 
Join Date: Dec 2007
Posts: 261
my deepest apologies.

I thought the error was originated from DB2. I'll have to look through my diag log and see if it is generating an error..
Reply With Quote
  #9 (permalink)  
Old 05-09-09, 06:54
stolze stolze is offline
Registered User
 
Join Date: Jan 2007
Location: Jena, Germany
Posts: 2,662
All DB2 (or rather IBM) error codes have a 3-letter product prefix. For DB2 follows 4 or 5 digit number and a single letter indicating the severity. None of the DB2 error messages starts with "Warning: ".
__________________
Knut Stolze
IBM DB2 Analytics Accelerator
IBM Germany Research & Development
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