Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to Translate/Trap PLS-00201 Error Generated by No Privileges

Status
Not open for further replies.

aldovalerio

Programmer
Mar 29, 2001
36
CH
Oracle 8.1.6 Enterprise Edition on Windows 2000.

I'm getting a PLS-00201 error due to no privileges granted on a procedure, but I would like to translate for a user interface, or generate an Oracle error that says that there are no privileges on the object.

User 1 has been granted Role A. Role A has not been granted EXECUTE on procedure X, which is in schema 2. User 1 has no system or object privileges. However, user 1 can perform an operation in a Visual Basic application that calls procedure X. When user 1 performs this operation, she gets the message:
"PLS-00201: identifier '2.X' must be declared"
I was expecting the "ORA-1031: insufficient privileges" message. Is there a way to return a message that indicates that privileges were not granted, rather than the PLS-00201 message?

The only options I can think of are to either build in a "privileges-detection" layer of procedures that call the "real" procedures, or modify my VB app. to interpret the PLS-00201 error.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top