Getting permission error while in role

Database

Getting permission error while in role

I'm getting a permission denied error to a database I have access to via a role. I've checked the following things:

  • My membership in the role is still intact and has not been altered at any time
  • The permissions that have been given to the role do include this database
  • The query log history shows that I accessed this database several times with no error in the past couple of weeks
  • The query log history shows no revoke commands have been issued against this role
  • Verified my userid has default role=all

If I grant the perimission directly to my userid it works. This has happened sporadically in the past with other users. Not all users and not all roles. And some users appear to be just fine in a role and others will have this problem even though they are in the same role.

Is this a known problem?

5 REPLIES
Highlighted
Junior Supporter

Re: Getting permission error while in role

when you login to sql assist, run "sel role". this will give you the role that you session has currently then you can try debugging from there.

--samir

Teradata Employee

Re: Getting permission error while in role

Have a look your current role on the session:

select currentRole  from dbc.sessionInfo
where username=user

Re: Getting permission error while in role

When I run 'sel role' I get null. When I run the other one I get a role but not the one I'm expecting. A coworker was recently dropping roles, not the one I need, but this could still explain why things got weird. 

So even if I have default role=all on my user, it is still possible to have no default role set in certain situations?

Junior Supporter

Re: Getting permission error while in role

No, i dont think so. When i run Sel role or select currentRole  from dbc.sessionInfo where username=user, i get "All". This is what i am supposed to have. You can also run a set role to set the corresponding role. If you not able to see the role when you select it, that's why you have this issue.

--Samir

Re: Getting permission error while in role

I reset my default role to all and it is now showing ALL when I run sel role. I think this has solved the issue, thank you!