Configure Oracle 11gR2 11.2.0.3 RAC OEM

启动Oracle 11gR2 11.2.0.3 Linux x86_64 OEM报出如下的错误:

oracle@rac1:/home/oracle>emctl status dbconsole

Environment variable ORACLE_UNQNAME not defined. Please set ORACLE_UNQNAME to database unique name.

 

oracle@rac2:/home/oracle>emctl status dbconsole

Environment variable ORACLE_UNQNAME not defined. Please set ORACLE_UNQNAME to database unique name.

 

翻看之间DBCA创建数据库的时候就有报错

bb

错误提示是:可能是SCAN LISTENER没有启动,或者是数据库没有注册到SCAN LINSTENER上。

 

1.确认remote_listener参数已经设置

The remote_listener parameter controls registering with the SCAN listeners.

 

grid@rac1:/home/grid>sqlplus  / as sysdba

 

SQL*Plus: Release 11.2.0.3.0 Production on Thu Jul 4 16:38:56 2013

 

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 Real Application Clusters and Automatic Storage Management options

 

SQL> show parameter remote_listener

 

NAME                                 TYPE        VALUE

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

remote_listener                      string      rac-scan:1521

 

[root@rac1 ~]# su - oracle

oracle@rac1:/home/oracle>sqlplus  / as sysdba

 

SQL*Plus: Release 11.2.0.3.0 Production on Thu Jul 4 16:39:50 2013

 

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 Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,

Data Mining and Real Application Testing options

 

SQL> show parameter remote_listener

 

NAME                                 TYPE        VALUE

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

remote_listener                      string      rac-scan:1521

 

 

2查看LISTENER_SCAN1的服务信息:

grid@rac1:/home/grid>lsnrctl services LISTENER_SCAN1

 

LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 04-JUL-2013 16:40:50

 

Copyright (c) 1991, 2011, Oracle.  All rights reserved.

 

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_SCAN1)))

Services Summary...

Service "+ASM" has 2 instance(s).

  Instance "+ASM1", status READY, has 1 handler(s) for this service...

    Handler(s):

      "DEDICATED" established:0 refused:0 state:ready

         REMOTE SERVER

         (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.20.20)(PORT=1521)))

  Instance "+ASM2", status READY, has 1 handler(s) for this service...

    Handler(s):

      "DEDICATED" established:0 refused:0 state:ready

         REMOTE SERVER

         (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.20.23)(PORT=1521)))

Service "szscdb" has 2 instance(s).

  Instance "szscdb1", status READY, has 1 handler(s) for this service...

    Handler(s):

      "DEDICATED" established:0 refused:0 state:ready

         REMOTE SERVER

         (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.20.20)(PORT=1521)))

  Instance "szscdb2", status READY, has 1 handler(s) for this service...

    Handler(s):

      "DEDICATED" established:0 refused:0 state:ready

         REMOTE SERVER

         (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.20.23)(PORT=1521)))

Service "szscdbXDB" has 2 instance(s).

  Instance "szscdb1", status READY, has 1 handler(s) for this service...

    Handler(s):

      "D000" established:0 refused:0 current:0 max:1022 state:ready

         DISPATCHER

         (ADDRESS=(PROTOCOL=tcp)(HOST=rac1)(PORT=64919))

  Instance "szscdb2", status READY, has 1 handler(s) for this service...

    Handler(s):

      "D000" established:0 refused:0 current:0 max:1022 state:ready

         DISPATCHER

         (ADDRESS=(PROTOCOL=tcp)(HOST=rac2)(PORT=40805))

The command completed successfully

 

准备重新建立OEM

1.Delete DB Control Configuration Files using EMCA

语法:

bin/emca -deconfig dbcontrol db -repos drop -cluster

 

检查CLUSTER状态

[root@rac2 ~]# srvctl status database -d  szscdb

Instance szscdb1 is running on node rac1

Instance szscdb2 is running on node rac2

 

DB相关参数:

oracle@rac2:/home/oracle>sqlplus  / as sysdba

 

SQL*Plus: Release 11.2.0.3.0 Production on Thu Jul 4 16:43:48 2013

 

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 Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,

Data Mining and Real Application Testing options

 

SQL> show parameter name

 

NAME                                 TYPE        VALUE

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

db_file_name_convert                 string

db_name                              string      szscdb

db_unique_name                       string      szscdb

global_names                         boolean     FALSE

instance_name                        string      szscdb2

lock_name_space                      string

log_file_name_convert                string

processor_group_name                 string

service_names                        string      szscdb

 

CLUSTER NAME

grid@rac2:/home/grid>$ORACLE_HOME/bin/cemutlo -n

rac-cluster

 

删除之前的配置:

oracle@rac1:/home/oracle>emca -deconfig dbcontrol db -repos drop -cluster

 

STARTED EMCA at Jul 4, 2013 4:47:49 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: szscdb

Service name: szscdb

Listener port number: 1521

Listener ORACLE_HOME [ /u01/app/11.2.0/grid ]:

Password for SYS user: 

Password for SYSMAN user: 

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

WARNING : While repository is dropped the database will be put in quiesce mode.  警告:这个操作将会导致数据库进入静默模式,生产系统不可取。

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

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

Jul 4, 2013 4:48:05 PM oracle.sysman.emcp.EMConfig perform

INFO: This operation is being logged at /u02/app/oracle/cfgtoollogs/emca/szscdb/emca_2013_07_04_16_47_48.log.

Jul 4, 2013 4:48:09 PM oracle.sysman.emcp.EMDBPreConfig performDeconfiguration

WARNING: EM is not configured for this database. No EM-specific actions can be performed. Some of the possible reasons may be:

 1) EM is configured with different hostname then physical host. Set environment variable ORACLE_HOSTNAME= and re-run EMCA script.

 2) ORACLE_HOSTNAME is set. Unset it and re-run EMCA script

Jul 4, 2013 4:48:09 PM oracle.sysman.emcp.EMReposConfig invoke

INFO: Dropping the EM repository (this may take a while) ...

Jul 4, 2013 4:52:25 PM oracle.sysman.emcp.EMReposConfig invoke

INFO: Repository successfully dropped

Enterprise Manager configuration completed successfully

FINISHED EMCA at Jul 4, 2013 4:52:25 PM

 

 

配置11gR2 RC OEM

oracle@rac1:/home/oracle>emca -config dbcontrol db -repos create -cluster

 

STARTED EMCA at Jul 4, 2013 4:54:23 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: szscdb

Service name: szscdb

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-scan

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 ................ /u02/app/oracle/products/11.2.0

 

Database instance hostname ................ Listener ORACLE_HOME ................ /u01/app/11.2.0/grid

Listener port number ................ 1521

Cluster name ................ rac-scan

Database unique name ................ szscdb

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

Jul 4, 2013 4:54:56 PM oracle.sysman.emcp.EMConfig perform

INFO: This operation is being logged at /u02/app/oracle/cfgtoollogs/emca/szscdb/emca_2013_07_04_16_54_23.log.

Jul 4, 2013 4:55:05 PM oracle.sysman.emcp.EMReposConfig createRepository

INFO: Creating the EM repository (this may take a while) ...

Jul 4, 2013 5:05:26 PM oracle.sysman.emcp.EMReposConfig invoke

INFO: Repository successfully created

Jul 4, 2013 5:05:36 PM oracle.sysman.emcp.EMReposConfig uploadConfigDataToRepository

INFO: Uploading configuration data to EM repository (this may take a while) ...

Jul 4, 2013 5:06:38 PM oracle.sysman.emcp.EMReposConfig invoke

INFO: Uploaded configuration data successfully

Jul 4, 2013 5:06:39 PM oracle.sysman.emcp.EMDBCConfig instantiateOC4JConfigFiles

INFO: Propagating /u02/app/oracle/products/11.2.0/oc4j/j2ee/OC4J_DBConsole_rac1_szscdb to remote nodes ...

Jul 4, 2013 5:06:42 PM oracle.sysman.emcp.EMDBCConfig instantiateOC4JConfigFiles

INFO: Propagating /u02/app/oracle/products/11.2.0/oc4j/j2ee/OC4J_DBConsole_rac2_szscdb to remote nodes ...

Jul 4, 2013 5:06:50 PM oracle.sysman.emcp.EMAgentConfig deployStateDirs

INFO: Propagating /u02/app/oracle/products/11.2.0/rac1_szscdb to remote nodes ...

Jul 4, 2013 5:06:54 PM oracle.sysman.emcp.EMAgentConfig deployStateDirs

INFO: Propagating /u02/app/oracle/products/11.2.0/rac2_szscdb to remote nodes ...

Jul 4, 2013 5:06:58 PM oracle.sysman.emcp.util.DBControlUtil secureDBConsole

INFO: Securing Database Control (this may take a while) ...

Jul 4, 2013 5:07:25 PM oracle.sysman.emcp.util.DBControlUtil startOMS

INFO: Starting Database Control (this may take a while) ...

Jul 4, 2013 5:09:07 PM oracle.sysman.emcp.EMDBPostConfig performConfiguration

INFO: Database Control started successfully

Jul 4, 2013 5:09:08 PM oracle.sysman.emcp.EMDBPostConfig performConfiguration

INFO: >>>>>>>>>>> The Database Control URL is https://rac1:1158/em <<<<<<<<<<<

Jul 4, 2013 5:09:22 PM oracle.sysman.emcp.EMDBPostConfig showClusterDBCAgentMessage

INFO:

****************  Current Configuration  ****************

 INSTANCE            NODE           DBCONTROL_UPLOAD_HOST

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

 

szscdb            rac1            rac1

szscdb            rac2            rac1

 

 

Jul 4, 2013 5:09: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: /u02/app/oracle/products/11.2.0/rac1_szscdb/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 Jul 4, 2013 5:09:22 PM

 bb

 

http:

fj.pngOEM1.jpg

fj.pngOEM2.jpg

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

转载于:http://blog.itpub.net/26169542/viewspace-765523/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值