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 > stored procedure compile error

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-21-04, 15:03
jfkuser jfkuser is offline
Registered User
 
Join Date: Mar 2003
Posts: 59
stored procedure compile error

udb ver 8.1 aix 5.2

we are trying to compile a SP using
db2 -td@ -f new_sp.sql

but its giving error
DB21034E The command was processed as an SQL statement because it was not a valid Command Line Processor command. During SQL processing it returned:
SQL0551N "GEN01" does not have the privilege to perform operation "SELECT" on
object "LEN.CM_TRAN". LINE NUMBER=259. SQLSTATE=42501

but the same user can select any rows from LEN.CM_TRAN table. So why it gives such error.

What could be wrong?

Thanks,
j
Reply With Quote
  #2 (permalink)  
Old 05-24-04, 10:06
jfkuser jfkuser is offline
Registered User
 
Join Date: Mar 2003
Posts: 59
When I granted 'select' right on this table to the user it could compile the SP.
But this user already had select right on this table through 'group' membership and could run select queries before.

Why do we have to grant 'select' to the user just to compile the SP?

we have udb ver 8.1 on aix 5.2
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