Issue
An error was encountered performing the requested operation:
ORA-01045: user HR lacks CREATE SESSION privilege; logon denied
01045. 00000 - "user %s lacks CREATE SESSION privilege; logon denied"
*Cause: A connect was attempted to a userid which does not have
create session privilege.
*Action: Grant the user CREATE SESSION privilege.
Vendor code 1045
SELECT * FROM DBA_SYS_PRIVS WHERE GRANTEE='HR';
No output
SELECT * FROM DBA_ROLE_PRIVS WHERE GRANTEE='HR';
No output
Finally did this:
ALTER USER HR DEFAULT ROLE CONNECT;
Again gives error
ALTER USER HR DEFAULT ROLE CONNECT
Error report -
SQL Error: ORA-01955: DEFAULT ROLE 'CONNECT' not granted to user
01955. 00000 - "DEFAULT ROLE '%s' not granted to user"
*Cause: The user being altered does not have the specified role granted
directly to the user. Note, sub-roles cannot be used in the
default role clause.
*Action: Grant the role to the user.