ORA-01017 ORA-02063 WHILE CONNECTING FROM 10G TO 11G VIA PUBLIC DBLINK

测试平台介绍:

服务器1:ora10g   10.2.0.1
服务器2:ora11g   11.2.0.1
  
测试1:在ora11g上建立dblink访问ora10g上的表t1。
  
[oracle@ora11g admin]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on Wed Feb 11 16:23:06 2015
Copyright (c) 1982, 2009, Oracle.  All rights reserved.

Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, Oracle Label Security, OLAP, Data Mining,
Oracle Database Vault and Real Application Testing options

SQL> grant create database link to scott; 
Grant succeeded.

SQL> grant create synonym to scott; 
Grant succeeded.

[oracle@ora11g admin]$ vi tnsnames.ora

# tnsnames.ora Network Configuration File: /oracle/ora11gR2/product/11.2.0/dbhome_1/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.

ORA10G =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.66)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = ora10g)
    )
  )
  
SQL> conn scott/tiger
Connected.
  
SQL> create database link dblink connect to scott identified by tiger using 'ora10g';
Database link created.

SQL> select * from t1@dblink;

    DEPTNO DNAME          LOC
---------- -------------- -------------
        10 ACCOUNTING     NEW YORK
        20 RESEARCH       DALLAS
        30 SALES          CHICAGO
        40 OPERATIONS     BOSTON


测试正常。



测试2:在ora10g上建立dblink访问ora11g上的表test1。

[oracle@ora10g ~]$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.1.0 - Production on Wed Feb 11 16:32:31 2015
Copyright (c) 1982, 2005, Oracle.  All rights reserved.

Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options

SQL> grant create database link to scott; 
Grant succeeded.

SQL> grant create synonym to scott; 
Grant succeeded.

SQL> conn scott/tiger
Connected.

SQL> create database link dblink connect to scott identified by tiger using 'ora11g';
Database link created.

SQL> select * from test1@dblink;
select * from test1@dblink
ORA-01017: invalid username/password; logon denied
ORA-02063: preceding line from TEST_167

当9i或10g的版本的Oracle数据库连接11g的版本时,会自动将密码转化为大写。

解决方法:将密码用双引号引起来
SQL> create database link dblink connect to scott identified by "tiger" using 'ora11g';
Database link created.

SQL> select * from test1@dblink;

测试正常。


参见MOS
Bug 6738104 : ORA-01017 ORA-02063 WHILE CONNECTING FROM 10G TO 11G VIA PUBLIC DBLINK

Cause
The following Bug 6738104 was logged for this issue which was closed as not a bug saying the cause being introduction of password case sensitivity feature in 11g
When one creates a database link connection, a user name and password for the connection needs to be defined. When the database link is created, the password is case sensitive. Before a user can connect from a pre-release 11g database to a 11g release database and as the password case sensitivity is enabled by default, you must re-create the password for this database link using all uppercase letters.
The reason you need to re-create the password using all uppercase letters is so that it will match how Oracle Database stores database link passwords. Oracle Database always stores this type of password in uppercase letters, even if the password had originally been created using lower or mixed case letters. If case sensitivity is disabled, the user can enter the password using the case the password was created in.

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/25373498/viewspace-1433570/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/25373498/viewspace-1433570/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值