当前位置:Gxlcms > 数据库问题 > 一旦配置oracle em经验

一旦配置oracle em经验

时间:2021-07-01 10:21:17 帮助过:2人阅读

解决方法:

假设是在创建实例前就已经打了这个patch的话,那之后就不会报错了。

假设是在创建实例之后才打的这个patch。那么须要运行下面:

对于单实例:
1.使用Opatch安装Patch 8350262
2.设置ORACLE_HOME and ORACLE_SID 环境变量。运行 <PATCH_HOME>/killDBConsole.(windows 平台省略这一步)
3.Re-secure Database Control with the following command:
<ORACLE_HOME>/bin/emctl secure dbconsole -reset
4.Re-start Database Control with the following command:
<ORACLE_HOME>/bin/emctl start dbconsole


对于RAC:
1.使用Opatch安装Patch 8350262, 在一个节点安装就ok了。
2.在全部节点运行:设置ORACLE_HOME and ORACLE_SID 环境变量。运行 <PATCH_HOME>/killDBConsole.(windows 平台省略这一步)
3.Re-secure Database Control on the first cluster node with the following command:
<ORACLE_HOME>/bin/emctl secure dbconsole -reset
4.Re-secure Database Control on the remaining cluster nodes with the following command. Note that the -reset switch is not included with this command:
<ORACLE_HOME>/bin/emctl secure dbconsole
5.Re-start Database Control by executing the following command on each node in the cluster:
<ORACLE_HOME>/bin/emctl start dbconsole

打补丁后。清除并新建em,各种报错,无奈下手工删除各种数据:

Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options

SQL> DROP public synonym SETEMVIEWUSERCONTEXT;

Synonym dropped.

SQL> DROP PUBLIC SYNONYM MGMT_TARGET_BLACKOUTS;

Synonym dropped.

SQL> drop role MGMT_USER;

Role dropped.

SQL> DROP USER MGMT_VIEW CASCADE;
DROP USER MGMT_VIEW CASCADE
          *
ERROR at line 1:
ORA-01918: user 'MGMT_VIEW' does not exist


SQL> DROP USER SYSMAN CASCADE;

User dropped.

SQL> exit

之后新建em成功。

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

STARTED EMCA at Aug 17, 2014 2:58:04 PM
EM Configuration Assistant, Version 10.2.0.5.0 Production
Copyright (c) 2003, 2009, Oracle.  All rights reserved.

Enter the following information:
Database SID: racdb1
Listener port number: 1521
Password for SYS user:  
Password for DBSNMP user:  
Password for SYSMAN user:  
Email address for notifications (optional): 
Outgoing Mail (SMTP) server for notifications (optional): 
ASM ORACLE_HOME [ /u01/app/oracle/product/11.2.0/db ]: 
ASM SID [ +ASM ]: +ASM1
ASM port [ 1521 ]: 
ASM user role [ SYSDBA ]:       
ASM username [ SYS ]: 
ASM user password:  
-----------------------------------------------------------------

You have specified the following settings

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

Local hostname ................ node1
Listener port number ................ 1521
Database SID ................ racdb1
Email address for notifications ............... 
Outgoing Mail (SMTP) server for notifications ............... 
ASM ORACLE_HOME ................ /u01/app/oracle/product/11.2.0/db
ASM SID ................ +ASM1
ASM port ................ 1521
ASM user role ................ SYSDBA
ASM username ................ SYS

-----------------------------------------------------------------
Do you wish to continue? [yes(Y)/no(N)]: y
Aug 17, 2014 2:58:32 PM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /u01/app/oracle/product/11.2.0/db/cfgtoollogs/emca/racdb/emca_2014-08-17_02-58-04-PM.log.
Aug 17, 2014 2:58:34 PM oracle.sysman.emcp.EMReposConfig createRepository
INFO: Creating the EM repository (this may take a while) ...
Aug 17, 2014 3:02:14 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Repository successfully created
Aug 17, 2014 3:02:24 PM oracle.sysman.emcp.util.DBControlUtil secureDBConsole
INFO: Securing Database Control (this may take a while) ...
Aug 17, 2014 3:02:50 PM oracle.sysman.emcp.util.DBControlUtil secureDBConsole
INFO: Database Control secured successfully.
Aug 17, 2014 3:02:50 PM oracle.sysman.emcp.util.DBControlUtil startOMS
INFO: Starting Database Control (this may take a while) ...
Aug 17, 2014 3:04:27 PM oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: Database Control started successfully
Aug 17, 2014 3:04:27 PM oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: >>>>>>>>>>> The Database Control URL is https://node1:1158/em <<<<<<<<<<<
Enterprise Manager configuration completed successfully
FINISHED EMCA at Aug 17, 2014 3:04:27 PM


登陆之后。发现不是rac的em,又一次配置


[oracle@node1 dbs]$ cd /u01/app/crs_home/bin
[oracle@node1 bin]$ ./cemutlo -n
crs
[oracle@node1 bin]$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.5.0 - Production on Sun Aug 17 17:18:28 2014

Copyright (c) 1982, 2010, Oracle.  All Rights Reserved.


Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options

SQL> show parameter name

NAME				     TYPE	 VALUE
------------------------------------ ----------- ------------------------------
db_file_name_convert		     string
db_name 			     string	 racdb
db_unique_name			     string	 racdb
global_names			     boolean	 TRUE
instance_name			     string	 racdb1
lock_name_space 		     string
log_file_name_convert		     string
service_names			     string	 service1, SYS$ADMIN.TARGET_QUE
						 UE.RACDB.EPOINT.COM, service2,
						  racdb.epoint.com
SQL> 
[oracle@node1 dbs]$ emca -config dbcontrol db -repos create -cluster

STARTED EMCA at Aug 17, 2014 5:02:15 PM
EM Configuration Assistant, Version 10.2.0.5.0 Production
Copyright (c) 2003, 2009, Oracle.  All rights reserved.

Enter the following information:
Database unique name: racdb
Database Control is already configured for the database racdb
You have chosen to configure Database Control for managing the database racdb
This will remove the existing configuration and the default settings and perform a fresh configuration
Do you wish to continue? [yes(Y)/no(N)]: y
Listener port number: 1521
Cluster name: crs
Password for SYS user:  
Password for DBSNMP user:  
Password for SYSMAN user:  
Email address for notifications (optional): 
Outgoing Mail (SMTP) server for notifications (optional): 
ASM ORACLE_HOME [ /u01/app/oracle/product/11.2.0/db ]: 
ASM port [ 1521 ]: 
ASM user role [ SYSDBA ]: 
ASM username [ SYS ]: 
ASM user password:  
-----------------------------------------------------------------

You have specified the following settings

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

Database instance hostname ................ node1
Listener port number ................ 1521
Cluster name ................ crs
Database unique name ................ racdb
Email address for notifications ............... 
Outgoing Mail (SMTP) server for notifications ............... 
ASM ORACLE_HOME ................ /u01/app/oracle/product/11.2.0/db
ASM port ................ 1521
ASM user role ................ SYSDBA
ASM username ................ SYS

-----------------------------------------------------------------
Do you wish to continue?

[yes(Y)/no(N)]: y Aug 17, 2014 5:02:38 PM oracle.sysman.emcp.EMConfig perform INFO: This operation is being logged at /u01/app/oracle/product/11.2.0/db/cfgtoollogs/emca/racdb/emca_2014-08-17_05-02-15-PM.log. Aug 17, 2014 5:02:40 PM oracle.sysman.emcp.util.DBControlUtil stopOMS INFO: Stopping Database Control (this may take a while) ... Aug 17, 2014 5:02:44 PM oracle.sysman.emcp.EMReposConfig createRepository INFO: Creating the EM repository (this may take a while) ... Aug 17, 2014 5:05:22 PM oracle.sysman.emcp.EMReposConfig invoke INFO: Repository successfully created Aug 17, 2014 5:05:27 PM oracle.sysman.emcp.EMDBCConfig instantiateOC4JConfigFiles INFO: Propagating /u01/app/oracle/product/11.2.0/db/oc4j/j2ee/OC4J_DBConsole_node1_racdb1 to remote nodes ... Aug 17, 2014 5:05:28 PM oracle.sysman.emcp.EMDBCConfig instantiateOC4JConfigFiles INFO: Propagating /u01/app/oracle/product/11.2.0/db/oc4j/j2ee/OC4J_DBConsole_node2_racdb2 to remote nodes ... Aug 17, 2014 5:05:28 PM oracle.sysman.emcp.EMDBCConfig copyAndPropagateOC4JDir INFO: Propagating /u01/app/oracle/product/11.2.0/db/oc4j/j2ee/isqlplus_node1 to remote nodes ... Aug 17, 2014 5:05:29 PM oracle.sysman.emcp.EMDBCConfig copyAndPropagateOC4JDir INFO: Propagating /u01/app/oracle/product/11.2.0/db/oc4j/j2ee/isqlplus_node2 to remote nodes ... Aug 17, 2014 5:05:34 PM oracle.sysman.emcp.EMAgentConfig deployStateDirs INFO: Propagating /u01/app/oracle/product/11.2.0/db/node1_racdb1 to remote nodes ... Aug 17, 2014 5:05:37 PM oracle.sysman.emcp.EMAgentConfig deployStateDirs INFO: Propagating /u01/app/oracle/product/11.2.0/db/node2_racdb2 to remote nodes ... Aug 17, 2014 5:05:38 PM oracle.sysman.emcp.util.DBControlUtil secureDBConsole INFO: Securing Database Control (this may take a while) ... Aug 17, 2014 5:06:30 PM oracle.sysman.emcp.util.DBControlUtil startOMS INFO: Starting Database Control (this may take a while) ... Aug 17, 2014 5:08:26 PM oracle.sysman.emcp.EMDBPostConfig performConfiguration INFO: Database Control started successfully Aug 17, 2014 5:08:26 PM oracle.sysman.emcp.EMDBPostConfig performConfiguration INFO: >>>>>>>>>>> The Database Control URL is https://node1:1158/em <<<<<<<<<<< Aug 17, 2014 5:08:41 PM oracle.sysman.emcp.EMDBPostConfig showClusterDBCAgentMessage INFO: **************** Current Configuration **************** INSTANCE NODE DBCONTROL_UPLOAD_HOST ---------- ---------- --------------------- racdb1 node1 node1 racdb2 node2 node1 Enterprise Manager configuration completed successfully FINISHED EMCA at Aug 17, 2014 5:08:41 PM




其它问题:

假设drop repos特别慢。能够尝试例如以下语句:alter system unquiesce;

版权声明:本文博主原创文章。博客,未经同意不得转载。

一旦配置oracle em经验

标签:

人气教程排行