ITPub博客

首页 > 数据库 > Oracle > 配置OEM遇到ORA-12514

配置OEM遇到ORA-12514

原创 Oracle 作者:zhangsharp20 时间:2016-05-08 12:51:09 0 删除 编辑
错误如下:
[oracle@node1 ~]$ emca -config dbcontrol db -repos create -cluster


STARTED EMCA at Apr 11, 2016 6:09:57 PM
EM Configuration Assistant, Version 11.2.0.3.0 Production
Copyright (c) 2003, 2011, Oracle.  All rights reserved.


Enter the following information:
Database unique name: prod
Service name: prod
Listener port number: 1521
Listener ORACLE_HOME [ /u01/app/11.2.0/grid ]: 
Password for SYS user:  
Password for DBSNMP user:  
Password for SYSMAN user:  
Password for SYSMAN user: Cluster name: node-cluster
Email address for notifications (optional): 
Outgoing Mail (SMTP) server for notifications (optional): 
ASM ORACLE_HOME [ /u01/app/11.2.0/grid ]: 
ASM port [ 1521 ]: 
ASM username [ ASMSNMP ]: 
ASM user password:  
Apr 11, 2016 6:11:02 PM oracle.sysman.emcp.util.GeneralUtil initSQLEngineRemotely
WARNING: Error during db connection : ORA-12514: TNS:listener does not currently know of service requested in connect descriptor


-----------------------------------------------------------------


You have specified the following settings


Database ORACLE_HOME ................ /u01/app/oracle/product/11.2.0/db_1


Database instance hostname ................ Listener ORACLE_HOME ................ /u01/app/11.2.0/grid
Listener port number ................ 1521
Cluster name ................ node-cluster
Database unique name ................ prod
Email address for notifications ............... 
Outgoing Mail (SMTP) server for notifications ............... 
ASM ORACLE_HOME ................ /u01/app/11.2.0/grid
ASM port ................ 1521
ASM user role ................ SYSDBA
ASM username ................ ASMSNMP


-----------------------------------------------------------------
Do you wish to continue? [yes(Y)/no(N)]:
[oracle@node1 ~]$ 

查看监听信息
[grid@node1 ~]$ lsnrctl status listener_scan1


LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 11-APR-2016 18:23:39


Copyright (c) 1991, 2013, 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.4.0 - Production
Start Date                11-APR-2016 01:04:06
Uptime                    0 days 17 hr. 19 min. 33 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/node1/listener_scan1/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER_SCAN1)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.6.250)(PORT=1521)))
Services Summary...
Service "prod" has 2 instance(s).
  Instance "prod1", status READY, has 1 handler(s) for this service...
  Instance "prod2", status READY, has 1 handler(s) for this service...
Service "prodXDB" has 2 instance(s).
  Instance "prod1", status READY, has 1 handler(s) for this service...
  Instance "prod2", status READY, has 1 handler(s) for this service...
The command completed successfully
[grid@node1 ~]$ 
由于RAC的监听是在SCAN listener上,所以可以看到没有ASM的监听
[grid@node1 node1]$ crsctl stat res -t
--------------------------------------------------------------------------------
NAME           TARGET  STATE        SERVER                   STATE_DETAILS       
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.DATA.dg
               ONLINE  ONLINE       node1                                        
               ONLINE  ONLINE       node2                                        
ora.FRA.dg
               ONLINE  ONLINE       node1                                        
               ONLINE  ONLINE       node2                                        
ora.LISTENER.lsnr
               ONLINE  ONLINE       node1                                        
               ONLINE  ONLINE       node2                                        
ora.OCR.dg
               ONLINE  ONLINE       node1                                        
               ONLINE  ONLINE       node2                                        
ora.asm
               ONLINE  ONLINE       node1                    Started             
               ONLINE  ONLINE       node2                    Started             
ora.gsd
               OFFLINE OFFLINE      node1                                        
               OFFLINE OFFLINE      node2                                        
ora.net1.network
               ONLINE  ONLINE       node1                                        
               ONLINE  ONLINE       node2                                        
ora.ons
               ONLINE  ONLINE       node1                                        
               ONLINE  ONLINE       node2                                        
ora.registry.acfs
               ONLINE  ONLINE       node1                                        
               ONLINE  ONLINE       node2                                        
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
      1        ONLINE  ONLINE       node1                                        
ora.cvu
      1        ONLINE  ONLINE       node1                                        
ora.node1.vip
      1        ONLINE  ONLINE       node1                                        
ora.node2.vip
      1        ONLINE  ONLINE       node2                                        
ora.oc4j
      1        ONLINE  ONLINE       node1                                        
ora.prod.db
      1        ONLINE  ONLINE       node1                    Open                
      2        ONLINE  ONLINE       node2                    Open                
ora.scan1.vip
      1        ONLINE  ONLINE       node1                                        
[grid@node1 node1]$

将ASM的监听注册到listener_scan1中
[grid@node1 admin]$ sqlplus / as sysdba


SQL*Plus: Release 11.2.0.4.0 Production on Mon Apr 11 18:34:33 2016


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




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



SQL> show parameter remote  


NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
remote_listener                      string
remote_login_passwordfile            string      EXCLUSIVE
remote_os_authent                    boolean     FALSE
remote_os_roles                      boolean     FALSE

SQL> alter system set remote_listener='scan-vip:1521' scope=both sid='*';


System altered.


SQL> show parameter remot


NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
remote_listener                      string      scan-vip:1521
remote_login_passwordfile            string      EXCLUSIVE
remote_os_authent                    boolean     FALSE
remote_os_roles                      boolean     FALSE
SQL> quit
可以看到ASM实例已经被注册进来了
LSNRCTL> status listener_scan1
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_SCAN1)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER_SCAN1
Version                   TNSLSNR for Linux: Version 11.2.0.4.0 - Production
Start Date                11-APR-2016 01:04:06
Uptime                    0 days 17 hr. 37 min. 26 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/node1/listener_scan1/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER_SCAN1)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.6.250)(PORT=1521)))
Services Summary...
Service "+ASM" has 2 instance(s).
  Instance "+ASM1", status READY, has 1 handler(s) for this service...
  Instance "+ASM2", status READY, has 1 handler(s) for this service...
Service "prod" has 2 instance(s).
  Instance "prod1", status READY, has 1 handler(s) for this service...
  Instance "prod2", status READY, has 1 handler(s) for this service...
Service "prodXDB" has 2 instance(s).
  Instance "prod1", status READY, has 1 handler(s) for this service...
  Instance "prod2", status READY, has 1 handler(s) for this service...
The command completed successfully
LSNRCTL> quit
重新安装OEM,问题解决
[oracle@node1 ~]$ emca -config dbcontrol db -repos create -cluster


STARTED EMCA at Apr 11, 2016 6:42:52 PM
EM Configuration Assistant, Version 11.2.0.3.0 Production
Copyright (c) 2003, 2011, Oracle.  All rights reserved.


Enter the following information:
Database unique name: prod
Service name: prod
Listener port number: 1521
Listener ORACLE_HOME [ /u01/app/11.2.0/grid ]: 
Password for SYS user:  
Password for DBSNMP user:  
Password for SYSMAN user:  
Cluster name: node-cluster
Email address for notifications (optional): 
Outgoing Mail (SMTP) server for notifications (optional): 
ASM ORACLE_HOME [ /u01/app/11.2.0/grid ]: 
ASM port [ 1521 ]: 
ASM username [ ASMSNMP ]: 
ASM user password:  
-----------------------------------------------------------------


You have specified the following settings


Database ORACLE_HOME ................ /u01/app/oracle/product/11.2.0/db_1


Database instance hostname ................ Listener ORACLE_HOME ................ /u01/app/11.2.0/grid
Listener port number ................ 1521
Cluster name ................ node-cluster
Database unique name ................ prod
Email address for notifications ............... 
Outgoing Mail (SMTP) server for notifications ............... 
ASM ORACLE_HOME ................ /u01/app/11.2.0/grid
ASM port ................ 1521
ASM user role ................ SYSDBA
ASM username ................ ASMSNMP


-----------------------------------------------------------------
Do you wish to continue? [yes(Y)/no(N)]: Y


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

请登录后发表评论 登录
全部评论

注册时间:2014-08-12

  • 博文量
    382
  • 访问量
    801449