Home » RDBMS Server » Security » Grant for all object of a user
Grant for all object of a user [message #115075] Thu, 07 April 2005 04:57 Go to next message
ntnboi
Messages: 17
Registered: April 2005
Location: Italy - Rome
Junior Member

Hi,
I have follow question.

USER A
USER B

I want that user A can select all tables of user B

for make this:

1. - create a rule ROLE_SEL_USER_A;

2. - add role ROLE_SEL_USER_A to user A;

3. - execute follow script

set pages 0
set linesize 120
spool creatre_grant_select_user_A.sql
SELECT 'GRANT SELECT ON B.'||OBJECT_NAME|| ' TO ROLE_SEL_USER_A;'
FROM DBA_OBJECTS where owner='B' and object_type='TABLE';
spool off

4. - launch creatre_grant_select_user_A.sql by user B.

User A now can select all tables of user B, but if user B create a new table, user A do not select this new table.
I make steps 3,4 every time user B create a new table? Or is possible create a role outoupdating?

Thank you.
Best regards.

Antonio.



[Updated on: Thu, 07 April 2005 05:05]

Report message to a moderator

Re: Grant for all object of a user [message #115175 is a reply to message #115075] Thu, 07 April 2005 19:04 Go to previous messageGo to next message
Barbara Boehmer
Messages: 8922
Registered: November 2002
Location: California, USA
Senior Member
You could create a trigger such that every time user b creates a table it grants select on the table to the role.
Re: Grant for all object of a user [message #115430 is a reply to message #115175] Mon, 11 April 2005 10:49 Go to previous message
ntnboi
Messages: 17
Registered: April 2005
Location: Italy - Rome
Junior Member

Thank you for suggestion!

Regards.
Antonio.
Previous Topic: unable to write to audit file
Next Topic: Audit Trail?
Goto Forum:
  


Current Time: Sat Aug 15 09:59:21 CDT 2020