cant connect to oracle - ora-01017

4.9k Views Asked by At

i installed Oracle 11.2.0 64bit & Oracle SQL developer 2.1.1.64 on Windows-7 64bit

i try to connect to database like this:

username: scott
password: tiger
role    : sysdba
hostname: localhost
port    : 1521
sid     : ORCL

and i got this error: ora-01017 invalid username/password; logon denied

what can be the problem ? what to check ?

thanks in advance

4

There are 4 best solutions below

0
On

11g allows for case-sensitive passwords, so firstly check the password TIGER (and maybe Tiger)

0
On

since the database is on your local machine, easiest is to connect to it using os authentication and reset the password to a known value and then use that to connect using the tool you want. On windows you can do this in the *nix style. First find where your oracle rdbms installation is located and assign that value to the ORACLE_HOME environment variable. Use the commandline tool.

ORACLE_HOME=d:\somwehere\on\your\disk
PATH=%ORACLE_HOME%\bin
ORACLE_SID=ORCL
sqlplus "/ as sysdba"
alter user scott identified by koffie;

(make sure you remember the password this time, including case as since 11g passwords are case sensitive.) sqlplus should be in %ORACLE_HOME%\bin. Check this before.

I hope this helps.

2
On

Is the account unlocked? As a privileged (SYS account) try running:

 SELECT USERNAME, ACCOUNT_STATUS
 FROM DBA_USERS
 WHERE USERNAME = 'SCOTT';

If the account is locked, try:

ALTER USER SCOTT ACCOUNT UNLOCK;

Also it appears you are trying to connect to the database as SYSDBA using the SCOTT account. I believe by default this schema lacks the necessary account privileges. Try logging in as SCOTT/TIGER connecting as "normal", not "sysdba".

-CJ

0
On

Use: orapwd file=$ORACLE_HOME/dbs/orapw$ORACLE_SID password=Euro2016 entries=5 grant sysdba to scott;

Now you can connect...