Welcome 微信登录

首页 / 数据库 / MySQL / Oracle 11gr2 RAC环境配置OEM 报ORA-12514错误

今天一个客户打电话过来说他们的OEM出了问题用不起,OEM这个东西得说了很多次,但是自己从来没有玩过。下面就在自己的测试环境来玩一点,结果报错了。环境:OS:RHEL 5.6 X86_64 DB:11.2.0.2 RAC1,开始配置OEM
  1. [Oracle@11rac1 ~]$ emca -config dbcontrol db -repos create -cluster
  2. STARTED EMCA at Nov 7, 2012 11:00:18 PM
  3. EM Configuration Assistant, Version 11.2.0.0.2 Production
  4. Copyright (c) 2003, 2005, Oracle.  All rights reserved.
  5. Enter the following information:
  6. Databaseuniquename: power
  7. Service name: power
  8. Listener port number: 1521
  9. Listener ORACLE_HOME [ /u01/app/11.2.0/grid ]: 
  10. Passwordfor SYS user: 
  11. Passwordfor DBSNMP user: 
  12. Passwordfor SYSMAN user: 
  13. Cluster name: test
  14. Email address for notifications (optional): 
  15. Outgoing Mail (SMTP) server for notifications (optional): 
  16. ASM ORACLE_HOME [ /u01/app/11.2.0/grid ]: 
  17. ASM port [ 1521 ]: 
  18. ASM username [ ASMSNMP ]:
  19. #这里报不能解析ASM
  20. ASM userpassword: 
  21. Nov 7, 2012 11:01:43 PM oracle.sysman.emcp.util.GeneralUtil initSQLEngineRemotely
  22. WARNING: Error during db connection : ORA-12514: TNS:listener does not currently know of service requested inconnect descriptor
  23. Nov 7, 2012 11:01:48 PM oracle.sysman.emcp.util.GeneralUtil initSQLEngineRemotely
  24. WARNING: ORA-12154: TNS:could not resolve the connect identifier specified
  25. Nov 7, 2012 11:01:49 PM oracle.sysman.emcp.util.GeneralUtil initSQLEngineRemotely
  26. WARNING: Error during db connection : ORA-12514: TNS:listener does not currently know of service requested inconnect descriptor
  27. Nov 7, 2012 11:01:54 PM oracle.sysman.emcp.util.GeneralUtil initSQLEngineRemotely
  28. WARNING: ORA-12154: TNS:could not resolve the connect identifier specified
  29. Password validation failed. Someof the possible reasons may be:
  30.  
  31. 1) Invalid username/password. 
  32. 2) Databaseisnot up. 
  33. 3) Scan listener not up. 
  34. 4) Database service isnot registered with scan listener. 
  35. 5) Password file may be missing or configured incorrectly. 
  36. ASM userpassword: 
  37. ASM userpassword: Nov 7, 2012 11:12:21 PM oracle.sysman.emcp.util.GeneralUtil initSQLEngineRemotely
  38. WARNING: Error during db connection : ORA-12514: TNS:listener does not currently know of service requested inconnect descriptor
  39. Nov 7, 2012 11:12:26 PM oracle.sysman.emcp.util.GeneralUtil initSQLEngineRemotely
  40. WARNING: ORA-12154: TNS:could not resolve the connect identifier specified
  41. Nov 7, 2012 11:12:26 PM oracle.sysman.emcp.util.GeneralUtil initSQLEngineRemotely
  42. WARNING: Error during db connection : ORA-12514: TNS:listener does not currently know of service requested inconnect descriptor
  43. Nov 7, 2012 11:12:32 PM oracle.sysman.emcp.util.GeneralUtil initSQLEngineRemotely
  44. WARNING: ORA-12154: TNS:could not resolve the connect identifier specified
  45. Password validation failed. Someof the possible reasons may be:
  46.  
  47. 1) Invalid username/password. 
  48. 2) Databaseisnot up. 
  49. 3) Scan listener not up. 
  50. 4) Database service isnot registered with scan listener. 
  51. 5) Password file may be missing or configured incorrectly. 
2.查看监听消息
  1. [grid@11rac1 ~]$ ps -ef|grep lsn
  2. grid      3957   1  0 09:15 ?        00:00:00 /u01/app/11.2.0/grid/bin/tnslsnr LISTENER -inherit
  3. grid      3990   1  0 09:15 ?        00:00:00 /u01/app/11.2.0/grid/bin/tnslsnr LISTENER_SCAN1 -inherit
  4. grid      7006  6976  0 09:40 pts/0    00:00:00 grep lsn
  5. [grid@11rac1 ~]$ lsnrctl status listener
  6. LSNRCTL for Linux: Version 11.2.0.2.0 - Production on 08-NOV-2012 09:40:51
  7. Copyright (c) 1991, 2010, Oracle.  All rights reserved.
  8. Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER)))
  9. STATUS of the LISTENER
  10. ------------------------
  11. Alias                   LISTENER
  12. Version                 TNSLSNR for Linux: Version 11.2.0.2.0 - Production
  13. Start Date                08-NOV-2012 09:15:15
  14. Uptime                    0 days 0 hr. 25 min. 36 sec
  15. Trace Level             off
  16. Security                  ON: Local OS Authentication
  17. SNMP                      OFF
  18. Listener Parameter File /u01/app/11.2.0/grid/network/admin/listener.ora
  19. Listener Log File       /u01/app/11.2.0/grid/log/diag/tnslsnr/11rac1/listener/alert/log.xml
  20. Listening Endpoints Summary...
  21.   (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER)))
  22.   (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.100.40)(PORT=1521)))
  23.   (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.100.45)(PORT=1521)))
  24. Services Summary...
  25. Service "+ASM" has 1 instance(s).
  26.   Instance "+ASM1", status READY, has 1 handler(s) for this service...
  27. Service "power" has 1 instance(s).
  28.   Instance "power1", status READY, has 1 handler(s) for this service...
  29. Service "powerXDB" has 1 instance(s).
  30.   Instance "power1", status READY, has 1 handler(s) for this service...
  31. The command completed successfully
  32. [grid@11rac1 ~]$ lsnrctl status listener_scan1
  33. LSNRCTL for Linux: Version 11.2.0.2.0 - Production on 08-NOV-2012 09:41:04
  34. Copyright (c) 1991, 2010, Oracle.  All rights reserved.
  35. Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_SCAN1)))
  36. STATUS of the LISTENER
  37. ------------------------
  38. Alias                   LISTENER_SCAN1
  39. Version                 TNSLSNR for Linux: Version 11.2.0.2.0 - Production
  40. Start Date                08-NOV-2012 09:15:18
  41. Uptime                    0 days 0 hr. 25 min. 45 sec
  42. Trace Level             off
  43. Security                  ON: Local OS Authentication
  44. SNMP                      OFF
  45. Listener Parameter File /u01/app/11.2.0/grid/network/admin/listener.ora
  46. Listener Log File       /u01/app/11.2.0/grid/log/diag/tnslsnr/11rac1/listener_scan1/alert/log.xml
  47. Listening Endpoints Summary...
  48.   (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER_SCAN1)))
  49.   (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.100.49)(PORT=1521)))
  50. Services Summary...
  51. Service "power" has 2 instance(s).
  52.   Instance "power1", status READY, has 1 handler(s) for this service...
  53.   Instance "power2", status READY, has 1 handler(s) for this service...
  54. Service "powerXDB" has 2 instance(s).
  55.   Instance "power1", status READY, has 1 handler(s) for this service...
  56.   Instance "power2", status READY, has 1 handler(s) for this service...
  57. The command completed successfully
  58. [grid@11rac1 ~]$ sqlplus asmsnmp/oracle@scan:1521/+ASM as sysdba
  59. SQL*Plus: Release 11.2.0.2.0 Production on Thu Nov 8 09:41:30 2012
  60. Copyright (c) 1982, 2010, Oracle.  All rights reserved.
  61. ERROR:
  62. ORA-12514: TNS:listener does not currently know of service requested inconnect
  63. descriptor
  64. Enter user-name:   
  65. [grid@11rac1 ~]$ sqlplus asmsnmp/oracle@192.168.100.40:1521/+ASM as sysdba
  66. SQL*Plus: Release 11.2.0.2.0 Production on Thu Nov 8 09:44:57 2012
  67. Copyright (c) 1982, 2010, Oracle.  All rights reserved.
  68. Connected to:
  69. Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
  70. With the Real Application Clusters and Automatic Storage Management options
  71. SQL> select instance_name from v$instance;
  72. INSTANCE_NAME
  73. ----------------
  74. +ASM1
  75. [grid@11rac1 ~]$ cd $ORACLE_HOME/network/admin
  76. [grid@11rac1 admin]$ cat listener.ora
  77. LISTENER=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER))))            # line added by Agent
  78. LISTENER_SCAN1=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_SCAN1))))                # line added by Agent
  79. ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER_SCAN1=ON                # line added by Agent
  80. ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER=ON              # line added by Agent
  81. [grid@11rac1 admin]$ cat endpoints_listener.ora
  82. LISTENER_11RAC1=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=11rac1-vip)(PORT=1521))(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.100.40)(PORT=1521)(IP=FIRST))))    # line added by Agent
发现ASM的监听跑在LISTENER上面,没有注册到LISTENER_SCAN1里面,而OEM使用提LISTENER_SCAN1监听。3.手动注册监听,并查看状态
  1. [grid@11rac1 ~]$ sqlplus / as sysdba
  2. SQL*Plus: Release 11.2.0.2.0 Production on Thu Nov 8 12:07:09 2012
  3. Copyright (c) 1982, 2010, Oracle.  All rights reserved.
  4. Connected to:
  5. Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
  6. With the Real Application Clusters and Automatic Storage Management options
  7. SQL> show parameter remote
  8. NAME                               TYPE        VALUE
  9. ------------------------------------ ----------- ------------------------------
  10. remote_listener                      string
  11. remote_login_passwordfile            string      EXCLUSIVE
  12. remote_os_authent                    boolean   FALSE
  13. remote_os_roles                      boolean   FALSE
  14. SQL> alter system set remote_listener="scan:1521" scope=both sid="*";
  15. System altered.
  16. SQL> alter system register;
  17. System altered.
  18. SQL> exit
  19. Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
  20. With the Real Application Clusters and Automatic Storage Management options
  21. [grid@11rac1 ~]$ ps -ef|grep lsn
  22. grid      3957   1  0 09:15 ?        00:00:00 /u01/app/11.2.0/grid/bin/tnslsnr LISTENER -inherit
  23. grid      3990   1  0 09:15 ?        00:00:00 /u01/app/11.2.0/grid/bin/tnslsnr LISTENER_SCAN1 -inherit
  24. grid   16378 16263  0 12:08 pts/0    00:00:00 grep lsn
  25. [grid@11rac1 ~]$ lsnrctl status listener_scan1
  26. LSNRCTL for Linux: Version 11.2.0.2.0 - Production on 08-NOV-2012 12:08:54
  27. Copyright (c) 1991, 2010, Oracle.  All rights reserved.
  28. Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_SCAN1)))
  29. STATUS of the LISTENER
  30. ------------------------
  31. Alias                   LISTENER_SCAN1
  32. Version                 TNSLSNR for Linux: Version 11.2.0.2.0 - Production
  33. Start Date                08-NOV-2012 09:15:18
  34. Uptime                    0 days 2 hr. 53 min. 35 sec
  35. Trace Level             off
  36. Security                  ON: Local OS Authentication
  37. SNMP                      OFF
  38. Listener Parameter File /u01/app/11.2.0/grid/network/admin/listener.ora
  39. Listener Log File       /u01/app/11.2.0/grid/log/diag/tnslsnr/11rac1/listener_scan1/alert/log.xml
  40. Listening Endpoints Summary...
  41.   (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER_SCAN1)))
  42.   (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.100.49)(PORT=1521)))
  43. Services Summary...
  44. Service "+ASM" has 2 instance(s).
  45.   Instance "+ASM1", status READY, has 1 handler(s) for this service...
  46.   Instance "+ASM2", status READY, has 1 handler(s) for this service...
  47. Service "power" has 2 instance(s).
  48.   Instance "power1", status READY, has 1 handler(s) for this service...
  49.   Instance "power2", status READY, has 1 handler(s) for this service...
  50. Service "powerXDB" has 2 instance(s).
  51.   Instance "power1", status READY, has 1 handler(s) for this service...
  52.   Instance "power2", status READY, has 1 handler(s) for this service...
  53. The command completed successfully
4.再次配置OEM
  1. [oracle@11rac1 ~]$ emca -config dbcontrol db -repos recreate -cluster
  2. STARTED EMCA at Nov 8, 2012 12:13:04 PM
  3. EM Configuration Assistant, Version 11.2.0.0.2 Production
  4. Copyright (c) 2003, 2005, Oracle.  All rights reserved.
  5. Enter the following information:
  6. Databaseuniquename: power
  7. Service name: power
  8. Listener port number: 1521
  9. Listener ORACLE_HOME [ /u01/app/11.2.0/grid ]: 
  10. Passwordfor SYS user: 
  11. Passwordfor SYS user: oracle
  12. Passwordfor SYSMAN user: 
  13. Cluster name: test
  14. Email address for notifications (optional): 
  15. Outgoing Mail (SMTP) server for notifications (optional): 
  16. ASM ORACLE_HOME [ /u01/app/11.2.0/grid ]: 
  17. ASM port [ 1521 ]: 
  18. ASM username [ ASMSNMP ]: 
  19. ASM userpassword: 
  20. -----------------------------------------------------------------
  21. You have specified the following settings
  22. Database ORACLE_HOME ................ /u01/app/oracle/product/11.2.0/db_1
  23. Database instance hostname ................ Listener ORACLE_HOME ................ /u01/app/11.2.0/grid
  24. Listener port number ................ 1521
  25. Cluster name ................ test
  26. Databaseuniquename ................ power
  27. Email address for notifications ............... 
  28. Outgoing Mail (SMTP) server for notifications ............... 
  29. ASM ORACLE_HOME ................ /u01/app/11.2.0/grid
  30. ASM port ................ 1521
  31. ASM user role ................ SYSDBA
  32. ASM username ................ ASMSNMP
  33. -----------------------------------------------------------------
  34. ----------------------------------------------------------------------
  35. WARNING : While repository is dropped the database will be put in quiesce mode.
  36. ----------------------------------------------------------------------
  37. Do you wish tocontinue? [yes(Y)/no(N)]: Y
  38. Nov 8, 2012 12:13:30 PM oracle.sysman.emcp.EMConfig perform
  39. INFO: This operation is being logged at /u01/app/oracle/cfgtoollogs/emca/power/emca_2012_11_08_12_13_03.log.
  40. Nov 8, 2012 12:13:32 PM oracle.sysman.emcp.EMReposConfig invoke
  41. INFO: Dropping the EM repository (this may take a while) ...
  42. Nov 8, 2012 12:16:59 PM oracle.sysman.emcp.EMReposConfig invoke
  43. INFO: Repository successfully dropped
  44. Nov 8, 2012 12:17:00 PM oracle.sysman.emcp.EMReposConfig createRepository
  45. INFO: Creating the EM repository (this may take a while) ...
  46. hNov 8, 2012 12:27:24 PM oracle.sysman.emcp.EMReposConfig invoke
  47. INFO: Repository successfully created
  48. Nov 8, 2012 12:27:33 PM oracle.sysman.emcp.EMReposConfig uploadConfigDataToRepository
  49. INFO: Uploading configuration data to EM repository (this may take a while) ...
  50. Nov 8, 2012 12:28:36 PM oracle.sysman.emcp.EMReposConfig invoke
  51. INFO: Uploaded configuration data successfully
  52. Nov 8, 2012 12:28:36 PM oracle.sysman.emcp.EMDBCConfig instantiateOC4JConfigFiles
  53. INFO: Propagating /u01/app/oracle/product/11.2.0/db_1/oc4j/j2ee/OC4J_DBConsole_11rac1_power to remote nodes ...
  54. Nov 8, 2012 12:28:39 PM oracle.sysman.emcp.EMDBCConfig instantiateOC4JConfigFiles
  55. INFO: Propagating /u01/app/oracle/product/11.2.0/db_1/oc4j/j2ee/OC4J_DBConsole_11rac2_power to remote nodes ...
  56. Nov 8, 2012 12:28:43 PM oracle.sysman.emcp.EMAgentConfig deployStateDirs
  57. INFO: Propagating /u01/app/oracle/product/11.2.0/db_1/11rac1_power to remote nodes ...
  58. Nov 8, 2012 12:28:45 PM oracle.sysman.emcp.EMAgentConfig deployStateDirs
  59. INFO: Propagating /u01/app/oracle/product/11.2.0/db_1/11rac2_power to remote nodes ...
  60. Nov 8, 2012 12:28:47 PM oracle.sysman.emcp.util.DBControlUtil secureDBConsole
  61. INFO: Securing Database Control (this may take a while) ...
  62. Nov 8, 2012 12:29:08 PM oracle.sysman.emcp.util.DBControlUtil startOMS
  63. INFO: Starting Database Control (this may take a while) ...
  64. Nov 8, 2012 12:30:33 PM oracle.sysman.emcp.EMDBPostConfig performConfiguration
  65. INFO: Database Control started successfully
  66. Nov 8, 2012 12:30:33 PM oracle.sysman.emcp.EMDBPostConfig performConfiguration
  67. INFO: >>>>>>>>>>> The Database Control URL is https://11rac1:5500/em <<<<<<<<<<<
  68. Nov 8, 2012 12:32:23 PM oracle.sysman.emcp.EMDBPostConfig showClusterDBCAgentMessage
  69. INFO: 
  70. ****************  Current Configuration  ****************
  71. INSTANCE            NODE         DBCONTROL_UPLOAD_HOST
  72. ----------        ----------        ---------------------
  73. power           11rac1           11rac1
  74. power           11rac2           11rac1
  75. Nov 8, 2012 12:32:23 PM oracle.sysman.emcp.EMDBPostConfig invoke
  76. WARNING: 
  77. ************************  WARNING  ************************
  78. Management Repository has been placed in secure mode wherein Enterprise Manager data will be encrypted.  The encryption key has been placed in the file: /u01/app/oracle/product/11.2.0/db_1/11rac1_power/sysman/config/emkey.ora. Ensure this file is backed up as the encrypted data will become unusable if this file is lost. 
  79. ***********************************************************
  80. Enterprise Manager configuration completed successfully
  81. FINISHED EMCA at Nov 8, 2012 12:32:23 PM
已经显示successfully ,表示已经成功了。5.查看运行状态。
  1. [oracle@11rac1 ~]$ emca -displayConfig dbcontrol -cluster
  2. STARTED EMCA at Nov 8, 2012 1:54:57 PM
  3. EM Configuration Assistant, Version 11.2.0.0.2 Production
  4. Copyright (c) 2003, 2005, Oracle.  All rights reserved.
  5. Enter the following information:
  6. Databaseuniquename: power
  7. Service name: power
  8. Do you wish tocontinue? [yes(Y)/no(N)]: Y
  9. Nov 8, 2012 1:55:02 PM oracle.sysman.emcp.EMConfig perform
  10. INFO: This operation is being logged at /u01/app/oracle/cfgtoollogs/emca/power/emca_2012_11_08_13_54_57.log.
  11. Nov 8, 2012 1:55:05 PM oracle.sysman.emcp.EMDBPostConfig showClusterDBCAgentMessage
  12. INFO: 
  13. ****************  Current Configuration  ****************
  14. INSTANCE            NODE         DBCONTROL_UPLOAD_HOST
  15. ----------        ----------        ---------------------
  16. power           11rac1           11rac1
  17. power           11rac2           11rac1
  18. Enterprise Manager configuration completed successfully
  19. FINISHED EMCA at Nov 8, 2012 1:55:05 PM
  20. [oracle@11rac1 ~]$ emctl -help
  21. Environment variable ORACLE_UNQNAME not defined. Please set ORACLE_UNQNAME todatabaseuniquename. 
  22. [oracle@11rac1 ~]$ export ORACLE_UNQNAME=power
  23. [oracle@11rac1 ~]$ emctl status dbconsole
  24. Oracle Enterprise Manager 11g Database Control Release 11.2.0.2.0 
  25. Copyright (c) 1996, 2010 Oracle Corporation.  All rights reserved.
  26. https://11rac1:5500/em/console/aboutApplication
  27. Oracle Enterprise Manager 11g is running. 
  28. ------------------------------------------------------------------
  29. Logs are generated in directory /u01/app/oracle/product/11.2.0/db_1/11rac1_power/sysman/log
一切正常.OEM配置成功。15位身份证升18位身份证的Oracle函数Oracle连接超限修改,ORA-00064,ORA-12571,ORA-24324及用户连接查看相关资讯      Oracle错误代码  ORA-12514 
  • Oracle 报错ORA-12514: TNS:  (07月27日)
  • 配置静态监听解决ORA-12514错误的  (10/08/2014 19:37:27)
  • 连接Oracle时出现 ORA-12514错误   (06/12/2014 20:11:37)
  • Oracle错误代码大全  (02/16/2015 21:31:57)
  • Oracle Error:ORA-12514  (09/26/2014 19:52:01)
  • Oracle 11g ORA-12514监听程序当前  (04/28/2014 12:15:46)
本文评论 查看全部评论 (0)
表情: 姓名: 字数