oracle 11g RAC EM重建讲解



环境:oracle 11.2.0.3 + RAC + 2node + raw + redhat5.7

重建EM报错:
SEVERE: Scan Listener is not up or database service is not regist
这个是没有设置好remote_listener参数

解决方法:
EM重建:

如果是正常的环境就关闭:(我的环境已经是瘫痪的EM了,所以根本没有起来)
emctl stop dbconsole

RAC环境和单节点不同,需要加 -cluster 参数
emca -deconfig dbcontrol db -repos drop -cluster


以上命令清除RAC数据库旧配置信息,但是会使数据库进入静默模式,锁定所有用户,在生产环境是不允许的。
于是使用如下方式清除:(不会进入静默模式)


删除旧配置信息:
emca -deconfig dbcontrol db  节点1  
emca -deconfig dbcontrol db  节点2


然后手动删除数据库中的相关信息:oracle用户
DROP PUBLIC SYNONYM MGMT_SEVERITY;
DROP PUBLIC SYNONYM MGMT_SEVERITY_ARRAY;
DROP PUBLIC SYNONYM MGMT_SEVERITY_OBJ;
DROP PUBLIC SYNONYM MGMT_AVAILABILITY;
DROP PUBLIC SYNONYM MGMT_CURRENT_AVAILABILITY;
DROP PUBLIC SYNONYM MGMT_CURRENT_METRICS;
DROP PUBLIC SYNONYM MGMT_CURRENT_METRIC_ERRORS;
DROP PUBLIC SYNONYM MGMT_CURRENT_SEVERITY;
DROP PUBLIC SYNONYM MGMT_SEVERITY_OBJ;
DROP PUBLIC SYNONYM MGMT_GUID_ARRAY;
DROP PUBLIC SYNONYM MGMT_GUID_OBJ;
DROP PUBLIC SYNONYM MGMT_METRICS;
DROP PUBLIC SYNONYM MGMT_METRICS_RAW;
DROP PUBLIC SYNONYM MGMT_METRICS_COMPOSITE_KEYS;
DROP PUBLIC SYNONYM MGMT_METRICS_1HOUR;
DROP PUBLIC SYNONYM MGMT_METRICS_1DAY;
DROP PUBLIC SYNONYM MGMT_METRIC_ERRORS;
DROP PUBLIC SYNONYM MGMT_METRIC_COLLECTIONS;
DROP PUBLIC SYNONYM MGMT_METRIC_THRESHOLDS;
DROP PUBLIC SYNONYM MGMT_TARGET;
DROP PUBLIC SYNONYM MGMT_TARGETS;
DROP PUBLIC SYNONYM MGMT_TARGET_PROPERTIES;
DROP PUBLIC SYNONYM MGMT_TARGET_MEMBERSHIPS;
DROP PUBLIC SYNONYM MGMT_TARGET_BLACKOUTS;
DROP PUBLIC SYNONYM MGMT_TYPE_PROPERTIES;
DROP PUBLIC SYNONYM MGMT_CURRENT_METRICS;
DROP PUBLIC SYNONYM MGMT_CURRENT_METRIC_ERRORS;
DROP PUBLIC SYNONYM MGMT_STRING_METRIC_HISTORY;
DROP PUBLIC SYNONYM MGMT_LONG_TEXT;
DROP PUBLIC SYNONYM MGMT_COLLECTION_PROPERTIES;
DROP PUBLIC SYNONYM MGMT_DELTA;
DROP PUBLIC SYNONYM MGMT_DELTA_IDS;
DROP PUBLIC SYNONYM MGMT_DELTA_ID_VALUES;
DROP PUBLIC SYNONYM MGMT_DELTA_ENTRY;
DROP PUBLIC SYNONYM MGMT_DELTA_ENTRY_VALUES;
DROP PUBLIC SYNONYM MGMT_DELTA_VALUE;
DROP PUBLIC SYNONYM MGMT_DELTA_VALUES;
DROP PUBLIC SYNONYM MGMT_NAME_VALUE;
DROP PUBLIC SYNONYM MGMT_NAME_VALUES;
DROP PUBLIC SYNONYM MGMT_JOB;
DROP PUBLIC SYNONYM MGMT_JOBS;
DROP PUBLIC SYNONYM MGMT_JOB_EXECPLAN;
DROP PUBLIC SYNONYM MGMT_JOB_EXECUTION;
DROP PUBLIC SYNONYM MGMT_JOB_EXEC_SUMMARY;
DROP PUBLIC SYNONYM MGMT_JOB_OUTPUT;
DROP PUBLIC SYNONYM MGMT_JOB_PARAMETER;
DROP PUBLIC SYNONYM MGMT_JOB_SCHEDULE;
DROP PUBLIC SYNONYM MGMT_JOB_TARGET;
DROP PUBLIC SYNONYM MGMT_AVAILABILITY;
DROP PUBLIC SYNONYM MGMT_ADMIN;
DROP PUBLIC SYNONYM MGMT_GLOBAL;
DROP PUBLIC SYNONYM MGMT_LOG;
DROP PUBLIC SYNONYM MGMT_CREDENTIAL;
DROP PUBLIC SYNONYM MGMT_PREFERENCES;
DROP PUBLIC SYNONYM MGMT_PAF_PROCS_LATEST;
DROP PUBLIC SYNONYM MGMT_PAF_JOBS;
DROP PUBLIC SYNONYM MGMT_PAF$PROCEDURES;
DROP PUBLIC SYNONYM MGMT_PAF$APPLICATIONS;
DROP PUBLIC SYNONYM MGMT_PAF$INSTANCES;
DROP PUBLIC SYNONYM MGMT_PAF$STATES;
DROP PUBLIC SYNONYM SMP_EMD_AVAIL_OBJ;
DROP PUBLIC SYNONYM SMP_EMD_TARGET_OBJ;
DROP PUBLIC SYNONYM SMP_EMD_TARGET_OBJ_ARRAY;
DROP PUBLIC SYNONYM SMP_EMD_DELETE_REC_ARRAY;
DROP PUBLIC SYNONYM EMD_MNTR;
DROP PUBLIC SYNONYM SMP_EMD_NVPAIR;
DROP PUBLIC SYNONYM SMP_EMD_NVPAIR_ARRAY;
DROP PUBLIC SYNONYM SMP_EMD_STRING_ARRAY;
DROP PUBLIC SYNONYM SMP_EMD_STRING_ARRAY_ARRAY;
DROP PUBLIC SYNONYM SMP_EMD_INTEGER_ARRAY;
DROP PUBLIC SYNONYM SMP_EMD_INTEGER_ARRAY_ARRAY;
DROP PUBLIC SYNONYM ECM_UTIL;
DROP PUBLIC SYNONYM MGMT_USER;
DROP PUBLIC SYNONYM MGMT_VIEW_UTIL;
DROP PUBLIC synonym SETEMVIEWUSERCONTEXT;
DROP PUBLIC SYNONYM MGMT_MESSAGES;
DROP ROLE MGMT_USER;
drop public synonym MGMT_TARGET_BLACKOUTS;

DROP USER MGMT_VIEW CASCADE;


DROP USER SYSMAN CASCADE;


然后检查grid和oracle的remote_listener参数是否设置:
sqlplus asmsnmp/123456@scan:1521/+ASM as sysdba
上面命令登入不了就没有设置,listener_scan1没有开启,没有监听到远程ASM

sqlplus asmsnmp/123456@192.168.1.5:1521/+ASM as sysdba     ---登入本ASM实例
select instance_name from v$instance;

两个节点grid都添加远程监听:
[grid@rac01 admin]$ sqlplus /nolog
SQL> conn /as sysdba
SQL> show parameter remote

alter system set remote_listener='rac-scan:1521' scope=both sid='*';
alter system register;         ---注册监听

单个节点oracle用户添加远程监听:(已有remote_listener配置就不需要)
[oracle@rac01]$ sqlplus /nolog
SQL> conn /as sysdba
SQL> show parameter remote

alter system set remote_listener='rac-scan:1521' scope=both sid='*';
alter system register;         ---注册监听

启动listener_scan1监听
[grid@rac01 ~]$ lsnrctl start LISTENER_SCAN1
[grid@rac01 ~]$ lsnrctl status listener_scan1
当scanip在本机时可以监听到所以实例,如果不在本机,就监听不到,当scanip漂移到节点2的时候就能看见了。
[grid@rac01 ~]$ lsnrctl status listener_scan1

LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 11-JAN-2015 02:21:34

Copyright (c) 1991, 2011, 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.3.0 - Production
Start Date                10-JAN-2015 21:15:25
Uptime                    0 days 5 hr. 6 min. 8 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/11.2.0.3/grid/network/admin/listener.ora
Listener Log File         /u01/app/grid/diag/tnslsnr/rac01/listener_scan1/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER_SCAN1)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.1.225)(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 "racdb" has 2 instance(s).
  Instance "racdb1", status READY, has 1 handler(s) for this service...
  Instance "racdb2", status READY, has 1 handler(s) for this service...
The command completed successfully


监听正常后就可以进行集群的EM配置了:


emca -config dbcontrol db -repos create -cluster


配置完成就可以https访问了



可以把https改成http :
emctl unsecure dbconsole





---end---






评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值