Home » RDBMS Server » Server Administration » grant ,option with grant (oracle 10g)
grant ,option with grant [message #498897] Fri, 11 March 2011 15:36 Go to next message
ykozhevnikov
Messages: 59
Registered: November 2008
Location: USA
Member
Hi
I am new in Oracle administration

This is what happend
I was acting as SYSTEM user and
I was not able to give grant on select on my_view to particular user in Oracle and error mention particular table in view

But after I put
GRANT ALTER, DELETE, INSERT, SELECT, UPDATE ON <my_particulat_table> TO <another_user> with grant option

SYSTEM user was able to grant .

And my question is I did change anything for SYSTEM, Why it was able to create grant

Thanks

[Updated on: Fri, 11 March 2011 15:42]

Report message to a moderator

Re: grant ,option with grant [message #498919 is a reply to message #498897] Fri, 11 March 2011 21:38 Go to previous messageGo to next message
ramoradba
Messages: 2457
Registered: January 2009
Location: AndhraPradesh,Hyderabad,I...
Senior Member
SQL>  GRANT ALTER, DELETE, INSERT, SELECT, UPDATE ON scott.emp to hr with grant option;

Grant succeeded.

SQL> GRANT ALTER, DELETE, INSERT, SELECT, UPDATE ON scott.emp to hr ;

Grant succeeded.




SQL> create or replace view scott.emp_vue as select * from scott.emp;

View created.

SQL> GRANT ALTER, DELETE, INSERT, SELECT, UPDATE ON scott.emp_vue to hr;
GRANT ALTER, DELETE, INSERT, SELECT, UPDATE ON scott.emp_vue to hr
                                                     *
ERROR at line 1:
ORA-02204: ALTER, INDEX and EXECUTE not allowed for views


SQL> GRANT ALTER, DELETE, INSERT, SELECT, UPDATE ON scott.emp to hr with grant option;

Grant succeeded.


SQL> ! oerr ora 2204
02204, 00000, "ALTER, INDEX and EXECUTE not allowed for views"
// *Cause:  An attempt was made to grant or revoke an invalid privilege on a view.
// *Action:  Do not attempt to grant or revoke any of ALTER, INDEX, or
//          EXECUTE privileges on views.

SQL> 

SQL> show user
USER is "SYSTEM"
SQL> select banner from v$version;

BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
PL/SQL Release 11.1.0.6.0 - Production
CORE    11.1.0.6.0      Production
TNS for Linux: Version 11.1.0.6.0 - Production
NLSRTL Version 11.1.0.6.0 - Production




Sriram
Re: grant ,option with grant [message #498934 is a reply to message #498897] Sat, 12 March 2011 00:48 Go to previous messageGo to next message
Michel Cadot
Messages: 68718
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
A user, owner of a view, or a DBA acting for this user, can grant select on the view (and consequently on the tables the view is built on, through this view) only if this view owner is allowed to transmit the SELECT privilege on these tables that is is granted this privilege WITH GRANT OPTION.

Regards
Michel
Re: grant ,option with grant [message #499094 is a reply to message #498934] Sun, 13 March 2011 10:18 Go to previous message
ykozhevnikov
Messages: 59
Registered: November 2008
Location: USA
Member
Thank you Michel
Previous Topic: renaming a dB
Next Topic: Database file system architecture for DataWarehouseing application
Goto Forum:
  


Current Time: Sun Dec 01 12:29:19 CST 2024