Home » RDBMS Server » Security » system privileges and roles
system privileges and roles [message #27758] Tue, 28 October 2003 01:06 Go to next message
barwas
Messages: 19
Registered: October 2003
Junior Member
there are:-
-user1 has table employees and role named approle
-user2 has create view privilege

###situation one:

-user1:
sql> grnat select on employees to approle;
sql> grant approle to user2;

-user2:
sql> set role approle;
role set.

sql> create view emp_view as select * from user1.employees;
create view emp_view as select * from user1.employees
*
ERROR at line 1:
ORA-01031: insufficient privileges

###situation two:

-user1:
sql> grnat select on employees to user2;

-user2:
sql> create view emp_view as select * from user1.employees;
view created

### so what is difference if user2 got select on employees privilege directly or by approle?
thank you
Re: system privileges and roles [message #27775 is a reply to message #27758] Tue, 28 October 2003 14:08 Go to previous message
Thiru
Messages: 1089
Registered: May 2002
Senior Member
You will need to grant privileges directly when you want to create a view based on another user's table...roles become invisible in such cases

-Thiru
Previous Topic: what is difference if user got privilege direct or by role?
Next Topic: Encryption
Goto Forum:
  


Current Time: Sat Aug 15 15:38:33 CDT 2020