Home » RDBMS Server » Security » Revoke privilege (10.2.0.2.0 ,windows)
Revoke privilege [message #430355] Tue, 10 November 2009 03:25 Go to next message
Hitman11
Messages: 94
Registered: October 2009
Location: norway
Member


Hi all,

How to revoke a privilege (select) from a role 'B'?

Thanks
Re: Revoke privilege [message #430367 is a reply to message #430355] Tue, 10 November 2009 03:36 Go to previous messageGo to next message
Littlefoot
Messages: 21822
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Using the REVOKE statement.
Re: Revoke privilege [message #430385 is a reply to message #430367] Tue, 10 November 2009 04:51 Go to previous messageGo to next message
Hitman11
Messages: 94
Registered: October 2009
Location: norway
Member

Thanks for your link.


Revoke select from B;


where
select -- privilege
B -- role

Is this revoke command is right ??


Regards,

Re: Revoke privilege [message #430387 is a reply to message #430385] Tue, 10 November 2009 04:55 Go to previous messageGo to next message
Michel Cadot
Messages: 68712
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
Quote:
Is this revoke command is right ??

No (unless you have a role named "select"), try again.

Regards
Michel
Re: Revoke privilege [message #430390 is a reply to message #430355] Tue, 10 November 2009 05:07 Go to previous messageGo to next message
cookiemonster
Messages: 13952
Registered: September 2008
Location: Rainy Manchester
Senior Member
To clarify - there's no such privilege as SELECT.
There's SELECT ANY TABLE
and SELECT ON <specific table>.

See here for the full list of prvileges:
http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_9013.htm#i2077938
Re: Revoke privilege [message #430391 is a reply to message #430387] Tue, 10 November 2009 05:08 Go to previous messageGo to next message
Hitman11
Messages: 94
Registered: October 2009
Location: norway
Member


Im not getting you what you are saying .Im confused.

what is the command then to revoke privilege from role?

Regards,
Re: Revoke privilege [message #430392 is a reply to message #430391] Tue, 10 November 2009 05:09 Go to previous messageGo to next message
Michel Cadot
Messages: 68712
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
Maybe you should read the documentation you have beenn pointed to and the examples.

Regards
Michel
Re: Revoke privilege [message #430393 is a reply to message #430391] Tue, 10 November 2009 05:14 Go to previous messageGo to next message
cookiemonster
Messages: 13952
Registered: September 2008
Location: Rainy Manchester
Senior Member
Hitman11 wrote on Tue, 10 November 2009 11:08


Im not getting you what you are saying .Im confused.

what is the command then to revoke privilege from role?

Regards,


The syntax was right. The name of the prvilege was wrong.
Re: Revoke privilege [message #430395 is a reply to message #430385] Tue, 10 November 2009 05:18 Go to previous messageGo to next message
ramoradba
Messages: 2457
Registered: January 2009
Location: AndhraPradesh,Hyderabad,I...
Senior Member
Hitman11 wrote on Tue, 10 November 2009 04:51

Thanks for your link.


Revoke select from B;


where
select -- privilege
B -- role

Is this revoke command is right ??


Regards,




Little foot has already givenn a link to read,you simply said Thanks,Link are not meant for that purpose...read the links..properly & Before asking here try that At your testing node..So that Oracle will give you additional information to correct your doubts.


SQL>  create role sriram_role identified by sriram;
Role created.

SQL> grant select to sriram_role;
grant select to sriram_role
      *
ERROR at line 1:
ORA-01919: role 'SELECT' does not exist

SQL> grant select on scott.emp to sriram_role;

Grant succeeded.
SQL> revoke select on scott.emp from sriram_role;

Revoke succeeded.


regards
sriram Smile
Re: Revoke privilege [message #430397 is a reply to message #430393] Tue, 10 November 2009 05:23 Go to previous messageGo to next message
Hitman11
Messages: 94
Registered: October 2009
Location: norway
Member

i want to revoke only the particular privilege 'SELECT' or 'EXECUTE' from the role?

is that not possible ?

Regards,
Re: Revoke privilege [message #430407 is a reply to message #430397] Tue, 10 November 2009 05:39 Go to previous messageGo to next message
ramoradba
Messages: 2457
Registered: January 2009
Location: AndhraPradesh,Hyderabad,I...
Senior Member
Hitman11 wrote on Tue, 10 November 2009 05:23

i want to revoke only the particular privilege 'SELECT' or 'EXECUTE' from the role?

is that not possible ?

Regards,


http://ss64.com/ora/revoke.html

http://www.psoug.org/reference/object_privs.html

Read the above ! Atleast

And First Read the Oracle documents provided properly...

Sriram.

[Updated on: Tue, 10 November 2009 05:41]

Report message to a moderator

Re: Revoke privilege [message #430410 is a reply to message #430407] Tue, 10 November 2009 05:53 Go to previous messageGo to next message
Hitman11
Messages: 94
Registered: October 2009
Location: norway
Member


Thanks
Re: Revoke privilege [message #430420 is a reply to message #430410] Tue, 10 November 2009 06:12 Go to previous messageGo to next message
Michel Cadot
Messages: 68712
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
And BEFORE your next question, you should REALLY read the whole SQL Reference book, most of your questions are answered there.

Regards
Michel
icon7.gif  Re: Revoke privilege [message #430501 is a reply to message #430420] Tue, 10 November 2009 13:49 Go to previous messageGo to next message
konark
Messages: 24
Registered: February 2008
Location: Takhsila
Junior Member
Hitman , Sriram already gave a nice example to revoke the select priv from a user/role.

You need to repeat the below syntax on all the tables you want.

revoke select on scott.emp from B;
revoke select on scott.tmp from B;
revoke select on scott.sal from B;
revoke select on scott.grade from B; and so on.



Re: Revoke privilege [message #430502 is a reply to message #430501] Tue, 10 November 2009 13:51 Go to previous messageGo to next message
Michel Cadot
Messages: 68712
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
And if the table is named dept?

Regards
Michel
Re: Revoke privilege [message #430529 is a reply to message #430501] Tue, 10 November 2009 21:46 Go to previous messageGo to next message
ramoradba
Messages: 2457
Registered: January 2009
Location: AndhraPradesh,Hyderabad,I...
Senior Member
konark wrote on Tue, 10 November 2009 13:49
Hitman , Sriram already gave a nice example to revoke the select priv from a user/role.

You need to repeat the below syntax on all the tables you want.

revoke select on scott.emp from B;
revoke select on scott.tmp from B;
revoke select on scott.sal from B;
revoke select on scott.grade from B; and so on.






Quote:

Re: Revoke privilege Tue, 10 November 2009 05:23
Hitman11


i want to revoke only the particular privilege 'SELECT' or 'EXECUTE' from the role?

is that not possible ?


Regards,


He dont want the examples,solutions,Links.....so on etc.

What we need to post is its "not Possible"


sriram.

[Updated on: Tue, 10 November 2009 21:47]

Report message to a moderator

Re: Revoke privilege [message #430557 is a reply to message #430529] Wed, 11 November 2009 01:00 Go to previous messageGo to next message
Michel Cadot
Messages: 68712
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
It is the way you interpret the posts and all the previous posts (but konark's one) is useful to make him understand.

Regards
Michel

[Updated on: Fri, 13 November 2009 01:05]

Report message to a moderator

Re: Revoke privilege [message #430891 is a reply to message #430557] Thu, 12 November 2009 22:32 Go to previous message
ramoradba
Messages: 2457
Registered: January 2009
Location: AndhraPradesh,Hyderabad,I...
Senior Member
As per the guide lines..

We should give OP some links or some hints...to follow.
littlefoot,cookiemonster and me already given some links to read....
And i have given a test case also ...Again he is asking for Only "select"...IS that not possible?" What should i do that time ? Even after this topic also he is not taking care of reading Oracle manuals. Smile

sriram Smile

[Updated on: Thu, 12 November 2009 22:32]

Report message to a moderator

Previous Topic: Performance Issue with Virtual Private Database
Next Topic: cannot logging as sysdba
Goto Forum:
  


Current Time: Wed Nov 13 00:58:50 CST 2024