kiraXdesu
kiraXdesu

Reputation: 1

oracle ora-01045 -privileges granted by role not working

im using oracle db v21c , after trying to create a role student with privs 'create session , create table , create view ' a granted that role to a user 'user3' but when trying to connect with that user i got ora-01045. i checked that privs granted to that role and everything seems normal , i have tried using granting the role the privileges with admin option and nothing happens . I used select * from dba_sys_privs where grantee='student' and all seems good . The role is created with system and so the user because at first i was trying to create the role with scott , but get an error insufficient privileges, but scott have the privilege to create role.

Upvotes: 0

Views: 585

Answers (1)

pmdba
pmdba

Reputation: 7043

Roles are not active by default. You must either alter the user to set a default role (and then login again), or alter the user's current session to set a current role:

alter user user3 default role all;

or

set role student;

Upvotes: 1

Related Questions