Database link ORA-01017: invalid username/password
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; logondenied
ORA-02063: preceding line from database_link1
01017. 00000-"Invalid username/password; logondenied"
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 is11g and it by default sets password case sensitive to true. tosolve the problem, I use double quotes to enclose lower casepassword and User Name:
Create database link database_link1
Connect to "Scott" identified by "tiger" -- Double quotes is especially important
Using 'pdtt ';