Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Need help with creating hr user

sql enthusiastNov 17 2015 — edited Nov 19 2015

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.

This post has been answered by sql enthusiast on Nov 19 2015
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 17 2015
Added on Nov 17 2015
5 comments
1,958 views