在rac集群上开启OEM

由于安装rac的时候没有开启oem,这里开启oem,方便管理

[oracle@rac01 ~]$ emca -config dbcontrol db -repos create -cluster

STARTED EMCA at Mar 14, 2019 2:24:14 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: bol
Service name: bol
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: rac-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:
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 ................ rac-cluster
Database unique name ................ bol
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
Mar 14, 2019 2:24:59 PM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /u01/app/oracle/cfgtoollogs/emca/bol/emca_2019_03_14_14_24_14.log.
Mar 14, 2019 2:25:01 PM oracle.sysman.emcp.EMReposConfig createRepository
INFO: Creating the EM repository (this may take a while) ...
Mar 14, 2019 2:28:57 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Repository successfully created
Mar 14, 2019 2:29:00 PM oracle.sysman.emcp.EMReposConfig uploadConfigDataToRepository
INFO: Uploading configuration data to EM repository (this may take a while) ...
Mar 14, 2019 2:29:53 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Uploaded configuration data successfully
Mar 14, 2019 2:29:53 PM oracle.sysman.emcp.EMDBCConfig instantiateOC4JConfigFiles
INFO: Propagating /u01/app/oracle/product/11.2.0/db_1/oc4j/j2ee/OC4J_DBConsole_rac01_bol to remote nodes ...
Mar 14, 2019 2:29:55 PM oracle.sysman.emcp.EMDBCConfig instantiateOC4JConfigFiles
INFO: Propagating /u01/app/oracle/product/11.2.0/db_1/oc4j/j2ee/OC4J_DBConsole_rac02_bol to remote nodes ...
Mar 14, 2019 2:29:58 PM oracle.sysman.emcp.EMAgentConfig deployStateDirs
INFO: Propagating /u01/app/oracle/product/11.2.0/db_1/rac01_bol to remote nodes ...
Mar 14, 2019 2:29:59 PM oracle.sysman.emcp.EMAgentConfig deployStateDirs
INFO: Propagating /u01/app/oracle/product/11.2.0/db_1/rac02_bol to remote nodes ...
Mar 14, 2019 2:30:01 PM oracle.sysman.emcp.util.DBControlUtil secureDBConsole
INFO: Securing Database Control (this may take a while) ...
Mar 14, 2019 2:30:35 PM oracle.sysman.emcp.util.DBControlUtil startOMS
INFO: Starting Database Control (this may take a while) ...
Mar 14, 2019 2:31:18 PM oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: Database Control started successfully
Mar 14, 2019 2:31:18 PM oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: >>>>>>>>>>> The Database Control URL is https://rac01:1158/em <<<<<<<<<<<
Mar 14, 2019 2:31:22 PM oracle.sysman.emcp.EMDBPostConfig showClusterDBCAgentMessage
INFO:
**************** Current Configuration ****************
INSTANCE NODE DBCONTROL_UPLOAD_HOST
---------- ---------- ---------------------

bol rac01 rac01
bol rac02 rac01


Mar 14, 2019 2:31:22 PM oracle.sysman.emcp.EMDBPostConfig invoke
WARNING:
************************ WARNING ************************

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/rac01_bol/sysman/config/emkey.ora. Ensure this file is backed up as the encrypted data will become unusable if this file is lost.

***********************************************************
Enterprise Manager configuration completed successfully
FINISHED EMCA at Mar 14, 2019 2:31:22 PM

 

 --相关错误解决

WARNING: Error during db connection : ORA-12514: TNS:listener does not currently know of service requested in connect descriptor

Mar 11, 2019 5:17:25 PM oracle.sysman.emcp.util.GeneralUtil initSQLEngineRemotely
WARNING: ORA-01017: invalid username/password; logon denied

解决:

[grid@rac1 ~]$ sqlplus / as sysdba

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='scanip:1521' scope=both sid='*';

System altered.

SQL> show parameter remote

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

Mar 11, 2019 5:27:26 PM oracle.sysman.emcp.util.GeneralUtil initSQLEngineRemotely
WARNING: Error during db connection : ORA-01017: invalid username/password; logon denied

解决

SQL> conn /as sysasm
Connected.
SQL> alter user asmsnmp identified by oracle;

User altered.

Mar 14, 2019 11:35:48 AM oracle.sysman.emcp.util.GeneralUtil initSQLEngineRemotely
WARNING: Error during db connection : ORA-28000: the account is locked

Mar 14, 2019 11:35:53 AM oracle.sysman.emcp.util.GeneralUtil initSQLEngineRemotely
WARNING: ORA-28000: the account is locked

解决

[oracle@rac01 ~]$ sqlplus /nolog
alter user SYSMAN account unlock;

Mar 11, 2019 5:29:12 PM oracle.sysman.emcp.DatabaseChecks performReposChecks
SEVERE: Dbcontrol Repository already exists. Fix the error(s) and run EM Configuration Assistant again in standalone mode.

解决:

$ emca -deconfig dbcontrol db -repos drop -cluster ##删除,重新建

5 cluster name获取

[grid@rac01 ~]$ cemutlo -n
rac-cluster

 

---

 

posted @ 2019-03-14 14:43  春困秋乏夏打盹  阅读(592)  评论(0编辑  收藏  举报