Home » RDBMS Server » Security » GRANT SELECT ON TABLE(s) FOR ALL USERS (Windows XP)
GRANT SELECT ON TABLE(s) FOR ALL USERS [message #346700] Tue, 09 September 2008 07:58 Go to next message
keizersoz
Messages: 16
Registered: April 2006
Junior Member
Hello all,

I would like to grant SELECT privilege only on some specific tables to all users.

The syntax I found on the internet is
GRANT SELECT ON <TABLE> [B]TO USER  [/B]
Problem is that I have to specify this statement for each user separately. Is it possible to execute this for ALL_USERS at once? If yes what should the syntax be?

Many thanks in advance,

Keizersoz

Re: GRANT SELECT ON TABLE(s) FOR ALL USERS [message #346701 is a reply to message #346700] Tue, 09 September 2008 08:02 Go to previous messageGo to next message
Michel Cadot
Messages: 64139
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
grant select on table to PUBLIC;

Regards
Michel
Re: GRANT SELECT ON TABLE(s) FOR ALL USERS [message #346704 is a reply to message #346701] Tue, 09 September 2008 08:14 Go to previous messageGo to next message
keizersoz
Messages: 16
Registered: April 2006
Junior Member
Hi thanks a lot,

Is it possible to grant access to many tables at once to all users?

grant select on <table1>,<table2> to PUBLIC;
does not work.

regards,
keizesoz
Re: GRANT SELECT ON TABLE(s) FOR ALL USERS [message #346709 is a reply to message #346704] Tue, 09 September 2008 08:28 Go to previous messageGo to next message
Michel Cadot
Messages: 64139
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
No, you have to execute one statement per table.

Please read SQL Reference: GRANT

Regards
Michel
Re: GRANT SELECT ON TABLE(s) FOR ALL USERS [message #346710 is a reply to message #346709] Tue, 09 September 2008 08:32 Go to previous messageGo to next message
keizersoz
Messages: 16
Registered: April 2006
Junior Member
ok thanks.

Appearently the beneath syntax doesn't work for a view?


regards,
kezersoz
Re: GRANT SELECT ON TABLE(s) FOR ALL USERS [message #346716 is a reply to message #346710] Tue, 09 September 2008 08:47 Go to previous messageGo to next message
Michel Cadot
Messages: 64139
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Quote:
Appearently the beneath syntax doesn't work for a view?

Copy and paste what you tried.
There is (almost) no difference between table and view.

Regards
Michel
Re: GRANT SELECT ON TABLE(s) FOR ALL USERS [message #346717 is a reply to message #346709] Tue, 09 September 2008 08:48 Go to previous messageGo to next message
keizersoz
Messages: 16
Registered: April 2006
Junior Member
please discard my previous question.problem occurs when I execute from SYSTEM

I have 2 more questions:

(1) Why can't I grant select from SYSTEM user? I receive an error when doing so.

(2)Why don't I see in the 'Oracle Enterprise Manager' for all #users the affected tables in the 'Object privileges'

Many thanks for your appreciated help.

regards,
keizerso
Re: GRANT SELECT ON TABLE(s) FOR ALL USERS [message #346725 is a reply to message #346716] Tue, 09 September 2008 09:02 Go to previous messageGo to next message
keizersoz
Messages: 16
Registered: April 2006
Junior Member
my actual problem is as follows: Imagine I have 5 users

A,B,C,SYSTEM, SUPER_USER

Now I would like SUPER_USER to have access to specific tables from all users except from SYSTEM, in this case there are only 3 users A,B,C.

If I understand well I have for each of the specific users, namely A,B,C to execute GRANT SELECT ON <table> to SUPER_USER.
Is that correct?

thanks and regards ,
keizersoz
Re: GRANT SELECT ON TABLE(s) FOR ALL USERS [message #346735 is a reply to message #346717] Tue, 09 September 2008 09:50 Go to previous message
Michel Cadot
Messages: 64139
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Quote:
(1) Why can't I grant select from SYSTEM user? I receive an error when doing so.

Quote:
Copy and paste what you tried.


Quote:
(2)Why don't I see in the 'Oracle Enterprise Manager' for all #users the affected tables in the 'Object privileges'

quoting Ana (anacedent):
Those who live by the GUI, die by the GUI.


Quote:
If I understand well I have for each of the specific users, namely A,B,C to execute GRANT SELECT ON <table> to SUPER_USER.
Is that correct?

Yes.
Once again read the link I provided, there is nothing in addition to what is in this link.

Regards
Michel
Previous Topic: View package body role
Next Topic: Restricting the user from logging in from SQL*PLUS
Goto Forum:
  


Current Time: Thu Dec 08 20:31:02 CST 2016

Total time taken to generate the page: 0.11722 seconds