Home » SQL & PL/SQL » SQL & PL/SQL » ORA-01403: no data found in procedure (ORACLE 10.2 g)
ORA-01403: no data found in procedure [message #454264] Tue, 04 May 2010 14:32 Go to next message
teiosanuadrian
Messages: 2
Registered: May 2010
Junior Member
Hi all,
I have a very strange situation :
In a procedure I try to make the following select :

select param_value
into vc_param
from cont_rp_serv where rp_serv_code = 36
and contract_id = 134
and rownum < 2;

But I receive ORA-01403: no data found.

If i run the select normally in a separate window in the same time I got the expected result : Enterprise.

I have checked that table is not locked by another user. Also i do not use triggers at all to get here.

Do u have any advices?
Re: ORA-01403: no data found in procedure [message #454266 is a reply to message #454264] Tue, 04 May 2010 14:37 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
>Do u have any advices?
privileges acquired via ROLE do NOT apply within named PL/SQL procedure

you can test this via sqlplus by doing below

SQL> SET ROLE NONE
SQL> select param_value
from cont_rp_serv where rp_serv_code = 36
and contract_id = 134
and rownum < 2;
Re: ORA-01403: no data found in procedure [message #454270 is a reply to message #454266] Tue, 04 May 2010 15:05 Go to previous messageGo to next message
teiosanuadrian
Messages: 2
Registered: May 2010
Junior Member
The user that I'm logged in pl/SQL is : SYSADM.
My role AWBS_ROLE includes in "Granted to Users' list my user : SYSADM.
Also for my role , AWBS_ROLE , both : the procedure and the table are included to "Object Privileges" list.

This is what I see in PL/SQL. SO I believe is not the case here.

Other possibilities ?
Re: ORA-01403: no data found in procedure [message #454271 is a reply to message #454270] Tue, 04 May 2010 15:14 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
It would be helpful if you followed Posting Guidelines - http://www.orafaq.com/forum/t/88153/0/

Re: ORA-01403: no data found in procedure [message #454272 is a reply to message #454270] Tue, 04 May 2010 15:26 Go to previous message
joy_division
Messages: 4963
Registered: February 2005
Location: East Coast USA
Senior Member
I am not quite sure what you just said, but I think you did not understand that privileges granted to a role do not apply when it comes to procedures. They must be granted directly.
Previous Topic: SQL causing problem
Next Topic: How to send email with attachment
Goto Forum:
  


Current Time: Mon Apr 28 02:31:07 CDT 2025