Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: What am I missing???
Here's a possibility. Roles are only checked at login. If you grant a role to
a user that is curently logged in, they do NOT get that role until the login again.
I've run into this a number of times (just about an hour ago in fact).
However, I'll reiterate the comment by another person. Did you grant the role?
check dba_roles to be certain (select * from dba_roles where granted_role = 'TESTROLE';) Audun Jensen wrote:
> Hi all,
> I read somewhere (I think) that grants on views has to be given directly to
> the user and not via roles (is this true?).
> In order to test this I did the following (logged on as dba):
>
> CREATE USER testuser IDENTIFIED BY testuser;
> ALTER USER testuser DEFAULT TABLESPACE users QUOTA UNLIMITED ON users;
> GRANT CONNECT TO testuser;
>
> CREATE TABLE testtable (a VARCHAR2(4), b NUMBER(5));
> INSERT INTO testtable VALUES('srrt', 45);
> CREATE OR REPLACE VIEW testview AS SELECT * FROM testtable;
>
> CREATE ROLE testrole;
> GRANT SELECT ON testview TO testrole;
>
> then connect as testuser/testuser and run
> SELECT * FROM audunj.testview;
>
> gives "ORA-00942: table or view does not exist"
>
> I'm pretty sure this should work or???
>
> AJ
Received on Tue Feb 27 2001 - 22:04:09 CST