但是总是阻挡在验证asmsnmp这块,验证不通过,关于TNS-12543: TNS:destination host unreachable的案例
先百度找到的问题虽然也是验证不通过,但报错的信息不一样,都是
1."ORA-01031: insufficient privileges"
[grid@node1 bin]$ orapwd file=/u01/app/11.2.0/grid/dbs/orapw+ASM password=oracle_4U
[grid@node1 dbs]$ scp orapw+ASM Node2:/u01/app/11.2.0/grid/dbs/
[grid@node1 dbs]$ scp orapw+ASM Node3:/u01/app/11.2.0/grid/dbs/
Login in to Oracle database as
export ORACLE_SID=+ASM1
export ORACLE_HOME=/u01/app/11.2.0/grid
[grid@node1 bin]$ sqlplus / as sysasm
SQL>create user asmsnmp identified by oracle_4U;
SQL> grant sysdba to asmsnmp;
2.ora 01017 invalid username/password logon denied
[grid@node1 bin]$ sqlplus / as sysasm
SQL>alter user asmsnmp identified by oracle_4U;
但我的原因却是 TNS-12543: TNS:destination host unreachable,可以判定是监听连接不上
用tnsping命令验证一下,确实不通。而且还看到一个错误IP(已经确定问题就在这里,当初在设置/etc/hosts的时候输出一个IP地址)及查看监听,也没有+asm实例的监听
TNS Ping Utility for Linux: Version 11.2.0.3.0 - Production on 30-JAN-2016 16:38:23
Copyright (c) 1997, 2011, Oracle. All rights reserved.
Used parameter files:
/u01/app/11.2.0/grid/network/admin/sqlnet.ora
Used EZCONNECT adapter to resolve the alias
Attempting to contact (DESCRIPTION=(CONNECT_DATA=(SERVICE_NAME=))(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.214.244)(PORT=1521)))
TNS-12543: TNS:destination host unreachable
ora11g-> lsnrctl status ---- (缺少asm实例的监听)
LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 30-JAN-2016 16:38:50
Copyright (c) 1991, 2011, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.3.0 - Production
Start Date 30-JAN-2016 16:31:06
Uptime 0 days 0 hr. 7 min. 44 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/ora11g/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=ora11g)(PORT=1521)))
The listener supports no services
The command completed successfully
[root@ora11g u01]# cat /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.214.244 ora11g
网格用户(通常是grid用户)输入:sqlplus / as sysasm
然后:
alter user ASMSNMP identified by 新密码
重新启了一下数据库(自从安装asm之后,就没有启动过,又因为之前hosts解释IP错误,所以没有asm实例动态注册)
ora11g-> sqlplus / as sysasm
SQL*Plus: Release 11.2.0.3.0 Production on Sat Jan 30 16:53:12 2016
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Automatic Storage Management option
SQL> shutdown immediate;
ASM diskgroups dismounted
ASM instance shutdown
SQL> startup
ASM instance started
Total System Global Area 283930624 bytes
Fixed Size 2227664 bytes
Variable Size 256537136 bytes
ASM Cache 25165824 bytes
ASM diskgroups mounted
SQL>
Total System Global Area 283930624 bytes
Fixed Size 2227664 bytes
Variable Size 256537136 bytes
ASM Cache 25165824 bytes
ASM diskgroups mounted
ora11g-> lsnrctl status
LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 30-JAN-2016 16:54:25
Copyright (c) 1991, 2011, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=ora11g)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.3.0 - Production
Start Date 30-JAN-2016 16:45:34
Uptime 0 days 0 hr. 8 min. 51 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/ora11g/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=ora11g)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Services Summary...
Service "+ASM" has 1 instance(s).
Instance "+ASM", status READY, has 1 handler(s) for this service...
The command completed successfully
ora11g->