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 > SQL0204N " " is an undefined name

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 06-22-09, 13:54
pinecone pinecone is offline
Registered User
 
Join Date: Apr 2004
Posts: 58
Lightbulb SQL0204N " " is an undefined name

User was getting SQL0551N "JenB" does not have the privilege to perform operation "EXECUTE" on object "EMPLOY.P10020". SQLSTATE=42501

I tried the following:
Grant execute on package EMPLOY.P10020 to user JenB;

But got this:
SQL0204N "EMPLOY.P10020" is an undefined name.

I saw the exact package (P10020) with the right schema (EMPLOY) under syscat.packages in the database using

"select pkgschema, pkgname from syscat.packages where pkgname = 'P10020' "

Why am I still getting SQL0204N "EMPLOY.P10020" is an undefined name ?

Please advise. Thanks in advance!
Reply With Quote
  #2 (permalink)  
Old 06-22-09, 15:03
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
Is EMPLOY.P10020 a procedure? If so you must grant execute on the procedure, not on the package (although in version 7 you would have granted execute on the package). Check out the GRANT statement in the SQL Reference Vol 2 for more info.
__________________
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
  #3 (permalink)  
Old 06-22-09, 16:37
pinecone pinecone is offline
Registered User
 
Join Date: Apr 2004
Posts: 58
Object is listed under syscat.packages so it should be a package, right?
The same name cannot be found under syscat.procedure.

Any other suggestions?

Thanks.
Reply With Quote
  #4 (permalink)  
Old 06-22-09, 17:08
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
Procedures also have packages, but you must grant execute to the procedure. Is this a program with embedded SQL (C++, etc), a function, procedure, etc? Need more info about what EMPLOY.P10020 is. Also include full info about OS, DB2 version, etc.
__________________
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
  #5 (permalink)  
Old 06-23-09, 13:04
pinecone pinecone is offline
Registered User
 
Join Date: Apr 2004
Posts: 58
Database is DB2 v9.1 on AIX 5.3

After we did a bind on all stored procedures and application, the problem is resolved.

Thank you very much for your help!
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