title: Database Link ORA-01017: invalid username/password; logon denied
body: <p>Please help with this database link error i have been struggling for 2 days, Btw, fix this with get my oracle stream works. Stream error: WAITING FOR INACTIVE DEQUEUERS". Checked problem comes from db-link, so here is the problem:</p>
  
  <pre><code>--user: sys
  --environmentL appuat1
  CREATE PUBLIC DATABASE LINK "ANAUAT0" USING 'anauat0
  
  --user: STRMADMIN_FORM
  --environmentL appuat1
  
  CREATE DATABASE LINK ANAUAT0
    CONNECT TO "STRMADMIN_FORM" IDENTIFIED BY "STRMADMIN_FORM"
    USING 'anauat0';
  
  --user: STRMADMIN_FORM
  --environmentL appuat1
  select * from STRMADMIN_FORM.Table@'anauat0;
  </code></pre>
  
  <p>ERROR:
  ORA-01017: invalid username/password; logon denied
  ORA-02063: preceding line from ANAUAT0
  01017. 00000 -  "invalid username/password; logon denied"</p>
  
  <p><strong>Question1: Given that username &amp; password are correct, what is the problem?</strong></p>
  
  <pre><code>--user: SYS
  --environmentL appuat1
  select * from STRMADMIN_FORM.Table@'anauat0;
  </code></pre>
  
  <p>ERROR:
  ORA-28000: the account is locked
  ORA-02063: preceding line from ANAUAT0
  28000. 00000 -  "the account is locked"
  *Cause:    The user has entered wrong password consequently for maximum
             number of times specified by the user's profile parameter
             FAILED_LOGIN_ATTEMPTS, or the DBA has locked the account
  *Action:   Wait for PASSWORD_LOCK_TIME or contact DBA</p>
  
  <p><strong>Question 2: Checked no account are locked, what is locked?</strong></p>
  
  <p>From the other way round can select table using opposit direction Db-link.</p>
  
  <p>update: a trade of to prevent error is to use tns information :</p>
  
  <pre><code>CREATE DATABASE LINK "ANAUAT0"
    CONNECT TO "STRMADMIN_ADM" IDENTIFIED BY  "STRMADMIN_ADM"
    USING '(DESCRIPTION=
      (ADDRESS=
        (PROTOCOL=TCP)
        (HOST=xx.xx.xx.xxx)
        (PORT=1521)
      )
      (CONNECT_DATA=
        (SERVICE_NAME=anauat0)
      )
    )';
  </code></pre>
  
  <p>But using service name is what I want to do. Obviously service name is cause of problem (the service name is working fine)
  Thanks!!</p>