DB link, always report a password error after creation. I'm surprised. The password is correct. How could it be wrong?
sql> Create public database link kk40 connect to khfx identified by XFFSF3 using ' 1004 '
Sql> select * FROM;
SELECT * FROM
Ora-01017:invalid Username/password; Logon denied
ORA-02063: Immediately following line (from KK40)
sql> Create public database link kk40 connect to khfx identified by "XFFSF3" using ' 1004 '
Database Link Created
Sql> select * FROM;
DUMMY
-----
X
The original plus double quotation marks can ah! Record it.
=====================================================================
First, create the Dblink original statement:
Create Public database link Db_lsxy
Connect to Lsxy identified by Lsxy
Using ' (DESCRIPTION = (Address_list = (ADDRESS = (PROTOCOL = TCP) (HOST = 192.xxx.xxx.xxx) (PORT = 2261))) (Connect_data = (SER Vice_name = sername)) ';
Note: Here the user password is lowercase.
Second, after creating the Dblink, use the following error:
Ora-01017:invalid Username/password; Logon denied
Ora-02063:preceding Line from <link_name>
Third, the problem analysis:
According to the ORA-01017 prompt is connected to the other side of the user password error, and then directly using the configured user password (LSXY/LSXY) log in to the database to find a normal login, further review the established Dblink statement, where the user name converted to uppercase, This guesses whether the password is also converted to uppercase, which results in a bad password.
According to speculation Baidu, there is indeed such a situation. When a 9i or 10g version of the Oracle database is connected to a 11g version, the password is automatically converted to uppercase.
Iv. Solutions:
(Method 1, if the password of the 11g database user is lowercase, it is changed to uppercase, and then to use the 9i to connect, this method is too coarse effect is also relatively large regardless of use.)
(Method 2, enclose the password in double quotation marks.) such as identified by "Jxunicom_sale"
Using Method 2, we will rewrite the Dblink creation statement slightly, as follows:
Create Public database link Db_lsxy
Connect to Lsxy identified by "Lsxy"
Using ' (DESCRIPTION = (Address_list = (ADDRESS = (PROTOCOL = TCP) (HOST = 192.xxx.xxx.xxx) (PORT = 2261))) (Connect_data = (SER Vice_name = sername)) ';
ora-01017 and Oracle Database link