Home » SQL & PL/SQL » SQL & PL/SQL » Reg accessing one user's object from other users with read only option (oracle 10g)
Reg accessing one user's object from other users with read only option [message #342820] Mon, 25 August 2008 04:13 Go to next message
ram anand
Messages: 244
Registered: February 2008
Location: india
Senior Member
Hi,
Is there is possibility to access one user's objects from other user.here that user must have only one privilige that is SELECT other than select no other option should not been done (ie) The user must be read only .so if there is any possiblity pls let me know

Thanks,
Re: Reg accessing one user's object from other users with read only option [message #342821 is a reply to message #342820] Mon, 25 August 2008 04:18 Go to previous messageGo to next message
Michel Cadot
Messages: 64120
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
grant select on ... to ...

Regards
Michel
Re: Reg accessing one user's object from other users with read only option [message #342834 is a reply to message #342821] Mon, 25 August 2008 04:53 Go to previous messageGo to next message
ram anand
Messages: 244
Registered: February 2008
Location: india
Senior Member
Hi,
The select on privilige is for specfic object name from another user ,i need to access any table in the userA from userB and here the userB must have only the select and it should be READ ONLY

Thanks,
Re: Reg accessing one user's object from other users with read only option [message #342841 is a reply to message #342834] Mon, 25 August 2008 05:22 Go to previous messageGo to next message
Michel Cadot
Messages: 64120
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Repeat the statement for all tables.

Regards
Michel
Re: Reg accessing one user's object from other users with read only option [message #342845 is a reply to message #342834] Mon, 25 August 2008 05:38 Go to previous messageGo to next message
ram anand
Messages: 244
Registered: February 2008
Location: india
Senior Member
hi,

I have tried this

GRANT SELECT ANY TABLE TO USER_NAME 


now i can able access all the tables from userA to userB

Is there posibility to have the UserB as read only

Thanks,

[Updated on: Mon, 25 August 2008 05:39]

Report message to a moderator

Re: Reg accessing one user's object from other users with read only option [message #342846 is a reply to message #342845] Mon, 25 August 2008 05:40 Go to previous messageGo to next message
pablolee
Messages: 2834
Registered: May 2007
Location: Scotland
Senior Member
Did you bother to actually read what Michel posted?
Repeat the statement for all tables
grant select on table to user;
grant select on anothertable to user;
grant select on nexttable to user;


And unless you want your user to be able to access ALL tables in the database, then do NOT use the grant statement that you used above.

[Updated on: Mon, 25 August 2008 05:41]

Report message to a moderator

Re: Reg accessing one user's object from other users with read only option [message #342854 is a reply to message #342845] Mon, 25 August 2008 06:04 Go to previous messageGo to next message
flyboy
Messages: 1832
Registered: November 2006
Senior Member
ram anand wrote on Mon, 25 August 2008 12:38
Is there posibility to have the UserB as read only

What exactly do you mean with "read only"? Do you suspect that SELECT may modify the table content?

By the way, granting SELECT ANY TABLE gives the user access to all tables in all schemas.
There is no way to give user access to tables in one given schema except granting access to all tables residing in that schema (one by one), as suggested before.

[Updated on: Mon, 25 August 2008 06:04]

Report message to a moderator

Re: Reg accessing one user's object from other users with read only option [message #342858 is a reply to message #342854] Mon, 25 August 2008 06:20 Go to previous messageGo to next message
ram anand
Messages: 244
Registered: February 2008
Location: india
Senior Member
hi,
I agree with this , is there is possiblity to give the SELECT ANY TABLE to particular user (ie) to access all the tables from one user

Thanks,
Re: Reg accessing one user's object from other users with read only option [message #342861 is a reply to message #342858] Mon, 25 August 2008 06:34 Go to previous messageGo to next message
flyboy
Messages: 1832
Registered: November 2006
Senior Member
ram anand wrote on Mon, 25 August 2008 13:20
I agree with this , is there is possiblity to give the SELECT ANY TABLE to particular user (ie) to access all the tables from one user

If you agreed with whole my previous post, you would not have asked this question, as it already contains the answer: no.
Re: Reg accessing one user's object from other users with read only option [message #342863 is a reply to message #342858] Mon, 25 August 2008 06:47 Go to previous messageGo to next message
pablolee
Messages: 2834
Registered: May 2007
Location: Scotland
Senior Member
Selective blindness?

Quote:
is there is possiblity to give the SELECT ANY TABLE to particular user (ie) to access all the tables from one user

Quote:
There is no way to give user access to tables in one given schema except granting access to all tables residing in that schema (one by one), as suggested before.
Re: Reg accessing one user's object from other users with read only option [message #343128 is a reply to message #342841] Tue, 26 August 2008 06:32 Go to previous messageGo to next message
ram anand
Messages: 244
Registered: February 2008
Location: india
Senior Member
Hi Michel,
Is there possiblity to View the triggers script from one user (ie)userA to another user (ie)userB and is there any Grant opton for it

Thanks,
Re: Reg accessing one user's object from other users with read only option [message #343134 is a reply to message #343128] Tue, 26 August 2008 07:07 Go to previous messageGo to next message
S.Rajaram
Messages: 1027
Registered: October 2006
Location: United Kingdom
Senior Member
You should spend some time reading the wonderful oracle documentation. There is an answer to all of your questions.

Regards

Raj
Re: Reg accessing one user's object from other users with read only option [message #343141 is a reply to message #343134] Tue, 26 August 2008 07:40 Go to previous messageGo to next message
pablolee
Messages: 2834
Registered: May 2007
Location: Scotland
Senior Member
It would appear that ram is only interested in speaking to Michel, I'm happy to note that for all future questions he has.
Re: Reg accessing one user's object from other users with read only option [message #343193 is a reply to message #343128] Tue, 26 August 2008 10:25 Go to previous message
Michel Cadot
Messages: 64120
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
ram anand wrote on Tue, 26 August 2008 13:32
Hi Michel,
Is there possiblity to View the triggers script from one user (ie)userA to another user (ie)userB and is there any Grant opton for it

Thanks,

No unless he has CREATE ANY TRIGGER privilege which is a too powerful privilege to give.

Note that this is not AskMichel but OraFAQ; in addition, I am currently very busy and so you lose 4 hours before getting an answer when others can give it.

Regards
Michel

Previous Topic: Ternary Operator in PL/SQL
Next Topic: Format Excel using pl/sql
Goto Forum:
  


Current Time: Tue Dec 06 12:31:09 CST 2016

Total time taken to generate the page: 0.07367 seconds