ORA-01045: user xxx lacks CREATE SESSION privilege; logon denied


In the Oracle database, if you have created a new user and tried to log in with a newly created user, you might get an error ORA-01045: user xxx lacks CREATE SESSION privilege; logon denied error.

ORA-01045: user xxx lacks CREATE SESSION privilege; logon denied

This normally happens when you didn’t give CREATE SESSION privilege while creating the user. To grant the CREATE SESSION privilege follow the below steps.

Step 1: Open the Oracle’s Run SQL Command Line terminal. And connect as sysdba.

Step 2: Enter your system dba username and password that you have created during the installation of the database(if you didn’t create any, try login with SYS as a username and empty(no password) password).

SQL> connect as sysdba
Enter user-name: sys
Enter password:
Connected.
SQL>
connect as sysdba

Step 3: Execute the GRANT CREATE SESSION TO user_name; query.

SQL> GRANT CREATE SESSION TO root;

Grant succeeded.

SQL>

Step 4: Now try to connect with the new user again. You will be able to connect.

GRANT CREATE SESSION TO user_name;

References

  1. Oracle-CREATE USER
  2. Overview, Editions, and Features of Oracle Database
  3. Overview and Architecture of Oracle Database Server

Similar Posts

About the Author

Atul Rai
I love sharing my experiments and ideas with everyone by writing articles on the latest technological trends. Read all published posts by Atul Rai.