
Oracle Error:
ORA-01045: user C##SCOTT lacks CREATE SESSION privilege; logon denied
Scenario:
Here, I was trying to access C##SCOTT user immediately after creation of it, Above mentioned oracle error itself self-explanatory. I had forgotten to grant CONNECT privilege to C##SCOTT user. After granting mentioned privileges, I was able to connect C##SCOTT user.
Error logs and solution:
SQL> create user C##SCOTT identified by tiger default tablespace users; User created. SQL> exit
Trying to connect C##SCOTT user:
[oracle@OL712c ~]$ sqlplus c##scott/tiger SQL*Plus: Release 12.1.0.2.0 Production on Wed Dec 17 05:13:19 2014 Copyright (c) 1982, 2014, Oracle. All rights reserved. ERROR: ORA-01045: user C##SCOTT lacks CREATE SESSION privilege; logon denied
Connect as sysdba and grant required privileges:
[oracle@OL712c ~]$ sqlplus / as sysdba SQL> grant connect,resource to C##SCOTT; Grant succeeded. SQL> exit
Successfully connect C##SCOTT after assigning required privileges.
[oracle@OL712c ~]$ sqlplus c##scott/tiger SQL> show user; USER is "C##SCOTT"
It was only problem with required privilege.