How to solve ORA-01017: Invalid username/password; logon denied

I was trying to connect to a database today when I found this:

I think there could be a lot of reasons for this, but the easiest approach is to reset the user’s password, that is if the user exists of course. Here is the solution:

  1. Connect as sysdba to the database
C:Usershecperez>sqlplus / as sysdba
  1. Run the following query to check if the user is in the database
SQL> select username from dba_users;

USERNAME
------------------------------
HR
ANONYMOUS
APEX_040000
FLOWS_FILES
XDB
CTXSYS
MDSYS
SYSTEM
SYS
Stacey_G
Macey_M

USERNAME
------------------------------
Siry_M
user_name
APEX_PUBLIC_USER
XS$NULL
OUTLN

16 rows selected.
  1. If it is then run the following query to set a new password for the user
ALTER USER user_name IDENTIFIED BY password;
User altered.

That’s it!, I just reset the password for the user. Remember that password represents a variable and should be replaced with your own.