Oracle database link error: ORA-01017: invalid username/password; logon denied

January 11, 2010 – 4:43 pm

Today I create a database link in Oracle as follows

CREATE DATABASE LINK DATABASE_LINK1
CONNECT TO SCOTT IDENTIFIED BY TIGER
USING ‘PDTT’;

When I try to use the link I get an error.

select * from dual@DATABASE_LINK1;

SQL Error: ORA-01017: invalid username/password; logon denied
ORA-02063: preceding line from DATABASE_LINK1
01017. 00000 -  “invalid username/password; logon denied”

At first I thought there was problem with service name ‘PDTT’, but when I used sqlplus to connect using PDTT it succeeded (i.e. sqlplus scott/tiger@PDTT).

The problem turns out to be that the DB I try to connect to is 11g and it by default sets password case sensitive to true. To solve the problem, I use double quotes to enclose lower case password and user name:

CREATE DATABASE LINK DATABASE_LINK1
CONNECT TO “scott” IDENTIFIED BY “tiger”
USING ‘PDTT’;

  1. 4 Responses to “Oracle database link error: ORA-01017: invalid username/password; logon denied”

  2. Hello..

    Thanks alot.. It really helped me

    Pushpen

    By Pushpendr on Mar 30, 2010

  3. Awesome! I was having the same problem and was ready to toss the server out of the window. This solved it.

    Thanks for sharing!

    By Gabri van Lee on May 17, 2010

  4. Thanks a lot

    I spent much time with this problem and i was desperate.

    It works.

    By Carlos on Jun 9, 2010

  5. Thanks a lot.. spent lot of time browsing through internet for it .. Was really helpful.. Indeed the connecting database was Oracle 11g

    By Khyati on Jun 25, 2010

Post a Comment