When connecting to the 11g version of the Oracle database of ORACLE, dblink, 9i or 10g, the user name and password are incorrect


1. Create a dblink original statement:

create public database link xxxx

connect to abc identified by abc

using '(DESCRIPTION =(ADDRESS_LIST =(ADDRESS = (PROTOCOL = TCP)(HOST = 192.xxx.xxx.xxx)(PORT = 1521)))(CONNECT_DATA = (SERVICE_NAME = serName)))';

Note: User passwords here are all lowercase.


2. The following error is prompted when using the dblink after creating:

ORA-01017: invalid username/password; logon denied

ORA-02063: preceding line from <link_name>

Three, problem analysis:

According to the prompt of ORA-01017, the user password connected to the other party is wrong, so directly use the configured user password (abc/abc) to log in to the database and find that the login is normal. Further check the established dblink statement, in which the user names are converted to Uppercase, thus guessing whether the password is also converted to uppercase, resulting in a wrong password.

According to the guess Baidu, this is indeed the case. When the 9i or 10g version of the Oracle database is connected to the 11g version, the password will be automatically converted to uppercase.

Fourth, the solution:

(Method 1. If the password of the 11g database user is a lowercase letter, change it to uppercase, and then use 9i to connect. This method is too vulgar and has a relatively large impact, so it is not considered to be used.


(Method 2. Enclose the password in double quotation marks. Such as identified by "abc"

Using method 2, we can slightly rewrite the creation statement of dblink, as follows:

create public database link abc

connect to abc identified by "abc"

using '(DESCRIPTION =(ADDRESS_LIST =(ADDRESS = (PROTOCOL = TCP)(HOST = 192.xxx.xxx.xxx)(PORT = 1521)))(CONNECT_DATA = (SERVICE_NAME = serName)))';

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326633450&siteId=291194637