ora-01017 and Oracle Database link

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.