Home » Developer & Programmer » Forms » DBA_ROLE_PRIVS (ds10g, WinXP)
DBA_ROLE_PRIVS [message #443202] Sat, 13 February 2010 11:03 Go to next message
rkgoyal98
Messages: 39
Registered: October 2009
Member

While upgrading 6i Application, in one of the form designed for granting/revoking roles the following cursor is raising Exception ORA-00942 ( Table or View Does not Exist)
Running the same Query in SQL navigator logged on as same user the result is correctly displayed

SELECT GRANTED_ROLE,'Y' ISGRANTED FROM DBA_ROLE_PRIVS WHERE DEFAULT_ROLE='YES' AND GRANTEE =:UNAME
UNION ALL
SELECT GRANTED_ROLE,'Y' ISGRANTED FROM DBA_ROLE_PRIVS WHERE DEFAULT_ROLE='NO' AND GRANTEE = :UNAME
UNION  ALL
SELECT CODE GRANTED_ROLE,'N' ISGRANTED FROM PRMAGEC WHERE CODETYPE='RO' AND CODELENGTH IS NULL 
	AND CODE NOT IN 
	(SELECT DISTINCT GRANTED_ROLE FROM DBA_ROLE_PRIVS WHERE DEFAULT_ROLE='YES' AND GRANTEE = :UNAME 
	UNION ALL
	SELECT DISTINCT GRANTED_ROLE FROM DBA_ROLE_PRIVS WHERE DEFAULT_ROLE='NO' AND GRANTEE = :UNAME )
ORDER BY 1;


What can be reason for the error and what are possible solutions
Regards
Re: DBA_ROLE_PRIVS [message #443203 is a reply to message #443202] Sat, 13 February 2010 11:11 Go to previous messageGo to next message
Michel Cadot
Messages: 63804
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
The role that allows you to query the view is not enable in the context you execute it.

Regards
Michel
Re: DBA_ROLE_PRIVS [message #443204 is a reply to message #443202] Sat, 13 February 2010 11:15 Go to previous messageGo to next message
rkgoyal98
Messages: 39
Registered: October 2009
Member

Hello,
Thanks for quick reply. The user i am executing the code is having DBA priviledges, Kindly tell me if anything else i have to add in priviledges
Regards
Re: DBA_ROLE_PRIVS [message #443209 is a reply to message #443204] Sat, 13 February 2010 12:07 Go to previous messageGo to next message
Michel Cadot
Messages: 63804
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
DBA is a role, if the role is not activated your user has none of its privilege.
This is what happens in your case.
Roles are (most often) not enabled inside a procedure.

Regards
Michel
Re: DBA_ROLE_PRIVS [message #443238 is a reply to message #443202] Sat, 13 February 2010 19:13 Go to previous messageGo to next message
rkgoyal98
Messages: 39
Registered: October 2009
Member

Thanks for the reply, I could resolve the problem by enabling the roles
Regards
Re: DBA_ROLE_PRIVS [message #443250 is a reply to message #443238] Sun, 14 February 2010 01:13 Go to previous message
Michel Cadot
Messages: 63804
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Thanks for the feedback.

Regards
Michel
Previous Topic: How to change the forms trigger sequence
Next Topic: Run reports from menu
Goto Forum:
  


Current Time: Mon Sep 26 11:10:20 CDT 2016

Total time taken to generate the page: 0.15520 seconds