Accessing DBA% tables in a SP [message #276204] |
Wed, 24 October 2007 06:34 |
khresmoi
Messages: 24 Registered: October 2007
|
Junior Member |
|
|
Do I need spacial permission to access DBA tables? i'm not able to compile an SP which selects a record from DBA_TAB_PARTITIONS. Error encountered is - PL/SQL: ORA-00942: table or view does not exist.
what I've is a DEV_ROLE. and no privileges.
help!
TIA..
|
|
|
|
|
|
Re: Accessing DBA% tables in a SP [message #276209 is a reply to message #276204] |
Wed, 24 October 2007 06:42 |
khresmoi
Messages: 24 Registered: October 2007
|
Junior Member |
|
|
Lemme add some more info..
i'm able to create and execute SPs in my schema. but this one throws an error at the line of code which uses DBA_TAB_PARTITIONS table in a join. this is the problem.
Which grant/privilege will I need to overcome this?
|
|
|
|
|
|
|
Re: Accessing DBA% tables in a SP [message #276276 is a reply to message #276204] |
Wed, 24 October 2007 10:40 |
|
BlackSwan
Messages: 26766 Registered: January 2009 Location: SoCal
|
Senior Member |
|
|
>BUt i'm able to do a select on this table from the command prompt..
>SELECT COUNT(*) FROM DBA_TAB_PARTITIONS
Before doing the SELECT do the follwoing:
SQL> SET ROLE NONE
-- what does SELECT return now?
SQL>SELECT COUNT(*) FROM DBA_TAB_PARTITIONS;
[Updated on: Wed, 24 October 2007 10:41] by Moderator Report message to a moderator
|
|
|
|
Re: Accessing DBA% tables in a SP [message #276380 is a reply to message #276324] |
Thu, 25 October 2007 01:17 |
|
Maaher
Messages: 7065 Registered: December 2001
|
Senior Member |
|
|
Good point, Brian. I didn't bring it up (yet) because I think that the OP first has to understand where the origin of his problem lays before we go into "advanced mode".
khresmoi,
if granting privileges directly is a problem, you should look into the advice of ebrian.
MHE
[Updated on: Thu, 25 October 2007 01:18] Report message to a moderator
|
|
|
|
|