【vbox】11g rac之服务器、客户机的scan方式访问+asm实例(连接报错ora-12514,ORA-12545)

版权声明:所有文章禁止转载但是均可在生产中使用提高效率 https://blog.csdn.net/viviliving/article/details/89948844

11grac默认安装完毕,+asm只在LISTENER下注册,在LISTENER_SCAN1没注册

因此无论服务器上还是客户端连接都无法通过scan地址访问到asm

因此解决办法:

1、注册asm到LISTENER_SCAN1

注册后发现

remote_listener修改为scan后仅仅服务器可以scan方式连接,window客户机不行

还需要把local_listener也改成scan方式才可以客户机、服务器均可访问

alter system set local_listener='(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=rac-scan)(PORT=1521))))' scope=both;

[grid@rac1 admin]$ lsnrctl status  LISTENER

LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 08-MAY-2019 11:04:16

Copyright (c) 1991, 2009, Oracle.  All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date                08-MAY-2019 08:13:03
Uptime                    0 days 2 hr. 51 min. 13 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/11.2.0/grid/network/admin/listener.ora
Listener Log File         /u01/app/grid/diag/tnslsnr/rac1/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.100.101)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.100.201)(PORT=1521)))
Services Summary...
Service "+ASM" has 1 instance(s).
  Instance "+ASM1", status READY, has 1 handler(s) for this service...
The command completed successfully
[grid@rac1 admin]$ lsnrctl status  LISTENER_SCAN1

LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 08-MAY-2019 11:03:48

Copyright (c) 1991, 2009, Oracle.  All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_SCAN1)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER_SCAN1
Version                   TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date                08-MAY-2019 08:13:03
Uptime                    0 days 2 hr. 50 min. 46 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/11.2.0/grid/network/admin/listener.ora
Listener Log File         /u01/app/11.2.0/grid/log/diag/tnslsnr/rac1/listener_scan1/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER_SCAN1)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.100.222)(PORT=1521)))
Services Summary...
Service "racdb" has 2 instance(s).
  Instance "racdb1", status READY, has 2 handler(s) for this service...
  Instance "racdb2", status READY, has 1 handler(s) for this service...
Service "racdbXDB" has 2 instance(s).
  Instance "racdb1", status READY, has 1 handler(s) for this service...
  Instance "racdb2", status READY, has 1 handler(s) for this service...
The command completed successfully

查看grid下asm参数

[grid@rac1 admin]$ sqlplus "/as sysdba"

SQL*Plus: Release 11.2.0.1.0 Production on Wed May 8 11:27:06 2019

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 Real Application Clusters and Automatic Storage Management options

SQL> show parameter lis

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
listener_networks                    string
local_listener                       string      (DESCRIPTION=(ADDRESS_LIST=(AD
                                                 DRESS=(PROTOCOL=TCP)(HOST=rac1
                                                 -vip)(PORT=1521))))
remote_listener                      string

alter system set remote_listener='rac-scan:1521'  scope=both;

修改后服务器上可以连接,

[grid@rac2 admin]$ sqlplus sys/oracle@rac-scan/+ASM as sysasm

SQL*Plus: Release 11.2.0.1.0 Production on Wed May 8 11:32:19 2019

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 Real Application Clusters and Automatic Storage Management options

SQL> exit

但是客户机仍旧报错

C:\Users\viviliving>sqlplus sys/oracle@racscanasm as sysasm

SQL*Plus: Release 18.0.0.0.0 - Production on 星期三 5月 8 11:48:22 2019
Version 18.3.0.0.0

Copyright (c) 1982, 2018, Oracle.  All rights reserved.

ERROR:
ORA-12545: 因目标主机或对象不存在, 连接失败

继续修改

alter system set local_listener='(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=rac-scan)(PORT=1521))))' scope=both;

C:\Users\viviliving>sqlplus sys/oracle@racscanasm as sysasm

SQL*Plus: Release 18.0.0.0.0 - Production on 星期三 5月 8 11:50:43 2019
Version 18.3.0.0.0

Copyright (c) 1982, 2018, Oracle.  All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Real Application Clusters and Automatic Storage Management options

SQL>


C:\Users\viviliving>sqlplus sys/[email protected]/+ASM as sysasm

SQL*Plus: Release 18.0.0.0.0 - Production on 星期三 5月 8 11:59:49 2019
Version 18.3.0.0.0

Copyright (c) 1982, 2018, Oracle.  All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Real Application Clusters and Automatic Storage Management options

SQL>

问题解决

猜你喜欢

转载自blog.csdn.net/viviliving/article/details/89948844