unable to log in

i created a user and grated user with password protected role which already exist.

can we grant a password protected role with out password.---->question 1

the user is not able to log in.
but when this password protected role is revoked they are able to log in.

I dont know what to do. please help me.

Thank you
Who is Participating?
sdstuberConnect With a Mentor Commented:
roles are assigned (granted) to users, but aren't necessarily active.

select * from dba_role_privs

if DEFAULT_ROLE = YES, then that role is enabled when the user logs in.   Password protected roles should be NO.

In order to enable a password protected role  the user must issue the SET ROLE command

to grant a role (protected or not) is  as you stated.

      grant ROLENAME to USERNAME

to enable a disabled role

      set role ROLENAME

to enable a protected role

      set role ROLENAME identified by ROLEPASSWORD

>> can we grant a password protected role with out password

no,  if it needs to be password protected, then it needs to have a password
if the role is enabled by  default that is likely the problem.

rather than revoking the role,  disable it as a default.

alter user YOURUSER default role all except YOURROLE
Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

ajaybeldeAuthor Commented:
"if the role is enabled by  default that is likely the problem."

Can you please explain  more in detail.
ajaybeldeAuthor Commented:
how to grant that password protected role to user. Syntax please

It is just grant ROLENAME to USERNAME or some thing else.

sdstuberConnect With a Mentor Commented:
I recommend reading up on roles, defaulting, password protection, etc  in the Security Guide

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.