Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

ORA-01031: insufficient privileges when open a Cursor

978 views
Skip to first unread message

valigula

unread,
Sep 30, 2009, 11:58:17 AM9/30/09
to
Hi all,

I am facgin an issue when trying to run a procedure inside a package.
The procedure goes to the exception when get to the open cursor
command. I am able to debug the procedure and seems that all the
rights are correctly set.
BTW this is a Oracle 9i.

SQL> show parameter cursors;

NAME TYPE VALUE
------------------------------------ -----------
------------------------------
open_cursors integer 250
session_cached_cursors integer 0

Thanks in advance

sybr...@hccnet.nl

unread,
Sep 30, 2009, 1:02:08 PM9/30/09
to


There is no privilege required to open a cursor.
This means the ora-1031 error is a result from parsing the associated
statement.
As you didn't post this statement, no help on this is possible.
The most common reason for ora-1031 is -apart from not reading the
documentation, and not using Google prior to posting this for the
10000000000000+1 time, you have privileges through a role and a
running with definers rights so roles are ignored. You either need to
grant the privilege directly, or use authid current_user on your
package.

--
--
Sybrand Bakker
Senior Oracle DBA

valigula

unread,
Sep 30, 2009, 4:15:54 PM9/30/09
to

Thanks for your time, but actually I can execute the procedure, and
even debug it. Also i can execute the procedure as a script with no
problem. Or in another database and it works.

Never seem that behaviour before so i wanted it to share it. So we all
can learn.

Thanks

John Hurley

unread,
Sep 30, 2009, 5:02:35 PM9/30/09
to
On Sep 30, 4:15 pm, valigula <valig...@gmail.com> wrote:

snip

> > >I am facgin an issue when trying  to run a procedure inside a package.
> > >The procedure goes to the exception when get to the open cursor
> > >command. I am able to debug the procedure and seems that all the
> > >rights are correctly set.
> > >BTW this is a Oracle 9i.

> Thanks for your time, but actually I can execute the procedure, and


> even debug it. Also i can execute the procedure as a script with no
> problem. Or in another database and it works.
>
> Never seem that behaviour before so i wanted it to share it. So we all
> can learn.

So you can run it standalone as a procedure but it is failing inside a
package?

What are the differences in ownership between the 2 versions?

valigula

unread,
Oct 1, 2009, 5:48:53 AM10/1/09
to

Thanks, it was an issue with the rights, i am migrating some schemas
from on one our databases into development and did not set the user
rights correctly.

Thanks

0 new messages